blob: 48fc911434d3fe7d0de3f4e329fab3920f586e9a [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "USB Gadget neXt Configfs Library"
2LICENSE = "GPLv2 & LGPLv2.1"
3LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
4 file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c"
5
6DEPENDS = "libconfig"
7
Andrew Geisslerd688a012020-09-18 13:36:00 -05008inherit autotools pkgconfig systemd update-rc.d update-alternatives
Brad Bishop19323692019-04-05 15:28:33 -04009
10PV = "0.2.0+git${SRCPV}"
11SRCREV = "45c14ef4d5d7ced0fbf984208de44ced6d5ed898"
12SRCBRANCH = "master"
13SRC_URI = " \
14 git://github.com/libusbgx/libusbgx.git;branch=${SRCBRANCH} \
15 file://gadget-start \
16 file://usbgx.initd \
17 file://usbgx.service \
18"
19
20S = "${WORKDIR}/git"
21
22SYSTEMD_PACKAGES = "${PN}"
23SYSTEMD_SERVICE_${PN} = "usbgx.service"
24
25INITSCRIPT_NAME = "usbgx"
26INITSCRIPT_PARAMS = "defaults"
27
28EXTRA_OECONF = "--includedir=${includedir}/usbgx"
29
30do_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
40RDEPENDS_${PN} += "libusbgx-config"
Andrew Geisslerd688a012020-09-18 13:36:00 -050041
42ALTERNATIVE_PRIORITY = "90"
43ALTERNATIVE_${PN} = "gadget-acm-ecm show-gadgets"
44ALTERNATIVE_LINK_NAME[gadget-acm-ecm] = "${bindir}/gadget-acm-ecm"
45ALTERNATIVE_LINK_NAME[show-gadgets] = "${bindir}/show-gadgets"