2 %bcond_without docs # don't build html docs
3 %bcond_without libssh # disable libssh support in RPKI
4 %bcond_without mpls_kernel # disable MPLS support in kernel protocol
6 Summary: The BIRD Internet Routing Daemon
7 Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego
12 Group: Networking/Daemons
13 Source0: https://bird.network.cz/download/bird-%{version}.tar.gz
14 # Source0-md5: 1026621839e0162844afa991ad9a7355
15 Source1: https://bird.network.cz/download/bird-doc-%{version}.tar.gz
16 # Source1-md5: ad099b03849730aa7bd6931b89dae490
18 Source3: %{name}.sysconfig
19 Source4: %{name}.service
20 URL: https://bird.network.cz/
21 BuildRequires: autoconf
22 BuildRequires: automake
25 %{?with_libssh:BuildRequires: libssh-devel}
26 %{?with_docs:BuildRequires: opensp}
27 BuildRequires: readline-devel >= 4.2
28 BuildRequires: rpmbuild(macros) >= 1.268
29 %{?with_docs:BuildRequires: sgmls}
30 %{?with_docs:BuildRequires: sgml-tools}
31 %{?with_docs:BuildRequires: texlive-format-pdflatex}
32 %{?with_docs:BuildRequires: texlive-latex-enumitem}
33 %{?with_docs:BuildRequires: texlive-xetex}
34 Requires(post,preun): /sbin/chkconfig
36 Requires(postun): /usr/sbin/userdel
37 Requires(pre): /usr/sbin/useradd
43 Obsoletes: zebra-guile
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define _sysconfdir /etc/bird
49 The BIRD project is an attempt to create a routing daemon running on
50 UNIX-like systems (but not necessarily limited to them) with full
51 support of all modern routing protocols, easy to use configuration
52 interface and powerful route filtering language.
54 %description -l pl.UTF-8
55 Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
56 pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
57 protokołów routingu, łatwym interfejsem konfiguracji i językiem
58 filtrów o dużych możliwościach.
61 %setup -q -n bird-%{version} -a 1
64 cp -f /usr/share/automake/config.* tools
70 %{__enable_disable libssh libssh} \
71 %{__enable_disable mpls_kernel mpls-kernel} \
74 %{?with_docs:%{__make} docs}
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}} \
79 $RPM_BUILD_ROOT%{systemdunitdir}
82 DESTDIR=$RPM_BUILD_ROOT
84 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/bird
85 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/bird
86 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/bird.service
89 rm -rf $RPM_BUILD_ROOT
93 %useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
96 /sbin/chkconfig --add bird
97 %service bird restart "routing daemon"
98 %systemd_post bird.service
101 if [ "$1" = "0" ]; then
103 /sbin/chkconfig --del bird
105 %systemd_preun bird.service
108 if [ "$1" = "0" ]; then
115 %defattr(644,root,root,755)
116 %doc %{?with_docs:obj/doc/*.html} doc/reply_codes bird-doc-%{version}/doc/*.pdf ChangeLog NEWS README
118 %attr(755,root,root) %{_sbindir}/bird
119 %attr(755,root,root) %{_sbindir}/birdc
120 %attr(755,root,root) %{_sbindir}/birdcl
121 %attr(754,root,root) /etc/rc.d/init.d/bird
122 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird
123 %attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
124 %{systemdunitdir}/bird.service