app-crypt/etoken-sac: fix eutils EAPI 7
[gentoo-zh.git] / sys-apps / aptly / aptly-9999.ebuild
blob3d4cd0270f4a46d03a1e8bcf6160a412d7188bfe
1 # Copyright 1999-2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=7
6 EGIT_REPO_URI="https://github.com/aptly-dev/${PN}.git"
8 inherit bash-completion-r1 git-r3 go-module systemd
10 DESCRIPTION="A swiss army knife for Debian repository management"
11 HOMEPAGE="https://github.com/aptly-dev/aptly"
12 SRC_URI=""
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS=""
17 IUSE=""
18 RESTRICT="test" # fails
20 RDEPEND="acct-user/aptly"
22 src_unpack() {
23         git-r3_src_unpack
24         go-module_live_vendor
27 src_compile() {
28         go build -o cmd/aptly -ldflags "-X main.Version=${PV}" || die "build failed"
31 src_test() {
32         go test -work ./... || die "test failed"
35 src_install() {
36         einstalldocs
37         dobin cmd/aptly
38         doman man/aptly.1
39         dobashcomp completion.d/aptly
40         insinto /usr/share/zsh/site-functions
41         doins completion.d/_aptly
42         systemd_dounit aptly-api.service
43         systemd_dounit aptly.service
44         newinitd "${FILESDIR}"/aptly.initd aptly
45         newconfd "${FILESDIR}"/aptly.confd aptly
46         newinitd "${FILESDIR}"/aptly-api.initd aptly-api
47         newconfd "${FILESDIR}"/aptly-api.confd aptly-api
49         diropts -o aptly -g aptly -m 0700
50         keepdir /etc/aptly
51         insopts -o aptly -g aptly -m 0644
52         insinto /etc/aptly
53         doins "${FILESDIR}"/aptly.conf