2021-03-22 13:00:07 +01:00
|
|
|
# Copyright 2020-2021 Gentoo Authors
|
2020-04-22 14:43:44 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
2021-03-22 13:00:07 +01:00
|
|
|
inherit fcaps
|
2020-04-22 14:43:44 +02:00
|
|
|
|
|
|
|
DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 & IPv6"
|
|
|
|
HOMEPAGE="https://bird.network.cz"
|
2021-03-22 13:00:07 +01:00
|
|
|
SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz"
|
2020-04-22 14:43:44 +02:00
|
|
|
LICENSE="GPL-2"
|
|
|
|
|
|
|
|
SLOT="0"
|
2021-05-08 22:41:11 +02:00
|
|
|
KEYWORDS="amd64 ~arm64 ~x86 ~x64-macos"
|
2021-09-23 14:58:10 +02:00
|
|
|
IUSE="+client debug libssh"
|
2020-04-22 14:43:44 +02:00
|
|
|
|
|
|
|
RDEPEND="
|
2021-03-22 13:00:07 +01:00
|
|
|
client? ( sys-libs/ncurses:= )
|
|
|
|
client? ( sys-libs/readline:= )
|
2020-04-22 14:43:44 +02:00
|
|
|
filecaps? (
|
|
|
|
acct-group/bird
|
|
|
|
acct-user/bird
|
|
|
|
)
|
2021-09-23 14:58:10 +02:00
|
|
|
libssh? ( net-libs/libssh:= )"
|
2021-04-10 11:09:56 +02:00
|
|
|
BDEPEND="
|
2020-04-22 14:43:44 +02:00
|
|
|
sys-devel/bison
|
2021-04-10 11:09:56 +02:00
|
|
|
sys-devel/flex
|
|
|
|
sys-devel/m4
|
|
|
|
"
|
2020-04-22 14:43:44 +02:00
|
|
|
|
2021-03-22 13:00:07 +01:00
|
|
|
FILECAPS=(
|
|
|
|
CAP_NET_ADMIN usr/sbin/bird
|
|
|
|
CAP_NET_BIND_SERVICE usr/sbin/bird
|
|
|
|
CAP_NET_RAW usr/sbin/bird
|
|
|
|
)
|
2020-04-22 14:43:44 +02:00
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
econf \
|
|
|
|
--localstatedir="${EPREFIX}/var" \
|
|
|
|
$(use_enable client) \
|
|
|
|
$(use_enable debug) \
|
2021-09-23 14:58:10 +02:00
|
|
|
$(use_enable libssh)
|
2020-04-22 14:43:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
if use client; then
|
|
|
|
dobin birdc
|
|
|
|
fi
|
|
|
|
dobin birdcl
|
|
|
|
dosbin bird
|
|
|
|
newinitd "${FILESDIR}/initd-${PN}-2" ${PN}
|
|
|
|
newconfd "${FILESDIR}/confd-${PN}-2" ${PN}
|
|
|
|
dodoc doc/bird.conf.example
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
use filecaps && \
|
|
|
|
einfo "If you want to run bird as non-root, edit"
|
|
|
|
einfo "'${EROOT}/etc/conf.d/bird' and set BIRD_GROUP and BIRD_USER with"
|
|
|
|
einfo "the wanted username."
|
|
|
|
}
|