1 HOMEPAGE = "http://github.com/docker/distribution"
2 SUMMARY = "The Docker toolset to pack, ship, store, and deliver content"
4 LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
6 GO_PKG_PATH = "github.com/docker/distribution"
9 SRCREV_distribution="48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89"
11 git://github.com/docker/distribution.git;branch=release/2.6;name=distribution;destsuffix=git/src/${GO_PKG_PATH} \
12 file://${BPN}.service \
17 S = "${WORKDIR}/git/src/${GO_PKG_PATH}"
22 # This disables seccomp and apparmor, which are on by default in the
24 EXTRA_OEMAKE="BUILDTAGS=''"
27 export GOARCH="${TARGET_GOARCH}"
28 export GOPATH="${WORKDIR}/git/"
29 export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
30 # Pass the needed cflags/ldflags so that cgo
31 # can find the needed headers files and libraries
32 export CGO_ENABLED="1"
35 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
37 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
45 install -d ${D}/${bindir}
46 install ${S}/bin/registry ${D}/${bindir}
48 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
49 install -d ${D}${systemd_system_unitdir}
50 install -m 644 ${WORKDIR}/${BPN}.service ${D}/${systemd_system_unitdir}
53 install -d ${D}/${sysconfdir}/${BPN}/registry/
54 install ${WORKDIR}/config.yml ${D}/${sysconfdir}/${BPN}/registry/config.yml
56 # storage for the registry containers
57 install -d ${D}/${localstatedir}/lib/registry/
62 ${systemd_system_unitdir}/${BPN}.service \
63 ${sysconfdir}/${BPN}/* \
64 ${localstatedir}/lib/registry/ \
67 SYSTEMD_SERVICE_${BPN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${BPN}.service','',d)}"
68 SYSTEMD_AUTO_ENABLE_${BPN} = "disable"
71 SYSROOT_PREPROCESS_FUNCS += "docker_distribution_sysroot_preprocess"
73 docker_distribution_sysroot_preprocess () {
74 install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${GO_PKG_PATH}
75 cp -r ${S} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${GO_PKG_PATH})