]> git.ipfire.org Git - ipfire-3.x.git/blame - frr/frr.nm
network: Depend on bird instead of frr
[ipfire-3.x.git] / frr / frr.nm
CommitLineData
81b63e16
MT
1###############################################################################
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
4###############################################################################
5
6name = frr
7version = 2.0
8release = 1
9
10groups = Networking/Routing
11url = https://frrouting.org
12license = GPLv2+
13summary = FRRouting is an IP routing protocol suite
14
15description
16 FRRouting (FRR) is an IP routing protocol suite for Linux and Unix
17 platforms which includes protocol daemons for BGP, IS-IS, LDP, OSPF,
18 PIM, and RIP.
19end
20
21source_dl = https://github.com/FRRouting/frr/releases/download/frr-%{version}/
22
23build
24 requires
25 json-c-devel
26 ncurses-devel
27 readline-devel
28 systemd-units
29 texinfo
30 end
31
32 prepare_cmds
33 %{create_user}
34 end
35
36 configure_options += \
37 --sysconfdir=/etc/frr \
38 --localstatedir=%{localstatedir}/run/frr \
39 --disable-static \
40 --disable-watchfrr \
41 --enable-multipath=64 \
42 --disable-isisd \
43 --disable-pimd \
44 --disable-ripd \
45 --disable-ripngd
46
47 install_cmds
48 mkdir -pv %{localstatedir}/run/frr
49 chown -v frr.frr %{localstatedir}/run/frr
50 end
51end
52
53create_user
54 getent group frr >/dev/null || /usr/sbin/groupadd -r frr
55 getent passwd frr >/dev/null || /usr/sbin/useradd -r -g frr \
56 -d %{sysconfdir}/%{name} -s /sbin/nologin frr
57end
58
59packages
60 package %{name}
61 services = bgpd ospf6d ospfd zebra
62
63 # This is a fork of quagga and installs binaries
64 # with the same name. Hence we cannot install both
65 # at the same time.
66 conflicts = quagga
67
68 script prein
69 %{create_user}
70 end
71
72 script postin
73 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
74 end
75
76 script preun
77 for i in %{services}; do
78 systemctl --no-reload disable ${i}.service >/dev/null 2>&1 || :
79 systemctl stop ${i}.service >/dev/null 2>&1 || :
80 done
81 end
82
83 script postun
84 systemctl daemon-reload >/dev/null 2>&1 || :
85 end
86
87 script postup
88 systemctl daemon-reload >/dev/null 2>&1 || :
89
90 for i in %{services}; do
91 systemctl try-restart ${i}.service >/dev/null 2>&1 || :
92 done
93 end
94 end
95
96 package %{name}-libs
97 template LIBS
98 end
99
100 package %{name}-devel
101 template DEVEL
102 end
103
104 package %{name}-debuginfo
105 template DEBUGINFO
106 end
107end