]> git.ipfire.org Git - ipfire-3.x.git/blob - frr/frr.nm
Merge remote-tracking branch 'arne_f/grub-2.02-final'
[ipfire-3.x.git] / frr / frr.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = frr
7 version = 2.0
8 release = 1
9
10 groups = Networking/Routing
11 url = https://frrouting.org
12 license = GPLv2+
13 summary = FRRouting is an IP routing protocol suite
14
15 description
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.
19 end
20
21 source_dl = https://github.com/FRRouting/frr/releases/download/frr-%{version}/
22
23 build
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
51 end
52
53 create_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
57 end
58
59 packages
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
107 end