]> git.pld-linux.org Git - packages/bird.git/blame_incremental - bird.spec
- switch to https
[packages/bird.git] / bird.spec
... / ...
CommitLineData
1# TODO:
2# - trigger to clean up after old bird package (stop, chkconfig --del)
3#
4# Conditional build:
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
8#
9Summary: The BIRD Internet Routing Daemon
10Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego
11Name: bird
12Version: 1.6.4
13Release: 1
14License: GPL v2+
15Group: Networking/Daemons
16Source0: ftp://bird.network.cz/pub/bird/%{name}-%{version}.tar.gz
17# Source0-md5: d62ec2547338e8d3dfb934b4c7b2faa4
18Source1: %{name}-ipv4.init
19Source2: %{name}-ipv4.sysconfig
20Source3: %{name}-ipv6.init
21Source4: %{name}-ipv6.sysconfig
22Source5: ftp://bird.network.cz/pub/bird/%{name}-doc-%{version}.tar.gz
23# Source5-md5: 0e09c17eaadd2f734720a3b67523d440
24Source6: %{name}-ipv4.service
25Source7: %{name}-ipv6.service
26Patch0: %{name}-allowalien.patch
27URL: http://bird.network.cz/
28BuildRequires: autoconf
29BuildRequires: automake
30BuildRequires: bison
31BuildRequires: flex
32BuildRequires: readline-devel >= 4.2
33BuildRequires: rpmbuild(macros) >= 1.268
34Requires(post,preun): /sbin/chkconfig
35Requires: bird-daemon
36Requires: rc-scripts
37Requires(postun): /usr/sbin/userdel
38Requires(pre): /usr/sbin/useradd
39Obsoletes: gated
40Obsoletes: mrt
41Obsoletes: zebra
42Obsoletes: zebra-guile
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%description
46The BIRD project is an attempt to create a routing daemon running on
47UNIX-like systems (but not necessarily limited to them) with full
48support of all modern routing protocols, easy to use configuration
49interface and powerful route filtering language.
50
51%description -l pl.UTF-8
52Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
53pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
54protokołów routingu, łatwym interfejsem konfiguracji i językiem
55filtrów o dużych możliwościach.
56
57%package ipv4
58Summary: Routing daemon for IPv4
59Summary(pl.UTF-8): Demon dynamicznego routingu IPv4
60Group: Networking/Daemons
61Requires(post,preun): /sbin/chkconfig
62Requires: %{name} = %{version}-%{release}
63Requires: rc-scripts
64Provides: bird-daemon
65Provides: routingdaemon
66Obsoletes: gated
67Obsoletes: mrt
68Obsoletes: zebra
69Obsoletes: zebra-guile
70
71%description ipv4
72The BIRD project is an attempt to create a routing daemon running on
73UNIX-like systems (but not necessarily limited to them) with full
74support of all modern routing protocols, easy to use configuration
75interface and powerful route filtering language.
76
77%description ipv4 -l pl.UTF-8
78Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
79pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
80protokołów routingu, łatwym interfejsem konfiguracji i językiem
81filtrów o dużych możliwościach.
82
83%package ipv6
84Summary: Routing daemon for IPv6
85Summary(pl.UTF-8): Demon dynamicznego routingu IPv6
86Group: Networking/Daemons
87Requires(post,preun): /sbin/chkconfig
88Requires: %{name} = %{version}-%{release}
89Requires: rc-scripts
90Provides: bird-daemon
91Provides: routingdaemon
92Obsoletes: gated
93Obsoletes: mrt
94Obsoletes: zebra
95Obsoletes: zebra-guile
96
97%description ipv6
98The BIRD project is an attempt to create a routing daemon running on
99UNIX-like systems (but not necessarily limited to them) with full
100support of all modern routing protocols, easy to use configuration
101interface and powerful route filtering language.
102
103%description ipv6 -l pl.UTF-8
104Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
105pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
106protokołów routingu, łatwym interfejsem konfiguracji i językiem
107filtrów o dużych możliwościach.
108
109%prep
110%setup -q -a 5
111%{?with_alien:%patch0 -p1}
112
113%build
114cp -f /usr/share/automake/config.* tools
115%{__autoconf}
116
117export CFLAGS="%{rpmcflags} -I%{_includedir}/ncursesw -fno-strict-aliasing -fno-strict-overflow"
118
119%if %{with ipv6}
120%configure \
121 --disable-memcheck \
122 --enable-client \
123 --enable-ipv6
124%{__make} -j1
125
126mv bird bird-6
127
128%{__make} clean
129%endif
130
131%if %{with ipv4}
132%configure \
133 --disable-memcheck \
134 --enable-client \
135 --disable-ipv6
136%{__make} -j1
137%endif
138
139%install
140rm -rf $RPM_BUILD_ROOT
141install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}} \
142 $RPM_BUILD_ROOT%{systemdunitdir}
143
144install birdc $RPM_BUILD_ROOT%{_sbindir}
145
146%if %{with ipv4}
147install bird $RPM_BUILD_ROOT%{_sbindir}
148install doc/bird.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
149install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv4
150install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv4
151install %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-ipv4.service
152%endif
153
154%if %{with ipv6}
155install bird-6 $RPM_BUILD_ROOT%{_sbindir}
156cat <<EOF > $RPM_BUILD_ROOT%{_sbindir}/birdc-6
157#!/bin/sh
158exec %{_sbindir}/birdc -s /var/run/bird6.ctl
159EOF
160:> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}6.conf
161install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv6
162install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv6
163install %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-ipv6.service
164%endif
165
166%clean
167rm -rf $RPM_BUILD_ROOT
168
169%pre
170%groupadd -g 271 bird
171%useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
172
173%postun
174if [ "$1" = "0" ]; then
175 %userremove bird
176 %groupremove bird
177fi
178
179%post ipv4
180/sbin/chkconfig --add %{name}-ipv4
181%service %{name}-ipv4 restart "routing daemon"
182%systemd_post %{name}-ipv4.service
183
184%preun ipv4
185if [ "$1" = "0" ]; then
186 %service %{name}-ipv4 stop
187 /sbin/chkconfig --del %{name}-ipv4
188fi
189%systemd_preun %{name}-ipv4.service
190
191%postun ipv4
192%systemd_reload
193
194%post ipv6
195/sbin/chkconfig --add %{name}-ipv6
196%service %{name}-ipv6 restart "routing daemon"
197%systemd_post %{name}-ipv6.service
198
199%preun ipv6
200if [ "$1" = "0" ]; then
201 %service %{name}-ipv6 stop
202 /sbin/chkconfig --del %{name}-ipv6
203fi
204%systemd_preun %{name}-ipv6.service
205
206%postun ipv6
207%systemd_reload
208
209%triggerpostun ipv4 -- %{name}-ipv4 < 1.3.4-3
210chmod 0640 /etc/bird.conf
211chgrp bird /etc/bird.conf
212
213%triggerpostun -- %{name}-ipv4 < 1.4.5-2
214%systemd_trigger %{name}-ipv4.service
215
216%triggerpostun -- %{name}-ipv6 < 1.4.5-2
217%systemd_trigger %{name}-ipv6.service
218
219%files
220%defattr(644,root,root,755)
221%doc doc/*.html doc/reply_codes %{name}-doc-%{version}/doc/*.pdf ChangeLog NEWS README
222%attr(755,root,root) %{_sbindir}/birdc
223
224%if %{with ipv4}
225%files ipv4
226%defattr(644,root,root,755)
227%attr(755,root,root) %{_sbindir}/bird
228%attr(754,root,root) /etc/rc.d/init.d/bird-ipv4
229%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv4
230%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
231%{systemdunitdir}/%{name}-ipv4.service
232%endif
233
234%if %{with ipv6}
235%files ipv6
236%defattr(644,root,root,755)
237%attr(755,root,root) %{_sbindir}/bird-6
238%attr(755,root,root) %{_sbindir}/birdc-6
239%attr(754,root,root) /etc/rc.d/init.d/bird-ipv6
240%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv6
241%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird6.conf
242%{systemdunitdir}/%{name}-ipv6.service
243%endif
This page took 0.105207 seconds and 4 git commands to generate.