Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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 = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19" |
| 10 | |
| 11 | |
| 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 13 | |
| 14 | SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \ |
| 15 | file://pollfd.patch \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 16 | file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 17 | 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 | " |
| 24 | SRC_URI[md5sum] = "0d11679cbdd94a5a6da00a8e7231b4bf" |
| 25 | SRC_URI[sha256sum] = "c68f18c35b489b865c0a741d119b136e8702191538cd3551b977a7af6c4e41ab" |
| 26 | |
| 27 | SYSTEMD_PACKAGES = "lirc lirc-exec" |
| 28 | SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service lircd-setup.service lircd-uinput.service" |
| 29 | SYSTEMD_SERVICE_${PN}-exec = "irexec.service" |
| 30 | SYSTEMD_AUTO_ENABLE_lirc = "enable" |
| 31 | SYSTEMD_AUTO_ENABLE_lirc-exec = "enable" |
| 32 | |
| 33 | inherit autotools pkgconfig systemd python3native |
| 34 | |
| 35 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd" |
| 36 | PACKAGECONFIG[x11] = "--with-x,--with-x=no,libx11," |
| 37 | |
| 38 | PACKAGECONFIG ?= " \ |
| 39 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)} \ |
| 40 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)} \ |
| 41 | " |
| 42 | CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes" |
| 43 | |
| 44 | #EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"' |
| 45 | do_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 | |
| 60 | PACKAGES =+ "${PN}-contrib ${PN}-exec ${PN}-plugins ${PN}-python" |
| 61 | |
| 62 | RDEPENDS_${PN} = "bash" |
| 63 | RDEPENDS_${PN}-exec = "${PN}" |
| 64 | RDEPENDS_${PN}-python = "python" |
| 65 | |
| 66 | RRECOMMENDS_lirc = "${PN}-exec ${PN}-plugins" |
| 67 | |
| 68 | FILES_${PN}-plugins = "${libdir}/lirc/plugins/*.so ${datadir}/lirc/configs" |
| 69 | FILES_${PN}-contrib = "${datadir}/lirc/contrib" |
| 70 | FILES_${PN}-exec = "${bindir}/irexec ${sysconfdir}/lircexec ${systemd_unitdir}/system/irexec.service" |
| 71 | FILES_${PN} += "${systemd_unitdir}/system/lircexec.init" |
| 72 | FILES_${PN} += "${systemd_unitdir}/system/lircd.service" |
| 73 | FILES_${PN} += "${systemd_unitdir}/system/lircd.socket" |
| 74 | FILES_${PN} += "${libdir}/tmpfiles.d/lirc.conf" |
| 75 | FILES_${PN}-dbg += "${libdir}/lirc/plugins/.debug" |
| 76 | FILES_${PN}-python += "${libdir}/python*/site-packages" |
| 77 | |
| 78 | |
| 79 | INITSCRIPT_PACKAGES = "lirc lirc-exec" |
| 80 | INITSCRIPT_NAME_lirc-exec = "lircexec" |
| 81 | INITSCRIPT_PARAMS_lirc-exec = "defaults 21" |
| 82 | |
| 83 | # this is for distributions that don't use udev |
| 84 | pkg_postinst_${PN}_append() { |
| 85 | if [ ! -c $D/dev/lirc -a ! -f /sbin/udevd ]; then mknod $D/dev/lirc c 61 0; fi |
| 86 | } |
| 87 | |
| 88 | SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" |