2 # - trigger to clean up after old bird package (stop, chkconfig --del)
5 %bcond_without ipv6 # disable IPv6 support (and building bird-ipv6 package)
6 %bcond_without ipv4 # disable IPv4 support (and building bird-ipv4 package)
7 %bcond_with alien # enable possibility to import 'alien' routes import into bird's routing table
9 Summary: The BIRD Internet Routing Daemon
10 Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego
15 Group: Networking/Daemons
16 Source0: https://bird.network.cz/download/%{name}-%{version}.tar.gz
17 # Source0-md5: abe29a927e21a3d7f8092641f06093c2
18 Source1: %{name}-ipv4.init
19 Source2: %{name}-ipv4.sysconfig
20 Source3: %{name}-ipv6.init
21 Source4: %{name}-ipv6.sysconfig
22 Source5: https://bird.network.cz/download/%{name}-doc-%{version}.tar.gz
23 # Source5-md5: d5b69caeee629479e0261aba18d35758
24 Source6: %{name}-ipv4.service
25 Source7: %{name}-ipv6.service
26 Patch0: %{name}-allowalien.patch
28 URL: https://bird.network.cz/
29 BuildRequires: autoconf
30 BuildRequires: automake
33 BuildRequires: readline-devel >= 4.2
34 BuildRequires: rpmbuild(macros) >= 1.268
35 Requires(post,preun): /sbin/chkconfig
38 Requires(postun): /usr/sbin/userdel
39 Requires(pre): /usr/sbin/useradd
43 Obsoletes: zebra-guile
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 The BIRD project is an attempt to create a routing daemon running on
48 UNIX-like systems (but not necessarily limited to them) with full
49 support of all modern routing protocols, easy to use configuration
50 interface and powerful route filtering language.
52 %description -l pl.UTF-8
53 Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
54 pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
55 protokołów routingu, łatwym interfejsem konfiguracji i językiem
56 filtrów o dużych możliwościach.
59 Summary: Routing daemon for IPv4
60 Summary(pl.UTF-8): Demon dynamicznego routingu IPv4
61 Group: Networking/Daemons
62 Requires(post,preun): /sbin/chkconfig
63 Requires: %{name} = %{version}-%{release}
66 Provides: routingdaemon
70 Obsoletes: zebra-guile
73 The BIRD project is an attempt to create a routing daemon running on
74 UNIX-like systems (but not necessarily limited to them) with full
75 support of all modern routing protocols, easy to use configuration
76 interface and powerful route filtering language.
78 %description ipv4 -l pl.UTF-8
79 Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
80 pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
81 protokołów routingu, łatwym interfejsem konfiguracji i językiem
82 filtrów o dużych możliwościach.
85 Summary: Routing daemon for IPv6
86 Summary(pl.UTF-8): Demon dynamicznego routingu IPv6
87 Group: Networking/Daemons
88 Requires(post,preun): /sbin/chkconfig
89 Requires: %{name} = %{version}-%{release}
92 Provides: routingdaemon
96 Obsoletes: zebra-guile
99 The BIRD project is an attempt to create a routing daemon running on
100 UNIX-like systems (but not necessarily limited to them) with full
101 support of all modern routing protocols, easy to use configuration
102 interface and powerful route filtering language.
104 %description ipv6 -l pl.UTF-8
105 Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
106 pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
107 protokołów routingu, łatwym interfejsem konfiguracji i językiem
108 filtrów o dużych możliwościach.
112 %{?with_alien:%patch0 -p1}
116 cp -f /usr/share/automake/config.* tools
119 export CFLAGS="%{rpmcflags} -I%{_includedir}/ncursesw -fno-strict-aliasing -fno-strict-overflow"
142 rm -rf $RPM_BUILD_ROOT
143 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}} \
144 $RPM_BUILD_ROOT%{systemdunitdir}
146 install birdc $RPM_BUILD_ROOT%{_sbindir}
149 install bird $RPM_BUILD_ROOT%{_sbindir}
150 install doc/bird.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
151 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv4
152 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv4
153 install %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-ipv4.service
157 install bird-6 $RPM_BUILD_ROOT%{_sbindir}
158 cat <<EOF > $RPM_BUILD_ROOT%{_sbindir}/birdc-6
160 exec %{_sbindir}/birdc -s /var/run/bird6.ctl
162 :> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}6.conf
163 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv6
164 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv6
165 install %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-ipv6.service
169 rm -rf $RPM_BUILD_ROOT
172 %groupadd -g 271 bird
173 %useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
176 if [ "$1" = "0" ]; then
182 /sbin/chkconfig --add %{name}-ipv4
183 %service %{name}-ipv4 restart "routing daemon"
184 %systemd_post %{name}-ipv4.service
187 if [ "$1" = "0" ]; then
188 %service %{name}-ipv4 stop
189 /sbin/chkconfig --del %{name}-ipv4
191 %systemd_preun %{name}-ipv4.service
197 /sbin/chkconfig --add %{name}-ipv6
198 %service %{name}-ipv6 restart "routing daemon"
199 %systemd_post %{name}-ipv6.service
202 if [ "$1" = "0" ]; then
203 %service %{name}-ipv6 stop
204 /sbin/chkconfig --del %{name}-ipv6
206 %systemd_preun %{name}-ipv6.service
211 %triggerpostun ipv4 -- %{name}-ipv4 < 1.3.4-3
212 chmod 0640 /etc/bird.conf
213 chgrp bird /etc/bird.conf
215 %triggerpostun -- %{name}-ipv4 < 1.4.5-2
216 %systemd_trigger %{name}-ipv4.service
218 %triggerpostun -- %{name}-ipv6 < 1.4.5-2
219 %systemd_trigger %{name}-ipv6.service
222 %defattr(644,root,root,755)
223 %doc doc/*.html doc/reply_codes %{name}-doc-%{version}/doc/*.pdf ChangeLog NEWS README
224 %attr(755,root,root) %{_sbindir}/birdc
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_sbindir}/bird
230 %attr(754,root,root) /etc/rc.d/init.d/bird-ipv4
231 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv4
232 %attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
233 %{systemdunitdir}/%{name}-ipv4.service
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_sbindir}/bird-6
240 %attr(755,root,root) %{_sbindir}/birdc-6
241 %attr(754,root,root) /etc/rc.d/init.d/bird-ipv6
242 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv6
243 %attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird6.conf
244 %{systemdunitdir}/%{name}-ipv6.service