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)
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 %setup -q -n bird-%{version} -a 1
62 cp -f /usr/share/automake/config.* tools
68 %{__enable_disable libssh libssh} \
69 %{__enable_disable mpls_kernel mpls-kernel} \
72 %{?with_docs:%{__make} docs}
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}} \
77 $RPM_BUILD_ROOT%{systemdunitdir}
80 DESTDIR=$RPM_BUILD_ROOT
82 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/bird
83 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/bird
84 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/bird.service
87 rm -rf $RPM_BUILD_ROOT
91 %useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
94 /sbin/chkconfig --add bird
95 %service bird restart "routing daemon"
96 %systemd_post bird.service
99 if [ "$1" = "0" ]; then
101 /sbin/chkconfig --del bird
103 %systemd_preun bird.service
106 if [ "$1" = "0" ]; then
113 %defattr(644,root,root,755)
114 %doc %{?with_docs:obj/doc/*.html} doc/reply_codes bird-doc-%{version}/doc/*.pdf ChangeLog NEWS README
115 %attr(755,root,root) %{_sbindir}/bird
116 %attr(755,root,root) %{_sbindir}/birdc
117 %attr(755,root,root) %{_sbindir}/birdcl
118 %attr(754,root,root) /etc/rc.d/init.d/bird
119 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird
120 %attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
121 %{systemdunitdir}/bird.service