blob: 6a5287af49590e0e1e618ebb7463370198d2f43f [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "A mode switching tool for controlling 'flip flop' (multiple device) USB gear"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=091556bd6d0154cd4c2d17a1bfc7380a"
4
5DEPENDS = "libusb1"
6
7SRC_URI = "http://www.draisberghof.de/usb_modeswitch/${BP}.tar.bz2"
8SRC_URI[md5sum] = "be73dcc84025794081a1d4d4e5a75e4c"
9SRC_URI[sha256sum] = "c215236e6bada6e659fc195a31d611ea298a4bdb4d57a0d68c553b56585f8ba3"
10
11inherit pkgconfig systemd
12
13SYSTEMD_SERVICE_${PN} = "usb_modeswitch@.service"
14
15EXTRA_OEMAKE = "TCL=${bindir}/tclsh"
16
17FILES_${PN} = "${bindir} ${sysconfdir} ${nonarch_base_libdir}/udev/usb_modeswitch ${sbindir} ${localstatedir}/lib/usb_modeswitch"
18RDEPENDS_${PN} = "tcl"
19RRECOMMENDS_${PN} = "usb-modeswitch-data"
20
21do_install() {
Andrew Geisslerbbbd5f42020-10-30 15:42:48 -050022 oe_runmake DESTDIR=${D} UDEVDIR=${D}/${nonarch_base_libdir}/udev install
Andrew Geissler82c905d2020-04-13 13:39:40 -050023 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
24 install -d ${D}/${systemd_unitdir}/system
25 install -m 644 ${S}/usb_modeswitch@.service ${D}/${systemd_unitdir}/system
26 fi
27}