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