diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-03-01 22:25:08 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-03-03 08:36:00 +0100 |
commit | d68ffc6ef01a138c04c935a8599e5679ae56a917 (patch) | |
tree | cb2ae5d3496b91f6754a0825e3888ea3e5a0dab1 /meta-oe | |
parent | 6e3d209d1fa85184e7a6d33e0f00cf9d17a70b58 (diff) | |
download | meta-openembedded-d68ffc6ef01a138c04c935a8599e5679ae56a917.tar.gz |
lirc: Add recipe for 0.9.2
There is a older version available at meta-guacamayo
but its not distro specific and many distros might need it
so meta-oe is right place for it.
Change-Id: Ic6b45dd652187d72a1e1bf4fb5adc8ed9c80e52a
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-connectivity/lirc/lirc.inc | 14 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/lirc/lirc/lirc.tmpfiles | 1 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/lirc/lirc/lirc_options.conf | 24 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/lirc/lirc/lircd.conf | 315 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/lirc/lirc/lircd.init | 40 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/lirc/lirc/lircd.service | 20 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/lirc/lirc/lircexec.init | 37 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb | 66 |
8 files changed, 517 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/lirc/lirc.inc b/meta-oe/recipes-connectivity/lirc/lirc.inc new file mode 100644 index 000000000..9a10c32e9 --- /dev/null +++ b/meta-oe/recipes-connectivity/lirc/lirc.inc | |||
@@ -0,0 +1,14 @@ | |||
1 | DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls." | ||
2 | DESCRIPTION_append_lirc = " This package contains the lirc daemon, libraries and tools." | ||
3 | DESCRIPTION_append_lirc-exec = " This package contains a daemon that runs programs on IR signals." | ||
4 | DESCRIPTION_append_lirc-remotes = " This package contains some config files for remotes." | ||
5 | DESCRIPTION_append_lirc-nslu2example = " This package contains a working config for RC5 remotes and a modified NSLU2." | ||
6 | HOMEPAGE = "http://www.lirc.org" | ||
7 | SECTION = "console/network" | ||
8 | LICENSE = "GPLv2" | ||
9 | DEPENDS = "alsa-lib libftdi" | ||
10 | PRIORITY = "optional" | ||
11 | |||
12 | SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2" | ||
13 | |||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
diff --git a/meta-oe/recipes-connectivity/lirc/lirc/lirc.tmpfiles b/meta-oe/recipes-connectivity/lirc/lirc/lirc.tmpfiles new file mode 100644 index 000000000..0b80e2e47 --- /dev/null +++ b/meta-oe/recipes-connectivity/lirc/lirc/lirc.tmpfiles | |||
@@ -0,0 +1 @@ | |||
d /run/lirc 0755 root root - | |||
diff --git a/meta-oe/recipes-connectivity/lirc/lirc/lirc_options.conf b/meta-oe/recipes-connectivity/lirc/lirc/lirc_options.conf new file mode 100644 index 000000000..d8ddedd8f --- /dev/null +++ b/meta-oe/recipes-connectivity/lirc/lirc/lirc_options.conf | |||
@@ -0,0 +1,24 @@ | |||
1 | # These are the default options to lircd, if installed as | ||
2 | # /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8) | ||
3 | # manpages for info on the different options. | ||
4 | |||
5 | [lircd] | ||
6 | nodaemon = False | ||
7 | permission = 666 | ||
8 | driver = default | ||
9 | device = /dev/lirc0 | ||
10 | output = /var/run/lirc/lircd | ||
11 | pidfile = /var/run/lirc/lircd.pid | ||
12 | plugindir = /usr/lib/lirc/plugins | ||
13 | allow-simulate = No | ||
14 | repeat-max = 600 | ||
15 | #listen = [address:]port | ||
16 | #connect = host[:port] | ||
17 | #debug = 5 | ||
18 | #uinput = ... | ||
19 | #release = ... | ||
20 | #logfile = ... | ||
21 | |||
22 | [lircmd] | ||
23 | uinput = False | ||
24 | nodeamon = False | ||
diff --git a/meta-oe/recipes-connectivity/lirc/lirc/lircd.conf b/meta-oe/recipes-connectivity/lirc/lirc/lircd.conf new file mode 100644 index 000000000..29b03c72a --- /dev/null +++ b/meta-oe/recipes-connectivity/lirc/lirc/lircd.conf | |||
@@ -0,0 +1,315 @@ | |||
1 | # contributed by angelo castello | ||
2 | # | ||
3 | # note: this config file has been deduced starting from the | ||
4 | # raw codes provided to run mode2 utility. | ||
5 | # | ||
6 | # brand: futarque | ||
7 | |||
8 | begin remote | ||
9 | name futarque | ||
10 | bits 8 | ||
11 | flags SPACE_ENC|CONST_LENGTH | ||
12 | eps 30 | ||
13 | aeps 100 | ||
14 | |||
15 | header 8048 3898 | ||
16 | one 555 1436 | ||
17 | zero 555 439 | ||
18 | gap 113123 | ||
19 | ptrail 555 | ||
20 | pre_data_bits 8 | ||
21 | pre_data 0x54 | ||
22 | pre 570 3890 | ||
23 | |||
24 | begin codes | ||
25 | MUTE 0x70 | ||
26 | EXIT 0xA8 | ||
27 | POWER 0xF0 | ||
28 | CHANNEL_UP 0x50 | ||
29 | CHANNEL_DOWN 0xD0 | ||
30 | VOLUME_UP 0x30 | ||
31 | VOLUME_DOWN 0xB0 | ||
32 | OK 0x98 | ||
33 | FAVORITES 0x04 | ||
34 | TEXT 0x68 | ||
35 | EPG 0xC8 | ||
36 | BACK 0x48 | ||
37 | MENU 0x88 | ||
38 | 1 0x00 | ||
39 | 2 0x80 | ||
40 | 3 0x40 | ||
41 | 4 0xC0 | ||
42 | 5 0x20 | ||
43 | 6 0xA0 | ||
44 | 7 0x60 | ||
45 | 8 0xE0 | ||
46 | 9 0x10 | ||
47 | 0 0x90 | ||
48 | PAUSE 0x84 | ||
49 | INFO 0x38 | ||
50 | RED 0xE8 | ||
51 | GREEN 0x08 | ||
52 | YELLOW 0x28 | ||
53 | BLUE 0x78 | ||
54 | UP 0xD8 | ||
55 | DOWN 0xB8 | ||
56 | REWIND 0x44 | ||
57 | FASTFORWARD 0x24 | ||
58 | PLAYPAUSE 0xC4 | ||
59 | STOP 0x64 | ||
60 | RECORD 0xA4 | ||
61 | AUDIO 0xE4 | ||
62 | TAPE 0x14 | ||
63 | DVD 0x94 | ||
64 | CAPITAL_A 0xF8 | ||
65 | CAPITAL_B 0x54 | ||
66 | end codes | ||
67 | |||
68 | end remote | ||
69 | |||
70 | # brand: STM PVR-1 | ||
71 | |||
72 | begin remote | ||
73 | name stm_pvr_1 | ||
74 | bits 16 | ||
75 | flags SPACE_ENC|CONST_LENGTH | ||
76 | eps 30 | ||
77 | aeps 150 | ||
78 | |||
79 | header 9000 4500 | ||
80 | one 572 1700 | ||
81 | zero 572 572 | ||
82 | ptrail 572 | ||
83 | repeat 9000 2200 | ||
84 | pre_data_bits 16 | ||
85 | pre_data 0xFE | ||
86 | gap 100000 | ||
87 | |||
88 | begin codes | ||
89 | POWER 0x00ff | ||
90 | FAVORITES 0x7887 | ||
91 | MUTE 0x28d7 | ||
92 | 0 0x708F | ||
93 | 1 0xc03f | ||
94 | 2 0x40bf | ||
95 | 3 0x807f | ||
96 | 4 0xe01f | ||
97 | 5 0x609f | ||
98 | 6 0xa05f | ||
99 | 7 0xd02f | ||
100 | 8 0x50af | ||
101 | 9 0x906f | ||
102 | INFO 0x38c7 | ||
103 | SUBTITLE 0xe817 | ||
104 | MENU 0x9867 | ||
105 | EXIT 0x20df | ||
106 | EPG 0xa857 | ||
107 | BACK 0x48b7 | ||
108 | CURSOR_UP 0x58a7 | ||
109 | CURSOR_DOWN 0xd827 | ||
110 | CURSOR_LEFT 0x8877 | ||
111 | CURSOR_RIGHT 0xb04f | ||
112 | OK 0x10ef | ||
113 | VOLUME_UP 0x22dd | ||
114 | VOLUME_DOWN 0x8a75 | ||
115 | CHANNEL_UP 0x12ed | ||
116 | CHANNEL_DOWN 0x4ab5 | ||
117 | TEXT 0xf00f | ||
118 | RADIO 0x926d | ||
119 | ZOOM 0x6897 | ||
120 | AUDIO 0x08f7 | ||
121 | RED 0x42bd | ||
122 | GREEN 0xa25d | ||
123 | YELLOW 0x827d | ||
124 | BLUE 0x02fd | ||
125 | CUSTOM0 0x52ad | ||
126 | CUSTOM1 0x30cf | ||
127 | PLAY 0x629d | ||
128 | PAUSE 0xb24d | ||
129 | PREVIOUS 0xc837 | ||
130 | NEXT 0xf807 | ||
131 | REWIND 0x32cd | ||
132 | FASTFORWARD 0x0af5 | ||
133 | AUX 0x7a85 | ||
134 | CUSTOM3 0xb847 | ||
135 | PIP 0x3ac5 | ||
136 | SWAP 0xba45 | ||
137 | end codes | ||
138 | |||
139 | end remote | ||
140 | |||
141 | # brand: STM DTV-2 | ||
142 | |||
143 | begin remote | ||
144 | |||
145 | name stm_dtv_2 | ||
146 | flags SHIFT_ENC|CONST_LENGTH | ||
147 | bits 13 | ||
148 | aeps 150 | ||
149 | |||
150 | one 850 850 | ||
151 | zero 850 850 | ||
152 | plead 850 | ||
153 | gap 67800 | ||
154 | toggle_bit 2 | ||
155 | |||
156 | begin codes | ||
157 | POWER 0x100C | ||
158 | FAVORITES 0x1015 | ||
159 | AUX 0x1038 | ||
160 | 1 0x1001 | ||
161 | 2 0x1002 | ||
162 | 3 0x1003 | ||
163 | 4 0x1004 | ||
164 | 5 0x1005 | ||
165 | 6 0x1006 | ||
166 | 7 0x1007 | ||
167 | 8 0x1008 | ||
168 | 9 0x1009 | ||
169 | PERIOD 0x1024 | ||
170 | 0 0x103E | ||
171 | BACK 0x1023 | ||
172 | MENU 0x1016 | ||
173 | INFO 0x100F | ||
174 | EPG 0x101E | ||
175 | EXIT 0x1018 | ||
176 | CURSOR_UP 0x1017 | ||
177 | CURSOR_DOWN 0x101D | ||
178 | CURSOR_LEFT 0x1019 | ||
179 | CURSOR_RIGHT 0x101B | ||
180 | OK 0x101A | ||
181 | VOLUME_UP 0x1010 | ||
182 | VOLUME_DOWN 0x1011 | ||
183 | CHANNEL_UP 0x1020 | ||
184 | CHANNEL_DOWN 0x1021 | ||
185 | TEXT 0x102E | ||
186 | SUBTITLE 0x103C | ||
187 | FREEZE 0x1014 | ||
188 | ZOOM 0x102B | ||
189 | RED 0x1028 | ||
190 | GREEN 0x102A | ||
191 | YELLOW 0x102F | ||
192 | BLUE 0x1030 | ||
193 | CUSTOM10 0x1022 | ||
194 | INTERNET 0x1027 | ||
195 | CUSTOM11 0x102C | ||
196 | AUDIO 0x1025 | ||
197 | RECORD 0x102D | ||
198 | PLAYPAUSE 0x1029 | ||
199 | STOP 0x1026 | ||
200 | CUSTOM1 0x101C | ||
201 | MUTE 0x100d | ||
202 | CUSTOM12 0x101F | ||
203 | PIP 0x100B | ||
204 | SWAP 0x100E | ||
205 | end codes | ||
206 | |||
207 | end remote | ||
208 | |||
209 | # brand: Comcast | ||
210 | # model no. of remote control: XR2 | ||
211 | # 32 bits for the pre-date (should be value 0x170F443E) | ||
212 | # width between pre_bits and data: 12900 microseconds | ||
213 | # | ||
214 | # 24 bits for the data (key code) | ||
215 | # To get key REPEAT, XOR 0x088 with KEY value | ||
216 | # There are 8 post bits (both should be zero) | ||
217 | # | ||
218 | # Gap between keys: 8100 microseconds | ||
219 | begin remote | ||
220 | |||
221 | name Xfinity-XR2 | ||
222 | bits 24 | ||
223 | flags XMP | ||
224 | eps 20 | ||
225 | aeps 300 | ||
226 | |||
227 | one 0 137 | ||
228 | zero 250 710 | ||
229 | ptrail 250 | ||
230 | pre_data_bits 32 | ||
231 | pre_data 0x170F443E | ||
232 | post_data_bits 8 | ||
233 | post_data 0x0 | ||
234 | pre 250 12921 | ||
235 | gap 81698 | ||
236 | toggle_bit_mask 0x0 | ||
237 | |||
238 | begin codes | ||
239 | 1 0x1E0001 | ||
240 | 1_repeat 0x168001 | ||
241 | 2 0x1D0002 | ||
242 | 2_repeat 0x158002 | ||
243 | 3 0x1C0003 | ||
244 | 3_repeat 0x148003 | ||
245 | 4 0x1B0004 | ||
246 | 4_repeat 0x138004 | ||
247 | 5 0x1A0005 | ||
248 | 5_repeat 0x128005 | ||
249 | 6 0x190006 | ||
250 | 6_repeat 0x118006 | ||
251 | 7 0x180007 | ||
252 | 7_repeat 0x108007 | ||
253 | 8 0x170008 | ||
254 | 8_repeat 0x1F8008 | ||
255 | 9 0x160009 | ||
256 | 9_repeat 0x1E8009 | ||
257 | 0 0x1F0000 | ||
258 | 0_repeat 0x178000 | ||
259 | OK 0x180025 | ||
260 | OK_repeat 0x108025 | ||
261 | POWER 0x10000F | ||
262 | POWER_repeat 0x18800F | ||
263 | UP 0x1C0021 | ||
264 | UP_repeat 0x148021 | ||
265 | DOWN 0x1B0022 | ||
266 | DOWN_repeat 0x138022 | ||
267 | LEFT 0x1A0023 | ||
268 | LEFT_repeat 0x128023 | ||
269 | RIGHT 0x190024 | ||
270 | RIGHT_repeat 0x118024 | ||
271 | REWIND 0x190033 | ||
272 | REWIND_repeat 0x118033 | ||
273 | PLAY 0x1C0030 | ||
274 | PLAY_repeat 0x148030 | ||
275 | FASTFORWARD 0x180034 | ||
276 | FASTFORWARD_repeat 0x108034 | ||
277 | RECORD 0x170035 | ||
278 | RECORD_repeat 0x1F8035 | ||
279 | REPLAY 0x170053 | ||
280 | REPLAY_repeat 0x1F8053 | ||
281 | A 0x190060 | ||
282 | A_repeat 0x118060 | ||
283 | B 0x180061 | ||
284 | B_repeat 0x108061 | ||
285 | C 0x170062 | ||
286 | C_repeat 0x1F8062 | ||
287 | D 0x160063 | ||
288 | D_repeat 0x1E8063 | ||
289 | PAGE_UP 0x150028 | ||
290 | PAGE_UP_repeat 0x1D8028 | ||
291 | PAGE_DOWN 0x140029 | ||
292 | PAGE_DOWN_repeat 0x1C8029 | ||
293 | GUIDE 0x160027 | ||
294 | GUIDE_repeat 0x1E8027 | ||
295 | MENU 0x1D0020 | ||
296 | MENU_repeat 0x158020 | ||
297 | EXIT 0x13002A | ||
298 | EXIT_repeat 0x1B802A | ||
299 | INFO 0x170026 | ||
300 | INFO_repeat 0x1F8026 | ||
301 | LAST 0x190051 | ||
302 | LAST_repeat 0x118051 | ||
303 | VOLUME_UP 0x15000A | ||
304 | VOLUME_UP_repeat 0x1D800A | ||
305 | CHANNEL_UP 0x12000D | ||
306 | CHANNEL_UP_repeat 0x1A800D | ||
307 | VOLUME_DOWN 0x14000B | ||
308 | VOLUME_DOWN_repeat 0x1C800B | ||
309 | CHANNEL_DOWN 0x11000E | ||
310 | CHANNEL_DOWN_repeat 0x19800E | ||
311 | MUTE 0x13000C | ||
312 | MUTE_repeat 0x1B800D | ||
313 | end codes | ||
314 | |||
315 | end remote | ||
diff --git a/meta-oe/recipes-connectivity/lirc/lirc/lircd.init b/meta-oe/recipes-connectivity/lirc/lirc/lircd.init new file mode 100644 index 000000000..8b124af6f --- /dev/null +++ b/meta-oe/recipes-connectivity/lirc/lirc/lircd.init | |||
@@ -0,0 +1,40 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # This is an init script for Familiar | ||
4 | # Copy it to /etc/init.d/lircd and type | ||
5 | # > update-rc.d lircd defaults 20 | ||
6 | # | ||
7 | |||
8 | |||
9 | test -f /usr/sbin/lircd || exit 0 | ||
10 | test -f /etc/lircd.conf || exit 0 | ||
11 | |||
12 | case "$1" in | ||
13 | start) | ||
14 | echo -n "Starting lirc daemon: lircd" | ||
15 | start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc0 | ||
16 | echo "." | ||
17 | ;; | ||
18 | stop) | ||
19 | echo -n "Stopping lirc daemon: lircd" | ||
20 | start-stop-daemon --stop --quiet --exec /usr/sbin/lircd | ||
21 | echo "." | ||
22 | ;; | ||
23 | reload|force-reload) | ||
24 | start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd | ||
25 | ;; | ||
26 | restart) | ||
27 | echo -n "Stopping lirc daemon: lircd" | ||
28 | start-stop-daemon --stop --quiet --exec /usr/sbin/lircd | ||
29 | sleep 1 | ||
30 | echo -n "Starting lirc daemon: lircd" | ||
31 | start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc0 | ||
32 | echo "." | ||
33 | ;; | ||
34 | *) | ||
35 | echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}" | ||
36 | exit 1 | ||
37 | esac | ||
38 | |||
39 | exit 0 | ||
40 | |||
diff --git a/meta-oe/recipes-connectivity/lirc/lirc/lircd.service b/meta-oe/recipes-connectivity/lirc/lirc/lircd.service new file mode 100644 index 000000000..c8661368b --- /dev/null +++ b/meta-oe/recipes-connectivity/lirc/lirc/lircd.service | |||
@@ -0,0 +1,20 @@ | |||
1 | [Unit] | ||
2 | Description=LIRC Infrared Signal Decoder | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | EnvironmentFile=/etc/lirc/lircd.conf | ||
8 | PIDFile=/run/lirc/lircd.pid | ||
9 | ExecStartPre=/bin/mkdir -p /run/lirc | ||
10 | ExecStartPre=/bin/rm -f /dev/lircd | ||
11 | ExecStartPre=/bin/rm -f /run/lirc/lircd | ||
12 | ExecStartPre=/bin/ln -s /run/lirc/lircd /dev/lircd | ||
13 | |||
14 | ExecStart=/usr/sbin/lircd --pidfile=/run/lirc/lircd.pid --device=/dev/lirc0 | ||
15 | |||
16 | ExecStopPost=/bin/rm -f /dev/lircd | ||
17 | ExecStopPost=/bin/rm -fR /run/lirc | ||
18 | |||
19 | [Install] | ||
20 | WantedBy=multi-user.target | ||
diff --git a/meta-oe/recipes-connectivity/lirc/lirc/lircexec.init b/meta-oe/recipes-connectivity/lirc/lirc/lircexec.init new file mode 100644 index 000000000..3a8c1a306 --- /dev/null +++ b/meta-oe/recipes-connectivity/lirc/lirc/lircexec.init | |||
@@ -0,0 +1,37 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # This is an init script for Familiar | ||
4 | # Copy it to /etc/init.d/lircexecd and type | ||
5 | # > update-rc.d lircexecd defaults 20 | ||
6 | # It must be started after lircd (and it does alphabetically :-) | ||
7 | # irexec reads /etc/lircrc by default | ||
8 | |||
9 | |||
10 | test -f /usr/bin/irexec || exit 0 | ||
11 | test -f /etc/lircrc || exit 0 | ||
12 | |||
13 | case "$1" in | ||
14 | start) | ||
15 | echo -n "Starting lircexec daemon: irexec" | ||
16 | start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon | ||
17 | echo "." | ||
18 | ;; | ||
19 | stop) | ||
20 | echo -n "Stopping lircexec daemon: irexec" | ||
21 | start-stop-daemon --stop --quiet --exec /usr/bin/irexec | ||
22 | echo "." | ||
23 | ;; | ||
24 | restart|force-restart) | ||
25 | echo -n "Stopping lircexec daemon: irexec" | ||
26 | start-stop-daemon --stop --quiet --exec /usr/bin/irexec | ||
27 | sleep 1 | ||
28 | echo -n "Starting lircexec daemon: irexec" | ||
29 | start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon | ||
30 | echo "." | ||
31 | ;; | ||
32 | *) | ||
33 | echo "Usage: /etc/init.d/lircexec {start|stop|reload|restart|force-restart}" | ||
34 | exit 1 | ||
35 | esac | ||
36 | |||
37 | exit 0 | ||
diff --git a/meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb b/meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb new file mode 100644 index 000000000..24374c149 --- /dev/null +++ b/meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb | |||
@@ -0,0 +1,66 @@ | |||
1 | require lirc.inc | ||
2 | |||
3 | SRC_URI += " \ | ||
4 | file://lircd.service \ | ||
5 | file://lircd.init \ | ||
6 | file://lircexec.init \ | ||
7 | file://lircd.conf \ | ||
8 | file://lirc_options.conf \ | ||
9 | file://lirc.tmpfiles \ | ||
10 | " | ||
11 | #file://0001-Adaptation-for-STM-configuration.patch \ | ||
12 | # | ||
13 | SRC_URI[md5sum] = "3afc84e79c0839823cc20e7a710dd06d" | ||
14 | SRC_URI[sha256sum] = "4e3f948fcdee6dce009171143f0cb7cd7be48593dd58138db4101a41f651a1dd" | ||
15 | |||
16 | SYSTEMD_PACKAGES = "lirc" | ||
17 | SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service" | ||
18 | SYSTEMD_AUTO_ENABLE_lirc = "enable" | ||
19 | |||
20 | inherit autotools pkgconfig systemd pythonnative | ||
21 | |||
22 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir" | ||
23 | |||
24 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
25 | |||
26 | #EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"' | ||
27 | do_install_append() { | ||
28 | install -m 0755 -d ${D}${sysconfdir} | ||
29 | install -m 0755 -d ${D}${sysconfdir}/lirc | ||
30 | install -m 0755 -d ${D}${systemd_unitdir}/system | ||
31 | install -m 0755 -d ${D}${libdir}/tmpfiles.d | ||
32 | install -m 0644 ${WORKDIR}/lircd.conf ${D}${sysconfdir}/lirc/ | ||
33 | install -m 0644 ${WORKDIR}/lirc_options.conf ${D}${sysconfdir}/lirc/ | ||
34 | install -m 0644 ${WORKDIR}/lircd.service ${D}${systemd_unitdir}/system/ | ||
35 | install -m 0755 ${WORKDIR}/lircexec.init ${D}${systemd_unitdir}/system/ | ||
36 | install -m 0644 ${WORKDIR}/lirc.tmpfiles ${D}${libdir}/tmpfiles.d/lirc.conf | ||
37 | rm -rf ${D}${libdir}/lirc/plugins/*.la | ||
38 | rmdir ${D}/var/run/lirc ${D}/var/run | ||
39 | } | ||
40 | |||
41 | PACKAGES =+ "${PN}-contrib ${PN}-exec ${PN}-plugins ${PN}-python" | ||
42 | |||
43 | RDEPENDS_${PN}-exec = "lirc" | ||
44 | RDEPENDS_${PN}-python = "python" | ||
45 | |||
46 | RRECOMMENDS_lirc = "lirc-exec" | ||
47 | |||
48 | FILES_${PN}-plugins = "${libdir}/lirc/plugins/*.so ${datadir}/lirc/configs" | ||
49 | FILES_${PN}-contrib = "${datadir}/lirc/contrib" | ||
50 | FILES_${PN}-exec = "${bindir}/irexec ${sysconfdir}/lircexec" | ||
51 | FILES_${PN} += "${systemd_unitdir}/system/lircexec.init" | ||
52 | FILES_${PN} += "${systemd_unitdir}/system/lircd.service" | ||
53 | FILES_${PN} += "${systemd_unitdir}/system/lircd.socket" | ||
54 | FILES_${PN} += "${libdir}/tmpfiles.d/lirc.conf" | ||
55 | FILES_${PN}-dbg += "${libdir}/lirc/plugins/.debug" | ||
56 | FILES_${PN}-python += "${libdir}/python*/site-packages" | ||
57 | |||
58 | |||
59 | INITSCRIPT_PACKAGES = "lirc lirc-exec" | ||
60 | INITSCRIPT_NAME_lirc-exec = "lircexec" | ||
61 | INITSCRIPT_PARAMS_lirc-exec = "defaults 21" | ||
62 | |||
63 | # this is for distributions that don't use udev | ||
64 | pkg_postinst_${PN}_append() { | ||
65 | if [ ! -c $D/dev/lirc -a ! -f /sbin/udevd ]; then mknod $D/dev/lirc c 61 0; fi | ||
66 | } | ||