blob: 08b6d70be371960948d5b17d725e624093381f30 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001HOMEPAGE = "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
6SRCREV_distribution="0810eba2adf048b77621472991211924d9ec31c5"
7SRC_URI = "git://github.com/docker/distribution.git;branch=master;name=distribution;destsuffix=git/src/github.com/docker/distribution \
8 file://docker-registry.service \
9 "
10
11PACKAGES =+ "docker-registry"
12
13PV = "v2.6.0-rc+git${SRCPV}"
14S = "${WORKDIR}/git/src/github.com/docker/distribution"
15
16inherit goarch
17inherit go
18
19# This disables seccomp and apparmor, which are on by default in the
20# go package.
21EXTRA_OEMAKE="BUILDTAGS=''"
22
23do_compile() {
24 export GOARCH="${TARGET_GOARCH}"
25 export GOPATH="${WORKDIR}/git/"
26 export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
27 # Pass the needed cflags/ldflags so that cgo
28 # can find the needed headers files and libraries
29 export CGO_ENABLED="1"
30 export CFLAGS=""
31 export LDFLAGS=""
32 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
33 export GO_GCFLAGS=""
34 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
35
36 oe_runmake binaries
37}
38
39do_install() {
40 install -d ${D}/${sbindir}
41 install ${S}/bin/registry ${D}/${sbindir}
42
43 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
44 install -d ${D}${systemd_unitdir}/system
45 install -m 644 ${WORKDIR}/docker-registry.service ${D}/${systemd_unitdir}/system
46 fi
47
48 install -d ${D}/${sysconfdir}/docker-distribution/registry/
49 install ${S}/cmd/registry/config-example.yml ${D}/${sysconfdir}/docker-distribution/registry/config.yml
50
51 # storage for the registry containers
52 install -d ${D}/${localstatedir}/lib/registry/
53}
54
55INSANE_SKIP_${PN} += "ldflags already-stripped"
56INSANE_SKIP_docker-registry += "ldflags already-stripped"
57
58FILES_docker-registry = "${sbindir}/*"
59FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service"
60FILES_docker-registry += "${sysconfdir}/docker-distribution/*"
61FILES_docker-registry += "${localstatedir}/lib/registry/"
62
63SYSTEMD_SERVICE_docker-registry = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}"
64SYSTEMD_AUTO_ENABLE_docker-registry = "enable"