Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 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 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8 | LICENSE = "GPL-2.0-only" |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 10 | |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 11 | DEPENDS = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 12 | |
| 13 | SRC_URI = "\ |
| 14 | ${SOURCEFORGE_MIRROR}/linuxconsole/linuxconsoletools-${PV}.tar.bz2 \ |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 15 | file://0001-utils-Use-name-of-the-first-prerequisite-in-rule.patch \ |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 16 | file://51-these-are-not-joysticks-rm.rules \ |
| 17 | file://60-joystick.rules \ |
| 18 | file://inputattachctl \ |
| 19 | file://inputattach.service \ |
| 20 | " |
| 21 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 22 | SRC_URI[sha256sum] = "bd4d4b7e37da02fc67e47ddf20b6f1243c0a7af7b02b918d5e72138ea8727547" |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 23 | |
| 24 | S = "${WORKDIR}/linuxconsoletools-${PV}" |
| 25 | |
| 26 | inherit systemd pkgconfig |
| 27 | |
| 28 | EXTRA_OEMAKE = "DESTDIR=${D} PREFIX=${prefix} -C utils" |
| 29 | EXTRA_OEMAKE += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'SYSTEMD_SUPPORT=1', '', d)}" |
| 30 | |
| 31 | SYSTEMD_PACKAGES += "inputattach" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 32 | SYSTEMD_SERVICE:inputattach = "inputattach.service" |
| 33 | SYSTEMD_AUTO_ENABLE:inputattach = "enable" |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 34 | |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 35 | PROVIDES += "joystick" |
| 36 | |
| 37 | PACKAGECONFIG ??= "sdl" |
| 38 | PACKAGECONFIG[sdl] = ",,libsdl2" |
| 39 | |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 40 | do_compile() { |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 41 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'sdl', 'true', 'false', d)}; then |
| 42 | # drop ffmvforce so that we don't need libsdl2 |
| 43 | sed '/^PROGRAMS/s/ffmvforce *//g' -i ${S}/utils/Makefile |
| 44 | fi |
| 45 | # respect nonarch_base_libdir path to keep QA check happy |
| 46 | sed 's#DESTDIR)/lib/udev#DESTDIR)/${nonarch_base_libdir}/udev#g' -i ${S}/utils/Makefile |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 47 | oe_runmake |
| 48 | } |
| 49 | |
| 50 | do_install() { |
| 51 | oe_runmake install |
| 52 | |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 53 | 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 |
| 54 | install -Dm 0644 ${WORKDIR}/60-joystick.rules ${D}${nonarch_base_libdir}/udev/rules.d/60-joystick.rules |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 55 | |
| 56 | install -Dm 0644 ${WORKDIR}/inputattach.service ${D}${systemd_system_unitdir}/inputattach.service |
| 57 | install -Dm 0755 ${WORKDIR}/inputattachctl ${D}${bindir}/inputattachctl |
| 58 | } |
| 59 | |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 60 | PACKAGES += "inputattach joystick-jscal joystick" |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 61 | |
| 62 | # We won't package any file here as we are following the same packaging schema |
| 63 | # Debian does and we are splitting it in 'inputattach' and 'joystick' packages. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 64 | FILES:${PN} = "" |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 65 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 66 | FILES:inputattach += "\ |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 67 | ${bindir}/inputattach \ |
| 68 | ${bindir}/inputattachctl \ |
| 69 | ${systemd_system_unitdir}/inputattach.service \ |
| 70 | " |
| 71 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | FILES:joystick += "\ |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 73 | ${bindir}/evdev-joystick \ |
| 74 | ${bindir}/ffcfstress \ |
| 75 | ${bindir}/ffmvforce \ |
| 76 | ${bindir}/ffset \ |
| 77 | ${bindir}/fftest \ |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 78 | ${bindir}/jstest \ |
| 79 | ${nonarch_base_libdir}/udev/rules.d/51-these-are-not-joysticks-rm.rules \ |
| 80 | ${nonarch_base_libdir}/udev/js-set-enum-leds \ |
| 81 | ${nonarch_base_libdir}/udev/rules.d/60-joystick.rules \ |
| 82 | ${nonarch_base_libdir}/udev/rules.d/80-stelladaptor-joystick.rules \ |
| 83 | " |
| 84 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 85 | FILES:joystick-jscal = " \ |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 86 | ${datadir}/joystick \ |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 87 | ${bindir}/jscal \ |
| 88 | ${bindir}/jscal-restore \ |
| 89 | ${bindir}/jscal-store \ |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 90 | " |
| 91 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 92 | RDEPENDS:inputattach += "inputattach-config" |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 93 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 94 | RDEPENDS:joystick-jscal += "\ |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 95 | bash \ |
| 96 | gawk \ |
| 97 | " |