2020-02-16 22:38:09 +01:00
|
|
|
|
# Copyright 2020 Gentoo Authors
|
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
|
2020-03-11 09:49:04 +01:00
|
|
|
|
inherit autotools fcaps systemd
|
2020-02-16 22:38:09 +01:00
|
|
|
|
|
2020-03-15 11:53:08 +01:00
|
|
|
|
DESCRIPTION="FORT validator is an open source RPKI validator"
|
2020-02-16 22:38:09 +01:00
|
|
|
|
HOMEPAGE="https://fortproject.net/validator?2"
|
|
|
|
|
SRC_URI="https://github.com/NICMx/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
|
|
|
|
|
|
MY_PN="fort"
|
|
|
|
|
|
|
|
|
|
LICENSE="MIT"
|
|
|
|
|
SLOT="0"
|
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
|
IUSE="caps libressl"
|
|
|
|
|
|
|
|
|
|
DEPEND="
|
2020-02-19 12:53:34 +01:00
|
|
|
|
acct-group/fort
|
|
|
|
|
acct-user/fort
|
2020-02-16 22:38:09 +01:00
|
|
|
|
caps? ( sys-libs/libcap )
|
|
|
|
|
dev-libs/jansson
|
|
|
|
|
libressl? ( dev-libs/libressl:0= )
|
2020-02-19 12:53:34 +01:00
|
|
|
|
!libressl? ( dev-libs/openssl:0= )
|
2020-03-11 12:12:00 +01:00
|
|
|
|
"
|
|
|
|
|
RDEPEND="
|
|
|
|
|
${DEPEND}
|
2020-02-16 22:38:09 +01:00
|
|
|
|
net-misc/rsync
|
|
|
|
|
"
|
|
|
|
|
BDEPEND="
|
|
|
|
|
sys-devel/autoconf
|
|
|
|
|
sys-devel/automake
|
|
|
|
|
"
|
|
|
|
|
|
2020-03-14 12:32:41 +01:00
|
|
|
|
PATCHES="${FILESDIR}/${PN}-skip-online-test.patch"
|
|
|
|
|
|
2020-02-16 22:38:09 +01:00
|
|
|
|
src_prepare() {
|
|
|
|
|
default
|
2020-02-17 12:59:32 +01:00
|
|
|
|
|
2020-02-16 22:38:09 +01:00
|
|
|
|
eautoreconf
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
|
newinitd "${FILESDIR}/${MY_PN}-initd" ${MY_PN}
|
|
|
|
|
newconfd "${FILESDIR}/${MY_PN}-confd" ${MY_PN}
|
|
|
|
|
|
|
|
|
|
emake DESTDIR="${D}" install
|
2020-02-24 20:32:46 +01:00
|
|
|
|
insinto /usr/share/${MY_PN}/
|
|
|
|
|
insopts -m0644 -o "${MY_PN}"
|
|
|
|
|
diropts -m0755 -o "${MY_PN}"
|
|
|
|
|
doins -r examples/tal/
|
|
|
|
|
|
|
|
|
|
dodoc -r examples/
|
2020-02-17 12:59:32 +01:00
|
|
|
|
|
|
|
|
|
insinto /etc/fort
|
|
|
|
|
newins "${FILESDIR}/fort-config.json" config.json
|
2020-02-24 20:32:46 +01:00
|
|
|
|
|
2020-03-09 23:06:42 +01:00
|
|
|
|
exeinto "/usr/libexec/${MY_PN}"
|
2020-02-24 20:32:46 +01:00
|
|
|
|
doexe fort_setup.sh
|
2020-03-11 09:49:04 +01:00
|
|
|
|
|
2020-03-11 10:10:36 +01:00
|
|
|
|
systemd_dounit "${FILESDIR}/${MY_PN}.service"
|
2020-02-16 22:38:09 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
|
fcaps cap_net_bind_service usr/bin/fort
|
2020-02-24 20:32:46 +01:00
|
|
|
|
|
|
|
|
|
einfo ""
|
|
|
|
|
einfo "ARIN TAL is disabled by default because the ARIN Relying Party"
|
|
|
|
|
einfo "Agreement must be accepted beforehead. Start fort, run"
|
|
|
|
|
einfo ""
|
|
|
|
|
einfo " su -s /bin/sh -c '${EROOT}/usr/libexec/${MY_PN}/fort_setup.sh /usr/share/${MY_PN}/tal/' fort"
|
|
|
|
|
einfo ""
|
|
|
|
|
einfo "as root and restart fort to enable it."
|
|
|
|
|
einfo "The configuration file generation will fail because the script tries"
|
|
|
|
|
einfo "to write in your current directory. Plus, there is a configuration"
|
|
|
|
|
einfo "file with this ebuild, so you don’t have to use the generated one if"
|
|
|
|
|
einfo "you don’t want to."
|
2020-02-16 22:38:09 +01:00
|
|
|
|
}
|