blob: d73ca610601f2745be0fbfe4572767df88739a20 [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
8inherit autotools pkgconfig systemd update-rc.d
9
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"