-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
164 lines (140 loc) · 3.87 KB
/
Makefile
File metadata and controls
164 lines (140 loc) · 3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#
# Copyright (C) 2006-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=lirc
PKG_VERSION:=0.8.7
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/${PKG_NAME}
PKG_MD5SUM:=fb1dcddbc8ca3d03c7f3a2d40cf28b71
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/lirc/Default
SECTION:=utils
CATEGORY:=Utilities
URL:=http://lirc.org/
endef
define Package/lirc
$(call Package/lirc/Default)
TITLE:=LIRC - Linux Infrared Remote Control
MENU:=1
endef
define Package/lirc/description
LIRC is a package that allows you to decode and send infra-red signals of many
(but not all) commonly used remote controls.
endef
define Package/lircdaemonadd
$(call Package/lirc/Default)
DEPENDS:=lirc
TITLE:=daemon additional files
endef
define Package/lircdaemonadd/description
Contains additional daemon-tools.
endef
define Package/lirctools
$(call Package/lirc/Default)
DEPENDS:=lirc
TITLE:=LIRC tools
endef
define Package/lirctools/description
Contains additional lirc-tools.
endef
#CONFIGURE_ARGS += \
# --enable-sandboxed \
# --with-driver="mceusb" \
# --with-gnu-ld \
# --with-kerneldir="$(LINUX_DIR)" \
# --with-pic \
# --without-x \
# --disable-nls \
# --disable-static
CONFIGURE_ARGS += \
--enable-sandboxed \
--with-driver="uirt2_raw" \
--with-gnu-ld \
--with-kerneldir="$(LINUX_DIR)" \
--with-pic \
--without-x \
--disable-nls \
--disable-static
define Package/lirc/conffiles
/etc/lircd.conf
endef
MAKE_FLAGS += \
DESTDIR="$(PKG_INSTALL_DIR)" \
SUBDIRS="daemons tools"
define Package/lirc/install
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/lircd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) ./files/lircd.conf $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/lircd.init $(1)/etc/init.d/lircd
$(INSTALL_DIR) $(1)/usr/lib
endef
#todo:
# $(CP) $(PKG_BUILD_DIR)/drivers/lirc_dev/lirc_dev.ko
# $(CP) $(PKG_BUILD_DIR)/drivers/lirc_mceusb2/lirc_mceusb2.ko
#depends on the selected module
define Package/lirc/postinst
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Enabling rc.d symlink for lircd"
/etc/init.d/lircd enable
fi
exit 0
endef
define Package/lirc/prerm
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Removing rc.d symlink for lircd"
/etc/init.d/lircd disable
fi
exit 0
endef
define Package/lircdaemonadd/install
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/irrecord $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/lircmd $(1)/usr/sbin/
endef
define Package/lirctools/install
$(INSTALL_DIR) $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/.libs/liblirc_client.so.0.2.1 $(1)/usr/lib/liblirc_client.so.0
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/.libs/irexec $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) ./files/lircrc $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/irexec.init $(1)/etc/init.d/irexec
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/irsend $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/irw $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mode2 $(1)/usr/sbin/
endef
define Package/lirctools/postinst
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Enabling rc.d symlink for irexec"
/etc/init.d/irexec enable
fi
exit 0
endef
define Package/lirctools/prerm
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Removing rc.d symlink for irexec"
/etc/init.d/irexec disable
fi
exit 0
endef
$(eval $(call BuildPackage,lirc))
$(eval $(call BuildPackage,lircdaemonadd))
$(eval $(call BuildPackage,lirctools))