Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "A lightweight hotkey daemon" |
| 2 | HOMEPAGE = "https://github.com/wertarbyte/triggerhappy" |
| 3 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-3.0-only" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 6 | |
Brad Bishop | ba6de43 | 2019-05-21 08:07:33 -0400 | [diff] [blame] | 7 | # matches debian/0.5.0-1 tag |
| 8 | SRCREV = "44a173195986d0d853316cb02a58785ded66c12b" |
| 9 | PV = "0.5.0+git${SRCPV}" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 10 | SRC_URI = "git://github.com/wertarbyte/${BPN}.git;branch=debian;protocol=https" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 11 | |
Brad Bishop | ba6de43 | 2019-05-21 08:07:33 -0400 | [diff] [blame] | 12 | S = "${WORKDIR}/git" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 13 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | inherit autotools-brokensep pkgconfig perlnative update-rc.d systemd |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 15 | |
| 16 | PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" |
| 17 | PACKAGECONFIG[systemd] = ",,systemd" |
| 18 | |
| 19 | INITSCRIPT_NAME = "triggerhappy" |
| 20 | INITSCRIPT_PARAMS = "defaults" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 21 | SYSTEMD_SERVICE:${PN} = "triggerhappy.service triggerhappy.socket" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 23 | FILES:${PN} = "\ |
Brad Bishop | ba6de43 | 2019-05-21 08:07:33 -0400 | [diff] [blame] | 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 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 30 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | CONFFILES:${PN} = "${sysconfdir}/udev/rules.d/80-triggerhappy.rules" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 32 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 33 | do_install:append() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 | } |