SwordArMor-gentoo-overlay/net-misc/stayrtr/stayrtr-0.6.1.ebuild
Alarig Le Lay 8ac6e208b0
net-misc/stayrtr: new package, add 0.6.1
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
2024-12-28 01:34:08 +01:00

38 lines
975 B
Bash

# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
DESCRIPTION="RPKI-To-Router server implementation in Go"
HOMEPAGE="https://github.com/bgp/stayrtr"
SRC_URI="https://github.com/bgp/stayrtr/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz
https://herbizarre.swordarmor.fr/garbage/${P}-deps.tar.xz
"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
acct-user/${PN}
net-misc/rpki-client
"
DEPEND="${RDEPEND}"
src_compile() {
ego build -trimpath -ldflags "-X main.version=${PV}" ${GOFLAGS} ./cmd/stayrtr/stayrtr.go
ego build -trimpath -ldflags "-X main.version=${PV}" ${GOFLAGS} ./cmd/rtrdump/rtrdump.go
ego build -trimpath -ldflags "-X main.version=${PV}" ${GOFLAGS} ./cmd/rtrmon/rtrmon.go
}
src_install() {
dobin stayrtr
dobin rtrdump
dobin rtrmon
newinitd "${FILESDIR}/${PN}-init.d" ${PN}
newconfd "${FILESDIR}/${PN}-conf.d" ${PN}
systemd_dounit "${FILESDIR}/${PN}.service"
}