2022-02-21 08:31:13 +03:00
|
|
|
# Copyright 1999-2022 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
inherit go-module
|
|
|
|
|
|
|
|
DESCRIPTION="Docker Registry 2 authentication server"
|
|
|
|
HOMEPAGE="https://github.com/cesanta/docker_auth"
|
|
|
|
|
2022-03-12 10:41:00 +03:00
|
|
|
SRC_URI="https://github.com/cesanta/docker_auth/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
|
2022-02-21 08:31:13 +03:00
|
|
|
|
|
|
|
LICENSE="Apache-2.0 BSD BSD-2 LGPL-3 MIT ZLIB"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64"
|
|
|
|
|
|
|
|
BDEPEND="dev-go/go-bindata"
|
|
|
|
COMMON_DEPEND="acct-group/docker_auth
|
|
|
|
acct-user/docker_auth"
|
|
|
|
DEPEND="${COMMON_DEPEND}"
|
|
|
|
RDEPEND="${COMMON_DEPEND}"
|
|
|
|
|
|
|
|
RESTRICT=" test"
|
2022-10-24 15:07:08 +03:00
|
|
|
S="${S}/auth_server"
|
2022-02-21 08:31:13 +03:00
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
# see the upstream Makefile for how to generate the VERSION and
|
|
|
|
# BUILD_ID values.
|
|
|
|
emake \
|
|
|
|
VERSION=2022022022 \
|
|
|
|
BUILD_ID=20220220-221158/1.9.0@636c09af \
|
|
|
|
build
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2022-10-24 15:07:08 +03:00
|
|
|
cd ..
|
|
|
|
dobin auth_server/auth_server
|
2022-02-21 08:31:13 +03:00
|
|
|
dodoc README.md docs/*
|
|
|
|
insinto /usr/share/${PF}
|
|
|
|
doins -r examples
|
|
|
|
insinto /etc/docker_auth/
|
|
|
|
newins examples/reference.yml config.yml.example
|
|
|
|
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
|
|
|
newconfd "${FILESDIR}"/${PN}.confd ${PN}
|
|
|
|
insinto /etc/logrotate.d
|
|
|
|
newins "${FILESDIR}"/${PN}.logrotated ${PN}
|
|
|
|
keepdir /var/log/docker_auth
|
|
|
|
fowners ${PN}:${PN} /var/log/docker_auth
|
|
|
|
}
|