]> git.pld-linux.org Git - packages/bird2.git/blob - bird2.spec
ceb651403c762034372be9b816fe6a0e9aeb6066
[packages/bird2.git] / bird2.spec
1 # Conditional build:
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
5 #
6 Summary:        The BIRD Internet Routing Daemon
7 Summary(pl.UTF-8):      Demon BIRD Internetowego Routingu Dynamicznego
8 Name:           bird2
9 Version:        2.0.10
10 Release:        0.1
11 License:        GPL v2+
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
17 Source2:        %{name}.init
18 Source3:        %{name}.sysconfig
19 Source4:        %{name}.service
20 URL:            https://bird.network.cz/
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  bison
24 BuildRequires:  flex
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
35 Requires:       rc-scripts
36 Requires(postun):       /usr/sbin/userdel
37 Requires(pre):  /usr/sbin/useradd
38 Obsoletes:      bird-ipv4
39 Obsoletes:      bird-ipv6
40 Obsoletes:      gated
41 Obsoletes:      mrt
42 Obsoletes:      zebra
43 Obsoletes:      zebra-guile
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
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.
51
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.
57
58 %prep
59 %setup -q -n bird-%{version} -a 1
60
61 %build
62 cp -f /usr/share/automake/config.* tools
63 %{__autoconf}
64
65 %configure \
66         --disable-memcheck \
67         --enable-client \
68         %{__enable_disable libssh libssh} \
69         %{__enable_disable mpls_kernel mpls-kernel} \
70
71 %{__make}
72 %{?with_docs:%{__make} docs}
73
74 %install
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}
78
79 %{__make} install \
80         DESTDIR=$RPM_BUILD_ROOT
81
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
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %pre
90 %groupadd -g 271 bird
91 %useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
92
93 %post
94 /sbin/chkconfig --add bird
95 %service bird restart "routing daemon"
96 %systemd_post bird.service
97
98 %preun
99 if [ "$1" = "0" ]; then
100         %service bird stop
101         /sbin/chkconfig --del bird
102 fi
103 %systemd_preun bird.service
104
105 %postun
106 if [ "$1" = "0" ]; then
107         %userremove bird
108         %groupremove bird
109 fi
110 %systemd_reload
111
112 %files
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
This page took 0.066452 seconds and 2 git commands to generate.