guru/net-misc/FORT-validator/FORT-validator-1.6.2-r2.ebuild
Lucio Sauer 0e9bffaf0c
net-misc/FORT-validator: restore compat with older libxml2 versions
5d0270aaf228fe067d2226de9888908bb23e6a09 broke compatibility with
<dev-libs/libxml2-2.12.0 due to API changes.
Backport commits that fix previous patch.

Bug: https://bugs.gentoo.org/928331
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
2024-06-05 15:19:29 +02:00

76 lines
1.6 KiB
Bash

# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools fcaps systemd
MY_PN="fort"
DESCRIPTION="FORT validator is an open source RPKI validator"
HOMEPAGE="https://fortproject.net/validator?2"
SRC_URI="https://github.com/NICMx/${PN}/releases/download/${PV}/fort-${PV}.tar.gz"
S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="caps test"
RESTRICT="!test? ( test )"
PATCHES="${FILESDIR}"/${PN}-1.5.4-libxml2-2.12.0.patch
DEPEND="
acct-group/fort
acct-user/fort
caps? ( sys-libs/libcap )
dev-libs/jansson
dev-libs/libxml2
dev-libs/openssl[rfc3779]
net-misc/curl
"
RDEPEND="${DEPEND}"
BDEPEND="
virtual/pkgconfig
test? ( dev-libs/check )
"
src_prepare() {
default
# Don't strip CFLAGS
sed -i 's/fort_CFLAGS =/fort_CFLAGS = ${CFLAGS} /' src/Makefile.am || die
# Don't test network
sed -i '/http/d' test/Makefile.am || die
eautoreconf
}
src_install() {
newinitd "${FILESDIR}/${MY_PN}-1.5-initd" ${MY_PN}
newconfd "${FILESDIR}/${MY_PN}-1.5-confd" ${MY_PN}
emake DESTDIR="${D}" install
insinto /usr/share/${MY_PN}/
insopts -m0644 -o "${MY_PN}"
diropts -m0755 -o "${MY_PN}"
doins -r examples/tal/
dodoc -r examples/
insinto /etc/fort
newins "${FILESDIR}/fort-config.json" config.json
systemd_dounit "${FILESDIR}/${MY_PN}-1.5.service"
}
pkg_postinst() {
fcaps cap_net_bind_service usr/bin/fort
einfo ""
einfo "You have to init the TALs before the first run. To do so, run "
einfo ""
einfo " su -s /bin/sh -c '${EROOT}/usr/bin/${MY_PN} --init-tals --tal /usr/share/${MY_PN}/tal/' fort"
einfo ""
einfo "as root."
}