]> git.pld-linux.org Git - packages/bird.git/blame - bird.spec
- up to 1.4.0
[packages/bird.git] / bird.spec
CommitLineData
587f8625
JK
1# TODO:
2# - trigger to clean up after old bird package (stop, chkconfig --del)
0e72880e
ER
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)
3c309a5c 7%bcond_with alien # enable possibility to import 'alien' routes import into bird's routing table
0e72880e 8#
46b7240d
TP
9Summary: The BIRD Internet Routing Daemon
10Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego
859a1f4d 11Name: bird
755c6187 12Version: 1.4.0
c9380a9b 13Release: 1
46b7240d 14License: GPL v2+
859a1f4d 15Group: Networking/Daemons
859a1f4d 16Source0: ftp://bird.network.cz/pub/bird/%{name}-%{version}.tar.gz
755c6187 17# Source0-md5: 4e5a47308335b1b0bf4691cac6c4174f
587f8625
JK
18Source1: %{name}-ipv4.init
19Source2: %{name}-ipv4.sysconfig
20Source3: %{name}-ipv6.init
21Source4: %{name}-ipv6.sysconfig
46b7240d 22Source5: ftp://bird.network.cz/pub/bird/%{name}-doc-%{version}.tar.gz
755c6187 23# Source5-md5: 0c482a356192abaf31fed6d07ace431d
dcb2fa8e 24Patch0: %{name}-allowalien.patch
859a1f4d 25URL: http://bird.network.cz/
42582df4 26BuildRequires: autoconf
bd9359d2 27BuildRequires: automake
0e8a59db 28BuildRequires: bison
29BuildRequires: flex
1e96d8fe 30BuildRequires: readline-devel >= 4.2
f3122825 31BuildRequires: rpmbuild(macros) >= 1.268
90026ef8 32Requires(post,preun): /sbin/chkconfig
587f8625 33Requires: bird-daemon
f3122825 34Requires: rc-scripts
fc243893
AM
35Requires(postun): /usr/sbin/userdel
36Requires(pre): /usr/sbin/useradd
bd846c8e 37Obsoletes: gated
dab997f5 38Obsoletes: mrt
bd846c8e 39Obsoletes: zebra
40Obsoletes: zebra-guile
f3122825 41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
859a1f4d
AM
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
bf003f25 49%description -l pl.UTF-8
859a1f4d 50Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
bf003f25
JR
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.
859a1f4d 54
587f8625
JK
55%package ipv4
56Summary: Routing daemon for IPv4
6317c737 57Summary(pl.UTF-8): Demon dynamicznego routingu IPv4
587f8625 58Group: Networking/Daemons
587f8625 59Requires(post,preun): /sbin/chkconfig
f3122825
ER
60Requires: %{name} = %{version}-%{release}
61Requires: rc-scripts
587f8625 62Provides: bird-daemon
f3122825 63Provides: routingdaemon
587f8625
JK
64Obsoletes: gated
65Obsoletes: mrt
66Obsoletes: zebra
67Obsoletes: zebra-guile
587f8625
JK
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
bf003f25 75%description ipv4 -l pl.UTF-8
587f8625 76Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
bf003f25
JR
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.
587f8625
JK
80
81%package ipv6
82Summary: Routing daemon for IPv6
6317c737 83Summary(pl.UTF-8): Demon dynamicznego routingu IPv6
587f8625 84Group: Networking/Daemons
587f8625 85Requires(post,preun): /sbin/chkconfig
f3122825
ER
86Requires: %{name} = %{version}-%{release}
87Requires: rc-scripts
587f8625 88Provides: bird-daemon
f3122825 89Provides: routingdaemon
587f8625
JK
90Obsoletes: gated
91Obsoletes: mrt
92Obsoletes: zebra
93Obsoletes: zebra-guile
587f8625
JK
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
bf003f25 101%description ipv6 -l pl.UTF-8
587f8625 102Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
bf003f25
JR
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.
587f8625 106
859a1f4d 107%prep
46b7240d 108%setup -q -a 5
dbe442d0 109%{?with_alien:%patch0 -p1}
859a1f4d
AM
110
111%build
bd9359d2 112cp -f /usr/share/automake/config.* tools
46b7240d
TP
113%{__autoconf}
114
f455108b 115export CFLAGS="%{rpmcflags} -I%{_includedir}/ncursesw"
587f8625
JK
116
117%if %{with ipv6}
587f8625 118%configure \
859a1f4d
AM
119 --disable-memcheck \
120 --enable-client \
121 --enable-ipv6
b90dbe4c 122%{__make} -j1
859a1f4d 123
587f8625
JK
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
b90dbe4c 134%{__make} -j1
587f8625
JK
135%endif
136
859a1f4d
AM
137%install
138rm -rf $RPM_BUILD_ROOT
587f8625 139install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}}
859a1f4d 140
bd846c8e 141install birdc $RPM_BUILD_ROOT%{_sbindir}
142
2770ad60 143%if %{with ipv4}
587f8625 144install bird $RPM_BUILD_ROOT%{_sbindir}
bd846c8e 145install doc/bird.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
587f8625
JK
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
c51371c4 154exec %{_sbindir}/birdc -s /var/run/bird6.ctl
587f8625 155EOF
d1aeed34 156:> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}6.conf
587f8625
JK
157install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv6
158install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv6
159%endif
bd846c8e 160
e7d0d739
JB
161%clean
162rm -rf $RPM_BUILD_ROOT
163
fc243893
AM
164%pre
165%groupadd -g 271 bird
166%useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
167
168%postun
169if [ "$1" = "0" ]; then
170 %userremove bird
171 %groupremove bird
172fi
173
587f8625 174%post ipv4
f3122825
ER
175/sbin/chkconfig --add %{name}-ipv4
176%service %{name}-ipv4 restart "routing daemon"
7873eba9 177
587f8625 178%preun ipv4
cddbae54 179if [ "$1" = "0" ]; then
f3122825
ER
180 %service %{name}-ipv4 stop
181 /sbin/chkconfig --del %{name}-ipv4
587f8625
JK
182fi
183
184%post ipv6
f3122825
ER
185/sbin/chkconfig --add %{name}-ipv6
186%service %{name}-ipv6 restart "routing daemon"
587f8625
JK
187
188%preun ipv6
189if [ "$1" = "0" ]; then
f3122825
ER
190 %service %{name}-ipv6 stop
191 /sbin/chkconfig --del %{name}-ipv6
cddbae54 192fi
859a1f4d 193
4be85d6d 194%triggerpostun ipv4 -- %{name}-ipv4 < 1.3.4-3
2c57648d 195chmod 0640 /etc/bird.conf
8bee0433
AM
196chgrp bird /etc/bird.conf
197
859a1f4d 198%files
d889a53b 199%defattr(644,root,root,755)
46b7240d 200%doc doc/*.html doc/reply_codes %{name}-doc-%{version}/doc/*.ps ChangeLog NEWS README TODO
587f8625
JK
201%attr(755,root,root) %{_sbindir}/birdc
202
203%if %{with ipv4}
204%files ipv4
859a1f4d 205%defattr(644,root,root,755)
587f8625
JK
206%attr(755,root,root) %{_sbindir}/bird
207%attr(754,root,root) /etc/rc.d/init.d/bird-ipv4
a24fb93f 208%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv4
bf535bdb 209%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
587f8625 210%endif
859a1f4d 211
587f8625
JK
212%if %{with ipv6}
213%files ipv6
214%defattr(644,root,root,755)
215%attr(755,root,root) %{_sbindir}/bird-6
216%attr(755,root,root) %{_sbindir}/birdc-6
a24fb93f
TP
217%attr(754,root,root) /etc/rc.d/init.d/bird-ipv6
218%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv6
d1aeed34 219%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird6.conf
587f8625 220%endif
This page took 0.115404 seconds and 4 git commands to generate.