gentoo-zh/sys-apps/aptly/aptly-9999.ebuild
liuyujielol b316ef5319 sys-apps/aptly: add 1.5.0, drop 1.4.0-r1, update live
DeprecatedEclassVariable: version 1.4.0-r1: uses deprecated variable on line 8: EGO_SUM (no replacement)
DeprecatedEclassFunction: version 1.4.0-r1: uses deprecated function on line 184: go-module_set_globals (no replacement)

Signed-off-by: liuyujielol <2073201758GD@gmail.com>
2023-11-18 18:26:36 +08:00

55 lines
1.1 KiB
Bash

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
EGIT_REPO_URI="https://github.com/aptly-dev/${PN}.git"
inherit bash-completion-r1 git-r3 go-module systemd
DESCRIPTION="A swiss army knife for Debian repository management"
HOMEPAGE="https://github.com/aptly-dev/aptly"
LICENSE="MIT"
SLOT="0"
RESTRICT="test" # fails
RDEPEND="
acct-group/aptly
acct-user/aptly
"
src_unpack() {
git-r3_src_unpack
go-module_live_vendor
}
src_compile() {
ego build -o cmd/aptly -ldflags "-X main.Version=${PV}"
}
src_test() {
ego test -work ./...
}
src_install() {
einstalldocs
dobin cmd/aptly
doman man/aptly.1
dobashcomp completion.d/aptly
insinto /usr/share/zsh/site-functions
doins completion.d/_aptly
systemd_dounit aptly-api.service
systemd_dounit aptly.service
newinitd "${FILESDIR}"/aptly.initd aptly
newconfd "${FILESDIR}"/aptly.confd aptly
newinitd "${FILESDIR}"/aptly-api.initd aptly-api
newconfd "${FILESDIR}"/aptly-api.confd aptly-api
diropts -o aptly -g aptly -m 0700
keepdir /etc/aptly
insopts -o aptly -g aptly -m 0644
insinto /etc/aptly
doins "${FILESDIR}"/aptly.conf
}