From 82c905dc58a36aeae40b1b273a12f63fb1973cf4 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Mon, 13 Apr 2020 13:39:40 -0500 Subject: meta-openembedded and poky: subtree updates Squash of the following due to dependencies among them and OpenBMC changes: meta-openembedded: subtree update:d0748372d2..9201611135 meta-openembedded: subtree update:9201611135..17fd382f34 poky: subtree update:9052e5b32a..2e11d97b6c poky: subtree update:2e11d97b6c..a8544811d7 The change log was too large for the jenkins plugin to handle therefore it has been removed. Here is the first and last commit of each subtree: meta-openembedded:d0748372d2 cppzmq: bump to version 4.6.0 meta-openembedded:17fd382f34 mpv: Remove X11 dependency poky:9052e5b32a package_ipk: Remove pointless comment to trigger rebuild poky:a8544811d7 pbzip2: Fix license warning Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6 Signed-off-by: Andrew Geissler --- ...x-build-on-32bit-arches-with-64bit-time_t.patch | 40 +++ .../recipes-connectivity/lirc/lirc/lirc.tmpfiles | 1 + .../lirc/lirc/lirc_options.conf | 24 ++ .../recipes-connectivity/lirc/lirc/lircd.conf | 315 +++++++++++++++++++++ .../recipes-connectivity/lirc/lirc/lircd.init | 40 +++ .../recipes-connectivity/lirc/lirc/lircd.service | 20 ++ .../recipes-connectivity/lirc/lirc/lircexec.init | 37 +++ .../recipes-connectivity/lirc/lirc/pollfd.patch | 101 +++++++ .../recipes-connectivity/lirc/lirc_0.9.4d.bb | 86 ++++++ 9 files changed, 664 insertions(+) create mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch create mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc.tmpfiles create mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc_options.conf create mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.conf create mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.init create mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.service create mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircexec.init create mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/pollfd.patch create mode 100644 meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.9.4d.bb (limited to 'meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc') diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file mode 100644 index 000000000..0e38f7d8e --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch @@ -0,0 +1,40 @@ +From 50a48a7bd8d65a165ce2aac4ba0c1e02bded04aa Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 30 Nov 2019 12:21:31 -0800 +Subject: [PATCH] Fix build on 32bit arches with 64bit time_t + +time element is deprecated on new input_event structure in kernel's +input.h [1] + +[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f + +Signed-off-by: Khem Raj +--- + plugins/devinput.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/plugins/devinput.c b/plugins/devinput.c +index d4d733a..feb4a61 100644 +--- a/plugins/devinput.c ++++ b/plugins/devinput.c +@@ -34,6 +34,11 @@ + #include + #include + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + #ifndef EV_SYN + /* previous name */ + #define EV_SYN EV_RST +@@ -459,7 +464,7 @@ char* devinput_rec(struct ir_remote* remotes) + return 0; + } + +- log_trace("time %ld.%06ld type %d code %d value %d", event.time.tv_sec, event.time.tv_usec, event.type, ++ log_trace("time %ld.%06ld type %d code %d value %d", event.input_event_sec, event.input_event_usec, event.type, + event.code, event.value); + + value = (unsigned)event.value; diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc.tmpfiles b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc.tmpfiles new file mode 100644 index 000000000..0b80e2e47 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc.tmpfiles @@ -0,0 +1 @@ +d /run/lirc 0755 root root - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc_options.conf b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc_options.conf new file mode 100644 index 000000000..d8ddedd8f --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lirc_options.conf @@ -0,0 +1,24 @@ +# These are the default options to lircd, if installed as +# /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8) +# manpages for info on the different options. + +[lircd] +nodaemon = False +permission = 666 +driver = default +device = /dev/lirc0 +output = /var/run/lirc/lircd +pidfile = /var/run/lirc/lircd.pid +plugindir = /usr/lib/lirc/plugins +allow-simulate = No +repeat-max = 600 +#listen = [address:]port +#connect = host[:port] +#debug = 5 +#uinput = ... +#release = ... +#logfile = ... + +[lircmd] +uinput = False +nodeamon = False diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.conf b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.conf new file mode 100644 index 000000000..29b03c72a --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.conf @@ -0,0 +1,315 @@ +# contributed by angelo castello +# +# note: this config file has been deduced starting from the +# raw codes provided to run mode2 utility. +# +# brand: futarque + +begin remote + name futarque + bits 8 + flags SPACE_ENC|CONST_LENGTH + eps 30 + aeps 100 + + header 8048 3898 + one 555 1436 + zero 555 439 + gap 113123 + ptrail 555 + pre_data_bits 8 + pre_data 0x54 + pre 570 3890 + + begin codes + MUTE 0x70 + EXIT 0xA8 + POWER 0xF0 + CHANNEL_UP 0x50 + CHANNEL_DOWN 0xD0 + VOLUME_UP 0x30 + VOLUME_DOWN 0xB0 + OK 0x98 + FAVORITES 0x04 + TEXT 0x68 + EPG 0xC8 + BACK 0x48 + MENU 0x88 + 1 0x00 + 2 0x80 + 3 0x40 + 4 0xC0 + 5 0x20 + 6 0xA0 + 7 0x60 + 8 0xE0 + 9 0x10 + 0 0x90 + PAUSE 0x84 + INFO 0x38 + RED 0xE8 + GREEN 0x08 + YELLOW 0x28 + BLUE 0x78 + UP 0xD8 + DOWN 0xB8 + REWIND 0x44 + FASTFORWARD 0x24 + PLAYPAUSE 0xC4 + STOP 0x64 + RECORD 0xA4 + AUDIO 0xE4 + TAPE 0x14 + DVD 0x94 + CAPITAL_A 0xF8 + CAPITAL_B 0x54 + end codes + +end remote + +# brand: STM PVR-1 + +begin remote + name stm_pvr_1 + bits 16 + flags SPACE_ENC|CONST_LENGTH + eps 30 + aeps 150 + + header 9000 4500 + one 572 1700 + zero 572 572 + ptrail 572 + repeat 9000 2200 + pre_data_bits 16 + pre_data 0xFE + gap 100000 + + begin codes + POWER 0x00ff + FAVORITES 0x7887 + MUTE 0x28d7 + 0 0x708F + 1 0xc03f + 2 0x40bf + 3 0x807f + 4 0xe01f + 5 0x609f + 6 0xa05f + 7 0xd02f + 8 0x50af + 9 0x906f + INFO 0x38c7 + SUBTITLE 0xe817 + MENU 0x9867 + EXIT 0x20df + EPG 0xa857 + BACK 0x48b7 + CURSOR_UP 0x58a7 + CURSOR_DOWN 0xd827 + CURSOR_LEFT 0x8877 + CURSOR_RIGHT 0xb04f + OK 0x10ef + VOLUME_UP 0x22dd + VOLUME_DOWN 0x8a75 + CHANNEL_UP 0x12ed + CHANNEL_DOWN 0x4ab5 + TEXT 0xf00f + RADIO 0x926d + ZOOM 0x6897 + AUDIO 0x08f7 + RED 0x42bd + GREEN 0xa25d + YELLOW 0x827d + BLUE 0x02fd + CUSTOM0 0x52ad + CUSTOM1 0x30cf + PLAY 0x629d + PAUSE 0xb24d + PREVIOUS 0xc837 + NEXT 0xf807 + REWIND 0x32cd + FASTFORWARD 0x0af5 + AUX 0x7a85 + CUSTOM3 0xb847 + PIP 0x3ac5 + SWAP 0xba45 + end codes + +end remote + +# brand: STM DTV-2 + +begin remote + + name stm_dtv_2 + flags SHIFT_ENC|CONST_LENGTH + bits 13 + aeps 150 + + one 850 850 + zero 850 850 + plead 850 + gap 67800 + toggle_bit 2 + + begin codes + POWER 0x100C + FAVORITES 0x1015 + AUX 0x1038 + 1 0x1001 + 2 0x1002 + 3 0x1003 + 4 0x1004 + 5 0x1005 + 6 0x1006 + 7 0x1007 + 8 0x1008 + 9 0x1009 + PERIOD 0x1024 + 0 0x103E + BACK 0x1023 + MENU 0x1016 + INFO 0x100F + EPG 0x101E + EXIT 0x1018 + CURSOR_UP 0x1017 + CURSOR_DOWN 0x101D + CURSOR_LEFT 0x1019 + CURSOR_RIGHT 0x101B + OK 0x101A + VOLUME_UP 0x1010 + VOLUME_DOWN 0x1011 + CHANNEL_UP 0x1020 + CHANNEL_DOWN 0x1021 + TEXT 0x102E + SUBTITLE 0x103C + FREEZE 0x1014 + ZOOM 0x102B + RED 0x1028 + GREEN 0x102A + YELLOW 0x102F + BLUE 0x1030 + CUSTOM10 0x1022 + INTERNET 0x1027 + CUSTOM11 0x102C + AUDIO 0x1025 + RECORD 0x102D + PLAYPAUSE 0x1029 + STOP 0x1026 + CUSTOM1 0x101C + MUTE 0x100d + CUSTOM12 0x101F + PIP 0x100B + SWAP 0x100E + end codes + +end remote + +# brand: Comcast +# model no. of remote control: XR2 +# 32 bits for the pre-date (should be value 0x170F443E) +# width between pre_bits and data: 12900 microseconds +# +# 24 bits for the data (key code) +# To get key REPEAT, XOR 0x088 with KEY value +# There are 8 post bits (both should be zero) +# +# Gap between keys: 8100 microseconds +begin remote + + name Xfinity-XR2 + bits 24 + flags XMP + eps 20 + aeps 300 + + one 0 137 + zero 250 710 + ptrail 250 + pre_data_bits 32 + pre_data 0x170F443E + post_data_bits 8 + post_data 0x0 + pre 250 12921 + gap 81698 + toggle_bit_mask 0x0 + + begin codes + 1 0x1E0001 + 1_repeat 0x168001 + 2 0x1D0002 + 2_repeat 0x158002 + 3 0x1C0003 + 3_repeat 0x148003 + 4 0x1B0004 + 4_repeat 0x138004 + 5 0x1A0005 + 5_repeat 0x128005 + 6 0x190006 + 6_repeat 0x118006 + 7 0x180007 + 7_repeat 0x108007 + 8 0x170008 + 8_repeat 0x1F8008 + 9 0x160009 + 9_repeat 0x1E8009 + 0 0x1F0000 + 0_repeat 0x178000 + OK 0x180025 + OK_repeat 0x108025 + POWER 0x10000F + POWER_repeat 0x18800F + UP 0x1C0021 + UP_repeat 0x148021 + DOWN 0x1B0022 + DOWN_repeat 0x138022 + LEFT 0x1A0023 + LEFT_repeat 0x128023 + RIGHT 0x190024 + RIGHT_repeat 0x118024 + REWIND 0x190033 + REWIND_repeat 0x118033 + PLAY 0x1C0030 + PLAY_repeat 0x148030 + FASTFORWARD 0x180034 + FASTFORWARD_repeat 0x108034 + RECORD 0x170035 + RECORD_repeat 0x1F8035 + REPLAY 0x170053 + REPLAY_repeat 0x1F8053 + A 0x190060 + A_repeat 0x118060 + B 0x180061 + B_repeat 0x108061 + C 0x170062 + C_repeat 0x1F8062 + D 0x160063 + D_repeat 0x1E8063 + PAGE_UP 0x150028 + PAGE_UP_repeat 0x1D8028 + PAGE_DOWN 0x140029 + PAGE_DOWN_repeat 0x1C8029 + GUIDE 0x160027 + GUIDE_repeat 0x1E8027 + MENU 0x1D0020 + MENU_repeat 0x158020 + EXIT 0x13002A + EXIT_repeat 0x1B802A + INFO 0x170026 + INFO_repeat 0x1F8026 + LAST 0x190051 + LAST_repeat 0x118051 + VOLUME_UP 0x15000A + VOLUME_UP_repeat 0x1D800A + CHANNEL_UP 0x12000D + CHANNEL_UP_repeat 0x1A800D + VOLUME_DOWN 0x14000B + VOLUME_DOWN_repeat 0x1C800B + CHANNEL_DOWN 0x11000E + CHANNEL_DOWN_repeat 0x19800E + MUTE 0x13000C + MUTE_repeat 0x1B800D + end codes + +end remote diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.init b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.init new file mode 100644 index 000000000..8b124af6f --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.init @@ -0,0 +1,40 @@ +#! /bin/sh +# +# This is an init script for Familiar +# Copy it to /etc/init.d/lircd and type +# > update-rc.d lircd defaults 20 +# + + +test -f /usr/sbin/lircd || exit 0 +test -f /etc/lircd.conf || exit 0 + +case "$1" in + start) + echo -n "Starting lirc daemon: lircd" + start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc0 + echo "." + ;; + stop) + echo -n "Stopping lirc daemon: lircd" + start-stop-daemon --stop --quiet --exec /usr/sbin/lircd + echo "." + ;; + reload|force-reload) + start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd + ;; + restart) + echo -n "Stopping lirc daemon: lircd" + start-stop-daemon --stop --quiet --exec /usr/sbin/lircd + sleep 1 + echo -n "Starting lirc daemon: lircd" + start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc0 + echo "." + ;; + *) + echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}" + exit 1 +esac + +exit 0 + diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.service b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.service new file mode 100644 index 000000000..c8661368b --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircd.service @@ -0,0 +1,20 @@ +[Unit] +Description=LIRC Infrared Signal Decoder +After=network.target + +[Service] +Type=forking +EnvironmentFile=/etc/lirc/lircd.conf +PIDFile=/run/lirc/lircd.pid +ExecStartPre=/bin/mkdir -p /run/lirc +ExecStartPre=/bin/rm -f /dev/lircd +ExecStartPre=/bin/rm -f /run/lirc/lircd +ExecStartPre=/bin/ln -s /run/lirc/lircd /dev/lircd + +ExecStart=/usr/sbin/lircd --pidfile=/run/lirc/lircd.pid --device=/dev/lirc0 + +ExecStopPost=/bin/rm -f /dev/lircd +ExecStopPost=/bin/rm -fR /run/lirc + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircexec.init b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircexec.init new file mode 100644 index 000000000..3a8c1a306 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/lircexec.init @@ -0,0 +1,37 @@ +#! /bin/sh +# +# This is an init script for Familiar +# Copy it to /etc/init.d/lircexecd and type +# > update-rc.d lircexecd defaults 20 +# It must be started after lircd (and it does alphabetically :-) +# irexec reads /etc/lircrc by default + + +test -f /usr/bin/irexec || exit 0 +test -f /etc/lircrc || exit 0 + +case "$1" in + start) + echo -n "Starting lircexec daemon: irexec" + start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon + echo "." + ;; + stop) + echo -n "Stopping lircexec daemon: irexec" + start-stop-daemon --stop --quiet --exec /usr/bin/irexec + echo "." + ;; + restart|force-restart) + echo -n "Stopping lircexec daemon: irexec" + start-stop-daemon --stop --quiet --exec /usr/bin/irexec + sleep 1 + echo -n "Starting lircexec daemon: irexec" + start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon + echo "." + ;; + *) + echo "Usage: /etc/init.d/lircexec {start|stop|reload|restart|force-restart}" + exit 1 +esac + +exit 0 diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/pollfd.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/pollfd.patch new file mode 100644 index 000000000..4feea8034 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/pollfd.patch @@ -0,0 +1,101 @@ +Index: lirc-0.9.4d/daemons/lircrcd.cpp +=================================================================== +--- lirc-0.9.4d.orig/daemons/lircrcd.cpp ++++ lirc-0.9.4d/daemons/lircrcd.cpp +@@ -29,10 +29,12 @@ + #include + #include + #include ++#include + #include + + #include "lirc_client.h" + #include "lirc/lirc_log.h" ++#include "lirc/curl_poll.h" + + #define MAX_CLIENTS 100 + #define WHITE_SPACE " \t" +Index: lirc-0.9.4d/lib/curl_poll.c +=================================================================== +--- lirc-0.9.4d.orig/lib/curl_poll.c ++++ lirc-0.9.4d/lib/curl_poll.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include "lirc_log.h" + #include "curl_poll.h" +@@ -67,7 +68,7 @@ static const logchannel_t logchannel = L + + #ifdef HAVE_POLL_FINE + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms) + { + return poll(ufds, nfds, timeout_ms); + } +@@ -112,7 +113,7 @@ static int verify_sock(int s) + } + + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms) + { + struct timeval pending_tv; + struct timeval* ptimeout; +Index: lirc-0.9.4d/lib/curl_poll.h +=================================================================== +--- lirc-0.9.4d.orig/lib/curl_poll.h ++++ lirc-0.9.4d/lib/curl_poll.h +@@ -1,5 +1,5 @@ +-#ifndef _POLL_H +-#define _POLL_H ++#ifndef _LIB_CURL_POLL_H ++#define _LIB_CURL_POLL_H + /*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | +@@ -29,13 +29,9 @@ + extern "C" { + #endif + +-#ifdef HAVE_SYS_POLL_H +-#include +-#else + #include +-#endif + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms); + + #ifdef __cplusplus + } +Index: lirc-0.9.4d/lib/lirc/curl_poll.h +=================================================================== +--- lirc-0.9.4d.orig/lib/lirc/curl_poll.h ++++ lirc-0.9.4d/lib/lirc/curl_poll.h +@@ -1,5 +1,5 @@ +-#ifndef _POLL_H +-#define _POLL_H ++#ifndef _LIRC_CURL_POLL_H ++#define _LIRC_CURL_POLL_H + /*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | +@@ -29,13 +29,9 @@ + extern "C" { + #endif + +-#ifdef HAVE_SYS_POLL_H +-#include +-#else + #include +-#endif + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms); + + #ifdef __cplusplus + } diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.9.4d.bb b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.9.4d.bb new file mode 100644 index 000000000..f59969673 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.9.4d.bb @@ -0,0 +1,86 @@ +DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls." +DESCRIPTION_append_lirc = " This package contains the lirc daemon, libraries and tools." +DESCRIPTION_append_lirc-exec = " This package contains a daemon that runs programs on IR signals." +DESCRIPTION_append_lirc-remotes = " This package contains some config files for remotes." +DESCRIPTION_append_lirc-nslu2example = " This package contains a working config for RC5 remotes and a modified NSLU2." +HOMEPAGE = "http://www.lirc.org" +SECTION = "console/network" +LICENSE = "GPLv2" +DEPENDS = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19 python3-pyyaml" + +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \ + file://pollfd.patch \ + file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ + file://lircd.service \ + file://lircd.init \ + file://lircexec.init \ + file://lircd.conf \ + file://lirc_options.conf \ + file://lirc.tmpfiles \ +" +SRC_URI[md5sum] = "0d11679cbdd94a5a6da00a8e7231b4bf" +SRC_URI[sha256sum] = "c68f18c35b489b865c0a741d119b136e8702191538cd3551b977a7af6c4e41ab" + +SYSTEMD_PACKAGES = "lirc lirc-exec" +SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service lircd-setup.service lircd-uinput.service" +SYSTEMD_SERVICE_${PN}-exec = "irexec.service" +SYSTEMD_AUTO_ENABLE_lirc = "enable" +SYSTEMD_AUTO_ENABLE_lirc-exec = "enable" + +inherit autotools pkgconfig systemd python3native + +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd" +PACKAGECONFIG[x11] = "--with-x,--with-x=no,libx11," + +PACKAGECONFIG ?= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)} \ +" +CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes" + +#EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"' +do_install_append() { + install -m 0755 -d ${D}${sysconfdir} + install -m 0755 -d ${D}${sysconfdir}/lirc + install -m 0755 -d ${D}${systemd_unitdir}/system + install -m 0755 -d ${D}${libdir}/tmpfiles.d + install -m 0644 ${WORKDIR}/lircd.conf ${D}${sysconfdir}/lirc/ + install -m 0644 ${WORKDIR}/lirc_options.conf ${D}${sysconfdir}/lirc/ + install -m 0644 ${WORKDIR}/lircd.service ${D}${systemd_unitdir}/system/ + install -m 0755 ${WORKDIR}/lircexec.init ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/lirc.tmpfiles ${D}${libdir}/tmpfiles.d/lirc.conf + rm -rf ${D}${libdir}/lirc/plugins/*.la + rmdir ${D}/var/run/lirc ${D}/var/run + chown -R root:root ${D}${datadir}/lirc/contrib +} + +PACKAGES =+ "${PN}-contrib ${PN}-exec ${PN}-plugins ${PN}-python" + +RDEPENDS_${PN} = "bash" +RDEPENDS_${PN}-exec = "${PN}" +RDEPENDS_${PN}-python = "python3-shell python3-pyyaml python3-datetime python3-netclient python3-stringold" + +RRECOMMENDS_${PN} = "${PN}-exec ${PN}-plugins" + +FILES_${PN}-plugins = "${libdir}/lirc/plugins/*.so ${datadir}/lirc/configs" +FILES_${PN}-contrib = "${datadir}/lirc/contrib" +FILES_${PN}-exec = "${bindir}/irexec ${sysconfdir}/lircexec ${systemd_unitdir}/system/irexec.service" +FILES_${PN} += "${systemd_unitdir}/system/lircexec.init" +FILES_${PN} += "${systemd_unitdir}/system/lircd.service" +FILES_${PN} += "${systemd_unitdir}/system/lircd.socket" +FILES_${PN} += "${libdir}/tmpfiles.d/lirc.conf" +FILES_${PN}-dbg += "${libdir}/lirc/plugins/.debug" +FILES_${PN}-python += "${bindir}/irdb-get ${bindir}/irtext2udp ${bindir}/lircd-setup ${bindir}/pronto2lirc ${libdir}/python*/site-packages" + +INITSCRIPT_PACKAGES = "lirc lirc-exec" +INITSCRIPT_NAME_lirc-exec = "lircexec" +INITSCRIPT_PARAMS_lirc-exec = "defaults 21" + +# this is for distributions that don't use udev +pkg_postinst_${PN}_append() { + if [ ! -c $D/dev/lirc -a ! -f /sbin/udevd ]; then mknod $D/dev/lirc c 61 0; fi +} + +SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" -- cgit v1.2.3