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