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