blob: 037ce063e11f82f247a265df86d3e38a50b72a90 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "A lightweight hotkey daemon"
2HOMEPAGE = "https://github.com/wertarbyte/triggerhappy"
3
4LICENSE = "GPLv3"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
6
7SRC_URI = "https://github.com/wertarbyte/triggerhappy/archive/debian/0.5.0-1.tar.gz"
8
9SRC_URI[md5sum] = "77f90a18c775e47c4c5e9e08987ca32f"
10SRC_URI[sha256sum] = "9150bafbf7f2de7d57e6cc154676c33da98dc11ac6442e1ca57e5dce82bd4292"
11
12S = "${WORKDIR}/${PN}-debian-${PV}-1"
13
14inherit autotools-brokensep pkgconfig update-rc.d systemd
15
16PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"
17PACKAGECONFIG[systemd] = ",,systemd"
18
19INITSCRIPT_NAME = "triggerhappy"
20INITSCRIPT_PARAMS = "defaults"
21SYSTEMD_SERVICE_${PN} = "triggerhappy.service triggerhappy.socket"
22
23FILES_${PN} = "\
24${sbindir}/thd \
25${sbindir}/th-cmd \
26${sysconfdir}/triggerhappy/triggers.d \
27${nonarch_base_libdir}/udev/rules.d/80-triggerhappy.rules \
28${sysconfdir}/init.d/triggerhappy \
29${systemd_unitdir}/system \
30"
31CONFFILES_${PN} = "${sysconfdir}/udev/rules.d/80-triggerhappy.rules"
32
33do_install_append() {
34 install -d ${D}${sysconfdir}/triggerhappy/triggers.d
35
36 install -d ${D}${nonarch_base_libdir}/udev/rules.d
37 install -m 0644 ${S}/udev/triggerhappy-udev.rules ${D}${nonarch_base_libdir}/udev/rules.d/80-triggerhappy.rules
38
39 install -d ${D}${sysconfdir}/init.d
40 install -m 0755 ${S}/debian/init.d ${D}${sysconfdir}/init.d/triggerhappy
41
42 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
43 install -d ${D}/${systemd_unitdir}/system
44 install -m 0644 ${S}/systemd/triggerhappy.socket ${D}${systemd_unitdir}/system
45 install -m 0644 ${S}/systemd/triggerhappy.service ${D}${systemd_unitdir}/system
46 fi
47}