blob: add5ce1d5b7eec0dbcb48c599f7b946de9373fbd [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
Brad Bishopd7bf8c12018-02-25 22:55:05 -05006SRCREV_distribution="48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89"
7SRC_URI = "git://github.com/docker/distribution.git;branch=release/2.6;name=distribution;destsuffix=git/src/github.com/docker/distribution \
Brad Bishop6e60e8b2018-02-01 10:27:11 -05008 file://docker-registry.service \
9 "
10
11PACKAGES =+ "docker-registry"
12
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013PV = "v2.6.2"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050014S = "${WORKDIR}/git/src/github.com/docker/distribution"
15
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016GO_IMPORT = "import"
17
Brad Bishop6e60e8b2018-02-01 10:27:11 -050018inherit goarch
19inherit go
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 export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
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 GO_GCFLAGS=""
36 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
37
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038 cd ${S}
39
Brad Bishop6e60e8b2018-02-01 10:27:11 -050040 oe_runmake binaries
41}
42
43do_install() {
44 install -d ${D}/${sbindir}
45 install ${S}/bin/registry ${D}/${sbindir}
46
47 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
48 install -d ${D}${systemd_unitdir}/system
49 install -m 644 ${WORKDIR}/docker-registry.service ${D}/${systemd_unitdir}/system
50 fi
51
52 install -d ${D}/${sysconfdir}/docker-distribution/registry/
53 install ${S}/cmd/registry/config-example.yml ${D}/${sysconfdir}/docker-distribution/registry/config.yml
54
55 # storage for the registry containers
56 install -d ${D}/${localstatedir}/lib/registry/
57}
58
59INSANE_SKIP_${PN} += "ldflags already-stripped"
60INSANE_SKIP_docker-registry += "ldflags already-stripped"
61
62FILES_docker-registry = "${sbindir}/*"
63FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service"
64FILES_docker-registry += "${sysconfdir}/docker-distribution/*"
65FILES_docker-registry += "${localstatedir}/lib/registry/"
66
67SYSTEMD_SERVICE_docker-registry = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}"
68SYSTEMD_AUTO_ENABLE_docker-registry = "enable"