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