Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "USB Gadget neXt Configfs Library" |
| 2 | LICENSE = "GPLv2 & LGPLv2.1" |
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
| 4 | file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c" |
| 5 | |
| 6 | DEPENDS = "libconfig" |
| 7 | |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 8 | inherit autotools pkgconfig systemd update-rc.d update-alternatives |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 9 | |
| 10 | PV = "0.2.0+git${SRCPV}" |
| 11 | SRCREV = "45c14ef4d5d7ced0fbf984208de44ced6d5ed898" |
| 12 | SRCBRANCH = "master" |
| 13 | SRC_URI = " \ |
| 14 | git://github.com/libusbgx/libusbgx.git;branch=${SRCBRANCH} \ |
| 15 | file://gadget-start \ |
| 16 | file://usbgx.initd \ |
| 17 | file://usbgx.service \ |
| 18 | " |
| 19 | |
| 20 | S = "${WORKDIR}/git" |
| 21 | |
| 22 | SYSTEMD_PACKAGES = "${PN}" |
| 23 | SYSTEMD_SERVICE_${PN} = "usbgx.service" |
| 24 | |
| 25 | INITSCRIPT_NAME = "usbgx" |
| 26 | INITSCRIPT_PARAMS = "defaults" |
| 27 | |
| 28 | EXTRA_OECONF = "--includedir=${includedir}/usbgx" |
| 29 | |
| 30 | do_install_append() { |
| 31 | install -Dm 0755 ${WORKDIR}/gadget-start ${D}/${bindir}/gadget-start |
| 32 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 33 | install -Dm 0644 ${WORKDIR}/usbgx.service ${D}${systemd_system_unitdir}/usbgx.service |
| 34 | fi |
| 35 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 36 | install -Dm 0755 ${WORKDIR}/usbgx.initd ${D}${sysconfdir}/init.d/usbgx |
| 37 | fi |
| 38 | } |
| 39 | |
| 40 | RDEPENDS_${PN} += "libusbgx-config" |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 41 | |
| 42 | ALTERNATIVE_PRIORITY = "90" |
| 43 | ALTERNATIVE_${PN} = "gadget-acm-ecm show-gadgets" |
| 44 | ALTERNATIVE_LINK_NAME[gadget-acm-ecm] = "${bindir}/gadget-acm-ecm" |
| 45 | ALTERNATIVE_LINK_NAME[show-gadgets] = "${bindir}/show-gadgets" |