linuxconsole_1.7.0.bb 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. SUMMARY = "Linux Console Project"
  2. DESCRIPTION = "This project maintains the Linux Console tools, which include \
  3. utilities to test and configure joysticks, connect legacy devices to the kernel's \
  4. input subsystem (providing support for serial mice, touchscreens etc.), and test \
  5. the input event layer."
  6. HOMEPAGE = "https://sourceforge.net/projects/linuxconsole"
  7. LICENSE = "GPLv2"
  8. LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
  9. DEPENDS = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
  10. SRC_URI = "\
  11. ${SOURCEFORGE_MIRROR}/linuxconsole/linuxconsoletools-${PV}.tar.bz2 \
  12. file://51-these-are-not-joysticks-rm.rules \
  13. file://60-joystick.rules \
  14. file://inputattachctl \
  15. file://inputattach.service \
  16. "
  17. SRC_URI[sha256sum] = "95d112f06393806116341d593bda002c8bc44119c1538407623268fed90d8c34"
  18. S = "${WORKDIR}/linuxconsoletools-${PV}"
  19. inherit systemd pkgconfig
  20. EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} -C utils"
  21. EXTRA_OEMAKE += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'SYSTEMD_SUPPORT=1', '', d)}"
  22. SYSTEMD_PACKAGES += "inputattach"
  23. SYSTEMD_SERVICE_inputattach = "inputattach.service"
  24. SYSTEMD_AUTO_ENABLE_inputattach = "enable"
  25. PROVIDES += "joystick"
  26. PACKAGECONFIG ??= "sdl"
  27. PACKAGECONFIG[sdl] = ",,libsdl2"
  28. do_compile() {
  29. if ! ${@bb.utils.contains('PACKAGECONFIG', 'sdl', 'true', 'false', d)}; then
  30. # drop ffmvforce so that we don't need libsdl2
  31. sed '/^PROGRAMS/s/ffmvforce *//g' -i ${S}/utils/Makefile
  32. fi
  33. # respect nonarch_base_libdir path to keep QA check happy
  34. sed 's#DESTDIR)/lib/udev#DESTDIR)/${nonarch_base_libdir}/udev#g' -i ${S}/utils/Makefile
  35. oe_runmake
  36. }
  37. do_install() {
  38. oe_runmake install
  39. install -Dm 0644 ${WORKDIR}/51-these-are-not-joysticks-rm.rules ${D}${nonarch_base_libdir}/udev/rules.d/51-these-are-not-joysticks-rm.rules
  40. install -Dm 0644 ${WORKDIR}/60-joystick.rules ${D}${nonarch_base_libdir}/udev/rules.d/60-joystick.rules
  41. install -Dm 0644 ${WORKDIR}/inputattach.service ${D}${systemd_system_unitdir}/inputattach.service
  42. install -Dm 0755 ${WORKDIR}/inputattachctl ${D}${bindir}/inputattachctl
  43. }
  44. PACKAGES += "inputattach joystick-jscal joystick"
  45. # We won't package any file here as we are following the same packaging schema
  46. # Debian does and we are splitting it in 'inputattach' and 'joystick' packages.
  47. FILES_${PN} = ""
  48. FILES_inputattach += "\
  49. ${bindir}/inputattach \
  50. ${bindir}/inputattachctl \
  51. ${systemd_system_unitdir}/inputattach.service \
  52. "
  53. FILES_joystick += "\
  54. ${bindir}/evdev-joystick \
  55. ${bindir}/ffcfstress \
  56. ${bindir}/ffmvforce \
  57. ${bindir}/ffset \
  58. ${bindir}/fftest \
  59. ${bindir}/jstest \
  60. ${nonarch_base_libdir}/udev/rules.d/51-these-are-not-joysticks-rm.rules \
  61. ${nonarch_base_libdir}/udev/js-set-enum-leds \
  62. ${nonarch_base_libdir}/udev/rules.d/60-joystick.rules \
  63. ${nonarch_base_libdir}/udev/rules.d/80-stelladaptor-joystick.rules \
  64. "
  65. FILES_joystick-jscal = " \
  66. ${datadir}/joystick \
  67. ${bindir}/jscal \
  68. ${bindir}/jscal-restore \
  69. ${bindir}/jscal-store \
  70. "
  71. RDEPENDS_inputattach += "inputattach-config"
  72. RDEPENDS_joystick-jscal += "\
  73. bash \
  74. gawk \
  75. "