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