]>
Commit | Line | Data |
---|---|---|
b6147e4b AG |
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 | ||
0fb912a0 AG |
46 | %define _sysconfdir /etc/bird |
47 | ||
b6147e4b AG |
48 | %description |
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. | |
53 | ||
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. | |
59 | ||
60 | %prep | |
61 | %setup -q -n bird-%{version} -a 1 | |
62 | ||
63 | %build | |
64 | cp -f /usr/share/automake/config.* tools | |
65 | %{__autoconf} | |
66 | ||
67 | %configure \ | |
68 | --disable-memcheck \ | |
69 | --enable-client \ | |
70 | %{__enable_disable libssh libssh} \ | |
71 | %{__enable_disable mpls_kernel mpls-kernel} \ | |
72 | ||
73 | %{__make} | |
74 | %{?with_docs:%{__make} docs} | |
75 | ||
76 | %install | |
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} | |
80 | ||
81 | %{__make} install \ | |
82 | DESTDIR=$RPM_BUILD_ROOT | |
83 | ||
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 | |
87 | ||
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %pre | |
92 | %groupadd -g 271 bird | |
93 | %useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird | |
94 | ||
95 | %post | |
96 | /sbin/chkconfig --add bird | |
97 | %service bird restart "routing daemon" | |
98 | %systemd_post bird.service | |
99 | ||
100 | %preun | |
101 | if [ "$1" = "0" ]; then | |
102 | %service bird stop | |
103 | /sbin/chkconfig --del bird | |
104 | fi | |
105 | %systemd_preun bird.service | |
106 | ||
107 | %postun | |
108 | if [ "$1" = "0" ]; then | |
109 | %userremove bird | |
110 | %groupremove bird | |
111 | fi | |
112 | %systemd_reload | |
113 | ||
114 | %files | |
115 | %defattr(644,root,root,755) | |
116 | %doc %{?with_docs:obj/doc/*.html} doc/reply_codes bird-doc-%{version}/doc/*.pdf ChangeLog NEWS README | |
0fb912a0 | 117 | %dir %{_sysconfdir} |
b6147e4b AG |
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 |