forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-emulation/reg: Version bump to 0.15.8
Signed-off-by: Manuel Rüger <[email protected]> Package-Manager: Portage-2.3.51, Repoman-2.3.11
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright 1999-2018 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
inherit golang-build golang-vcs-snapshot user | ||
|
||
EGO_PN="github.com/genuinetools/reg" | ||
GIT_COMMIT="d021aeb0b9786eac1212b5faaa70d11f56c60991" | ||
ARCHIVE_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
KEYWORDS="~amd64" | ||
|
||
DESCRIPTION="Docker registry v2 command line client" | ||
HOMEPAGE="https://github.com/genuinetools/reg" | ||
SRC_URI="${ARCHIVE_URI}" | ||
LICENSE="MIT" | ||
SLOT="0" | ||
IUSE="" | ||
|
||
RESTRICT="test" | ||
|
||
pkg_setup() { | ||
enewgroup reg | ||
enewuser reg -1 -1 /var/lib/reg reg | ||
} | ||
|
||
src_prepare() { | ||
pushd src/${EGO_PN} || die | ||
default | ||
popd || die | ||
} | ||
|
||
src_compile() { | ||
pushd src/${EGO_PN} || die | ||
GOPATH="${S}" go build -v -ldflags "-X ${EGO_PN}/version.GITCOMMIT=${GIT_COMMIT} -X ${EGO_PN}/version.VERSION=${PV}" -o "${S}"/bin/reg . || die | ||
popd || die | ||
} | ||
|
||
src_install() { | ||
dobin bin/* | ||
dodoc src/${EGO_PN}/README.md | ||
insinto /var/lib/${PN} | ||
doins -r src/${EGO_PN}/server/* | ||
newinitd "${FILESDIR}"/reg.initd reg | ||
newconfd "${FILESDIR}"/reg.confd reg | ||
|
||
keepdir /var/log/reg | ||
fowners -R reg:reg /var/log/reg /var/lib/reg/static | ||
} |