blob: dc0d5c08d1f53a0fcef485f579339313b196b837 [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}"
Patrick Williams213cb262021-08-07 19:21:33 -050023SYSTEMD_SERVICE:${PN} = "usbgx.service"
Brad Bishop19323692019-04-05 15:28:33 -040024
25INITSCRIPT_NAME = "usbgx"
26INITSCRIPT_PARAMS = "defaults"
27
28EXTRA_OECONF = "--includedir=${includedir}/usbgx"
29
Patrick Williams213cb262021-08-07 19:21:33 -050030do_install:append() {
Brad Bishop19323692019-04-05 15:28:33 -040031 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
Patrick Williams213cb262021-08-07 19:21:33 -050040RDEPENDS:${PN} += "libusbgx-config"
Andrew Geisslerd688a012020-09-18 13:36:00 -050041
42ALTERNATIVE_PRIORITY = "90"
Patrick Williams213cb262021-08-07 19:21:33 -050043ALTERNATIVE:${PN} = "gadget-acm-ecm show-gadgets"
Andrew Geisslerd688a012020-09-18 13:36:00 -050044ALTERNATIVE_LINK_NAME[gadget-acm-ecm] = "${bindir}/gadget-acm-ecm"
45ALTERNATIVE_LINK_NAME[show-gadgets] = "${bindir}/show-gadgets"