You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
43 lines
1.2 KiB
7 years ago
|
# Copyright 1999-2017 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=6
|
||
|
inherit golang-vcs-snapshot systemd user
|
||
|
|
||
|
KEYWORDS="~amd64"
|
||
7 years ago
|
EGO_PN="github.com/docker/distribution"
|
||
7 years ago
|
EGIT_COMMIT="v${PV}"
|
||
7 years ago
|
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||
7 years ago
|
DESCRIPTION="Docker Registry 2.0"
|
||
|
HOMEPAGE="https://github.com/docker/distribution"
|
||
|
LICENSE="Apache-2.0"
|
||
|
SLOT="0"
|
||
|
IUSE=""
|
||
|
SVCNAME=registry
|
||
|
|
||
7 years ago
|
PATCHES=( "${FILESDIR}/${PN}-2.6.1-notifications-expvar.patch" )
|
||
7 years ago
|
|
||
|
pkg_setup() {
|
||
|
enewgroup ${SVCNAME}
|
||
|
enewuser ${SVCNAME} -1 -1 /dev/null ${SVCNAME}
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
GOPATH="${S}" \
|
||
7 years ago
|
go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}/..." || die
|
||
7 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
exeinto /usr/libexec/${PN}
|
||
|
doexe bin/*
|
||
|
insinto /etc/docker/registry
|
||
7 years ago
|
newins src/${EGO_PN}/cmd/registry/config-example.yml config.yml.example
|
||
7 years ago
|
newinitd "${FILESDIR}/${SVCNAME}.initd" "${SVCNAME}"
|
||
|
newconfd "${FILESDIR}/${SVCNAME}.confd" "${SVCNAME}"
|
||
|
systemd_dounit "${FILESDIR}/${SVCNAME}.service"
|
||
|
keepdir /var/{lib,log}/${SVCNAME}
|
||
|
fowners ${SVCNAME}:${SVCNAME} /var/{lib,log}/${SVCNAME}
|
||
|
insinto /etc/logrotate.d
|
||
|
newins "${FILESDIR}/${SVCNAME}.logrotated" "${SVCNAME}"
|
||
|
}
|