diff options
Diffstat (limited to 'recipes-containers/docker-distribution/docker-distribution_git.bb')
-rw-r--r-- | recipes-containers/docker-distribution/docker-distribution_git.bb | 65 |
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 @@ | |||
1 | HOMEPAGE = "http://github.com/docker/distribution" | ||
2 | SUMMARY = "The Docker toolset to pack, ship, store, and deliver content" | ||
3 | LICENSE = "Apache-2.0" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314" | ||
5 | |||
6 | DEPENDS = "go-cross-${TARGET_ARCH} \ | ||
7 | " | ||
8 | |||
9 | SRCREV_distribution="0810eba2adf048b77621472991211924d9ec31c5" | ||
10 | SRC_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 | |||
14 | PACKAGES =+ "docker-registry" | ||
15 | |||
16 | PV = "v2.6.0-rc+git${SRCPV}" | ||
17 | S = "${WORKDIR}/git/src/github.com/docker/distribution" | ||
18 | |||
19 | inherit go-osarchmap | ||
20 | |||
21 | # This disables seccomp and apparmor, which are on by default in the | ||
22 | # go package. | ||
23 | EXTRA_OEMAKE="BUILDTAGS=''" | ||
24 | |||
25 | do_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 | |||
40 | do_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 | |||
56 | INSANE_SKIP_${PN} += "ldflags already-stripped" | ||
57 | INSANE_SKIP_docker-registry += "ldflags already-stripped" | ||
58 | |||
59 | FILES_docker-registry = "${sbindir}/*" | ||
60 | FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service" | ||
61 | FILES_docker-registry += "${sysconfdir}/docker-distribution/*" | ||
62 | FILES_docker-registry += "${localstatedir}/lib/registry/" | ||
63 | |||
64 | SYSTEMD_SERVICE_docker-registry = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}" | ||
65 | SYSTEMD_AUTO_ENABLE_docker-registry = "enable" | ||