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