summaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker-distribution/docker-distribution_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/docker-distribution/docker-distribution_git.bb')
-rw-r--r--recipes-containers/docker-distribution/docker-distribution_git.bb65
1 files changed, 65 insertions, 0 deletions
diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
new file mode 100644
index 00000000..e86d4ff9
--- /dev/null
+++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
@@ -0,0 +1,65 @@
1HOMEPAGE = "http://github.com/docker/distribution"
2SUMMARY = "The Docker toolset to pack, ship, store, and deliver content"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
5
6DEPENDS = "go-cross-${TARGET_ARCH} \
7 "
8
9SRCREV_distribution="0810eba2adf048b77621472991211924d9ec31c5"
10SRC_URI = "git://github.com/docker/distribution.git;branch=master;name=distribution;destsuffix=git/src/github.com/docker/distribution \
11 file://docker-registry.service \
12 "
13
14PACKAGES =+ "docker-registry"
15
16PV = "v2.6.0-rc+git${SRCPV}"
17S = "${WORKDIR}/git/src/github.com/docker/distribution"
18
19inherit go-osarchmap
20
21# This disables seccomp and apparmor, which are on by default in the
22# go package.
23EXTRA_OEMAKE="BUILDTAGS=''"
24
25do_compile() {
26 export GOARCH="${TARGET_GOARCH}"
27 export GOPATH="${WORKDIR}/git/"
28
29 # Pass the needed cflags/ldflags so that cgo
30 # can find the needed headers files and libraries
31 export CGO_ENABLED="1"
32 export CFLAGS=""
33 export LDFLAGS=""
34 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
35 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
36
37 oe_runmake binaries
38}
39
40do_install() {
41 install -d ${D}/${sbindir}
42 install ${S}/bin/registry ${D}/${sbindir}
43
44 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
45 install -d ${D}${systemd_unitdir}/system
46 install -m 644 ${WORKDIR}/docker-registry.service ${D}/${systemd_unitdir}/system
47 fi
48
49 install -d ${D}/${sysconfdir}/docker-distribution/registry/
50 install ${S}/cmd/registry/config-example.yml ${D}/${sysconfdir}/docker-distribution/registry/config.yml
51
52 # storage for the registry containers
53 install -d ${D}/${localstatedir}/lib/registry/
54}
55
56INSANE_SKIP_${PN} += "ldflags already-stripped"
57INSANE_SKIP_docker-registry += "ldflags already-stripped"
58
59FILES_docker-registry = "${sbindir}/*"
60FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service"
61FILES_docker-registry += "${sysconfdir}/docker-distribution/*"
62FILES_docker-registry += "${localstatedir}/lib/registry/"
63
64SYSTEMD_SERVICE_docker-registry = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}"
65SYSTEMD_AUTO_ENABLE_docker-registry = "enable"