############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = frr version = 2.0 release = 1 groups = Networking/Routing url = https://frrouting.org license = GPLv2+ summary = FRRouting is an IP routing protocol suite description FRRouting (FRR) is an IP routing protocol suite for Linux and Unix platforms which includes protocol daemons for BGP, IS-IS, LDP, OSPF, PIM, and RIP. end source_dl = https://github.com/FRRouting/frr/releases/download/frr-%{version}/ build requires json-c-devel ncurses-devel readline-devel systemd-units texinfo end prepare_cmds %{create_user} end configure_options += \ --sysconfdir=/etc/frr \ --localstatedir=%{localstatedir}/run/frr \ --disable-static \ --disable-watchfrr \ --enable-multipath=64 \ --disable-isisd \ --disable-pimd \ --disable-ripd \ --disable-ripngd install_cmds mkdir -pv %{localstatedir}/run/frr chown -v frr.frr %{localstatedir}/run/frr end end create_user getent group frr >/dev/null || /usr/sbin/groupadd -r frr getent passwd frr >/dev/null || /usr/sbin/useradd -r -g frr \ -d %{sysconfdir}/%{name} -s /sbin/nologin frr end packages package %{name} services = bgpd ospf6d ospfd zebra # This is a fork of quagga and installs binaries # with the same name. Hence we cannot install both # at the same time. conflicts = quagga script prein %{create_user} end script postin /bin/systemctl daemon-reload >/dev/null 2>&1 || : end script preun for i in %{services}; do systemctl --no-reload disable ${i}.service >/dev/null 2>&1 || : systemctl stop ${i}.service >/dev/null 2>&1 || : done end script postun systemctl daemon-reload >/dev/null 2>&1 || : end script postup systemctl daemon-reload >/dev/null 2>&1 || : for i in %{services}; do systemctl try-restart ${i}.service >/dev/null 2>&1 || : done end end package %{name}-libs template LIBS end package %{name}-devel template DEVEL end package %{name}-debuginfo template DEBUGINFO end end