blob: 606caee8928792b0486d21a7c408ab072498b40f [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls."
2DESCRIPTION_append_lirc = " This package contains the lirc daemon, libraries and tools."
3DESCRIPTION_append_lirc-exec = " This package contains a daemon that runs programs on IR signals."
4DESCRIPTION_append_lirc-remotes = " This package contains some config files for remotes."
5DESCRIPTION_append_lirc-nslu2example = " This package contains a working config for RC5 remotes and a modified NSLU2."
6HOMEPAGE = "http://www.lirc.org"
7SECTION = "console/network"
8LICENSE = "GPLv2"
9DEPENDS = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19"
10
11
12LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
13
14SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \
15 file://pollfd.patch \
Brad Bishope42b3e32020-01-15 22:08:42 -050016 file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050017 file://lircd.service \
18 file://lircd.init \
19 file://lircexec.init \
20 file://lircd.conf \
21 file://lirc_options.conf \
22 file://lirc.tmpfiles \
23"
24SRC_URI[md5sum] = "0d11679cbdd94a5a6da00a8e7231b4bf"
25SRC_URI[sha256sum] = "c68f18c35b489b865c0a741d119b136e8702191538cd3551b977a7af6c4e41ab"
26
27SYSTEMD_PACKAGES = "lirc lirc-exec"
28SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service lircd-setup.service lircd-uinput.service"
29SYSTEMD_SERVICE_${PN}-exec = "irexec.service"
30SYSTEMD_AUTO_ENABLE_lirc = "enable"
31SYSTEMD_AUTO_ENABLE_lirc-exec = "enable"
32
33inherit autotools pkgconfig systemd python3native
34
35PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd"
36PACKAGECONFIG[x11] = "--with-x,--with-x=no,libx11,"
37
38PACKAGECONFIG ?= " \
39 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)} \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)} \
41"
42CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes"
43
44#EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"'
45do_install_append() {
46 install -m 0755 -d ${D}${sysconfdir}
47 install -m 0755 -d ${D}${sysconfdir}/lirc
48 install -m 0755 -d ${D}${systemd_unitdir}/system
49 install -m 0755 -d ${D}${libdir}/tmpfiles.d
50 install -m 0644 ${WORKDIR}/lircd.conf ${D}${sysconfdir}/lirc/
51 install -m 0644 ${WORKDIR}/lirc_options.conf ${D}${sysconfdir}/lirc/
52 install -m 0644 ${WORKDIR}/lircd.service ${D}${systemd_unitdir}/system/
53 install -m 0755 ${WORKDIR}/lircexec.init ${D}${systemd_unitdir}/system/
54 install -m 0644 ${WORKDIR}/lirc.tmpfiles ${D}${libdir}/tmpfiles.d/lirc.conf
55 rm -rf ${D}${libdir}/lirc/plugins/*.la
56 rmdir ${D}/var/run/lirc ${D}/var/run
57 chown -R root:root ${D}${datadir}/lirc/contrib
58}
59
60PACKAGES =+ "${PN}-contrib ${PN}-exec ${PN}-plugins ${PN}-python"
61
62RDEPENDS_${PN} = "bash"
63RDEPENDS_${PN}-exec = "${PN}"
64RDEPENDS_${PN}-python = "python"
65
66RRECOMMENDS_lirc = "${PN}-exec ${PN}-plugins"
67
68FILES_${PN}-plugins = "${libdir}/lirc/plugins/*.so ${datadir}/lirc/configs"
69FILES_${PN}-contrib = "${datadir}/lirc/contrib"
70FILES_${PN}-exec = "${bindir}/irexec ${sysconfdir}/lircexec ${systemd_unitdir}/system/irexec.service"
71FILES_${PN} += "${systemd_unitdir}/system/lircexec.init"
72FILES_${PN} += "${systemd_unitdir}/system/lircd.service"
73FILES_${PN} += "${systemd_unitdir}/system/lircd.socket"
74FILES_${PN} += "${libdir}/tmpfiles.d/lirc.conf"
75FILES_${PN}-dbg += "${libdir}/lirc/plugins/.debug"
76FILES_${PN}-python += "${libdir}/python*/site-packages"
77
78
79INITSCRIPT_PACKAGES = "lirc lirc-exec"
80INITSCRIPT_NAME_lirc-exec = "lircexec"
81INITSCRIPT_PARAMS_lirc-exec = "defaults 21"
82
83# this is for distributions that don't use udev
84pkg_postinst_${PN}_append() {
85 if [ ! -c $D/dev/lirc -a ! -f /sbin/udevd ]; then mknod $D/dev/lirc c 61 0; fi
86}
87
88SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"