triggerhappy_git.bb 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. SUMMARY = "A lightweight hotkey daemon"
  2. HOMEPAGE = "https://github.com/wertarbyte/triggerhappy"
  3. LICENSE = "GPLv3"
  4. LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
  5. # matches debian/0.5.0-1 tag
  6. SRCREV = "44a173195986d0d853316cb02a58785ded66c12b"
  7. PV = "0.5.0+git${SRCPV}"
  8. SRC_URI = "git://github.com/wertarbyte/${BPN}.git;branch=debian"
  9. S = "${WORKDIR}/git"
  10. inherit autotools-brokensep pkgconfig perlnative update-rc.d systemd
  11. PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"
  12. PACKAGECONFIG[systemd] = ",,systemd"
  13. INITSCRIPT_NAME = "triggerhappy"
  14. INITSCRIPT_PARAMS = "defaults"
  15. SYSTEMD_SERVICE_${PN} = "triggerhappy.service triggerhappy.socket"
  16. FILES_${PN} = "\
  17. ${sbindir}/thd \
  18. ${sbindir}/th-cmd \
  19. ${sysconfdir}/triggerhappy/triggers.d \
  20. ${nonarch_base_libdir}/udev/rules.d/80-triggerhappy.rules \
  21. ${sysconfdir}/init.d/triggerhappy \
  22. ${systemd_unitdir}/system \
  23. "
  24. CONFFILES_${PN} = "${sysconfdir}/udev/rules.d/80-triggerhappy.rules"
  25. do_install_append() {
  26. install -d ${D}${sysconfdir}/triggerhappy/triggers.d
  27. install -d ${D}${nonarch_base_libdir}/udev/rules.d
  28. install -m 0644 ${S}/udev/triggerhappy-udev.rules ${D}${nonarch_base_libdir}/udev/rules.d/80-triggerhappy.rules
  29. install -d ${D}${sysconfdir}/init.d
  30. install -m 0755 ${S}/debian/init.d ${D}${sysconfdir}/init.d/triggerhappy
  31. if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
  32. install -d ${D}/${systemd_unitdir}/system
  33. install -m 0644 ${S}/systemd/triggerhappy.socket ${D}${systemd_unitdir}/system
  34. install -m 0644 ${S}/systemd/triggerhappy.service ${D}${systemd_unitdir}/system
  35. fi
  36. }