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