Merge branch 'master' of git.grifon.fr:alarig/SwordArMor-gentoo-overlay

This commit is contained in:
Alarig Le Lay 2020-04-22 19:38:14 +02:00
commit d534f3d10b
Signed by: alarig
GPG key ID: 7AFE62C6DF8BCDEC
2 changed files with 71 additions and 1 deletions

View file

@ -0,0 +1,66 @@
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools fcaps git-r3
DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 & IPv6"
HOMEPAGE="https://bird.network.cz"
LICENSE="GPL-2"
EGIT_REPO_URI="https://gitlab.labs.nic.cz/labs/bird.git"
EGIT_COMMIT="78e4a123bb937bb45f7eaebb0ea475095443bfd0"
SLOT="0"
KEYWORDS=""
IUSE="+client debug libssh"
RDEPEND="
client? ( sys-libs/ncurses )
client? ( sys-libs/readline )
filecaps? (
acct-group/bird
acct-user/bird
)
libssh? ( net-libs/libssh )
"
DEPEND="sys-devel/flex
sys-devel/bison
sys-devel/m4"
src_prepare() {
default
eautoreconf
}
src_configure() {
econf \
--localstatedir="${EPREFIX}/var" \
$(use_enable client) \
$(use_enable debug) \
$(use_enable libssh)
}
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
}
FILECAPS=(
CAP_NET_ADMIN usr/sbin/bird
CAP_NET_BIND_SERVICE usr/sbin/bird
CAP_NET_RAW usr/sbin/bird
)
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."
}

View file

@ -21,7 +21,7 @@ if [ ${BIRD_USER} ]; then
fi fi
client_args="-s ${SOCK}" client_args="-s ${SOCK}"
command_args="${client_args} -c ${CONF_FILE} ${BIRD_OPTS}" command_args="${client_args} -c ${CONF_FILE} -P ${pidfile} ${BIRD_OPTS}"
client_args="${client_args} -r" client_args="${client_args} -r"
depend() { depend() {
@ -52,6 +52,10 @@ reload() {
eend $? eend $?
} }
start_post() {
checkpath -f -m 0655 -o bird:bird "${pidfile}"
}
stop_pre() { stop_pre() {
if [ "${RC_CMD}" = "restart" ] ; then if [ "${RC_CMD}" = "restart" ] ; then
check_run || return 1 check_run || return 1