2 DESCRIPTION = "StarlingX distributedcloud packages collection"
3 HOMEPAGE = "https://opendev.org/starlingx"
6 LIC_FILES_CHKSUM = "file://src/registry-token-server/registry-token-server/src/LICENSE;md5=d2794c0df5b907fdace235a619d80314"
10 SRCNAME = "containers"
11 SRCREV = "1a4b803e946b488c1f3adb25ab0614d1b0c3c9b8"
12 PV = "1.0.0+git${SRCPV}"
15 SRC_URI = "git://opendev.org/starlingx/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
17 GO_IMPORT = "registry-token-server"
19 RDEPENDS_${PN}-dev_append = " \
38 inherit go goarch ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)}
42 ln -sfn ${S}/src/registry-token-server/registry-token-server/src/ ./_build/src/registry-token-server
44 # Pass the needed cflags/ldflags so that cgo
45 # can find the needed headers files and libraries
46 export GOARCH=${TARGET_GOARCH}
47 export CGO_ENABLED="1"
48 export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
49 export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
51 export GOPATH="${WORKDIR}/build/_build:${STAGING_DIR_TARGET}/${prefix}/local/go"
52 cd _build/src/${GO_IMPORT}
53 #oe_runmake registry-token-server
54 export GOROOT=${STAGING_DIR_TARGET}/${prefix}/local/go
55 go build -o ${WORKDIR}/build/bin/registry-token-server registry-token-server
58 SYSTEMD_PACKAGES = "${PN}"
59 SYSTEMD_SERVICE_${PN} = "registry-token-server.service"
60 SYSTEMD_AUTO_ENABLE = "disable"
63 SRCPATH="${S}/src/registry-token-server/registry-token-server/centos/files"
64 install -d ${D}/${bindir}
65 install -m 0755 bin/registry-token-server ${D}/${bindir}
66 install -d -m 0755 ${D}/${sysconfdir}/registry-token-server/registry
67 install -m 0644 ${SRCPATH}//token_server.conf ${D}/${sysconfdir}/registry-token-server/registry
69 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
70 install -d ${D}${systemd_unitdir}/system
71 install -m 0644 ${SRCPATH}/registry-token-server.service ${D}${systemd_unitdir}/system/