]>
Commit | Line | Data |
---|---|---|
edd7c245 | 1 | # configure options |
68980084 | 2 | %define with_snmp 0 |
788cdc6d | 3 | %define with_vtysh 1 |
4 | %define with_ospf_te 1 | |
5 | %define with_nssa 1 | |
6 | %define with_opaque_lsa 1 | |
7 | %define with_tcp_zebra 0 | |
8 | %define with_vtysh 1 | |
9 | %define with_pam 1 | |
10 | %define with_ipv6 1 | |
55ea381f | 11 | %define with_ospfclient 1 |
12 | %define with_ospfapi 1 | |
8f754983 | 13 | %define with_multipath 64 |
6bd8fd3b | 14 | %define quagga_user quagga |
45315b5d | 15 | %define vty_group quaggavty |
30b9d89b | 16 | |
17 | # path defines | |
6bd8fd3b | 18 | %define _sysconfdir /etc/quagga |
8f754983 | 19 | %define zeb_src %{_builddir}/%{name}-%{version} |
20 | %define zeb_rh_src %{zeb_src}/redhat | |
21 | %define zeb_docs %{zeb_src}/doc | |
788cdc6d | 22 | |
e0626854 | 23 | # defines for configure |
6bd8fd3b | 24 | %define _libexecdir %{_exec_prefix}/libexec/quagga |
25 | %define _includedir %{_prefix}/include/quagga | |
26 | %define _libdir %{_exec_prefix}/%{_lib}/quagga | |
27 | %define _localstatedir /var/run/quagga | |
e0626854 | 28 | |
788cdc6d | 29 | Summary: Routing daemon |
6bd8fd3b | 30 | Name: quagga |
6382b6f8 | 31 | Version: @VERSION@ |
edd7c245 | 32 | Release: @CONFDATE@01 |
788cdc6d | 33 | License: GPL |
34 | Group: System Environment/Daemons | |
6bd8fd3b | 35 | Source0: http://www.quagga.net/snapshots/cvs/%{name}-%{version}.tar.gz |
36 | URL: http://www.quagga.net | |
788cdc6d | 37 | %if %with_snmp |
e0626854 | 38 | #BuildRequires: ucd-snmp-devel |
788cdc6d | 39 | Prereq: ucd-snmp |
40 | %endif | |
d7ccae28 | 41 | %if %with_vtysh |
30b9d89b | 42 | BuildRequires: readline readline-devel ncurses ncurses-devel |
d7ccae28 | 43 | Prereq: readline ncurses |
44 | %endif | |
6bd8fd3b | 45 | BuildRequires: texinfo tetex autoconf pam-devel patch |
788cdc6d | 46 | # Initscripts > 5.60 is required for IPv6 support |
30b9d89b | 47 | Prereq: initscripts >= 5.60 |
45315b5d | 48 | Prereq: ncurses readline pam |
788cdc6d | 49 | Prereq: /sbin/install-info |
50 | Provides: routingdaemon | |
51 | BuildRoot: %{_tmppath}/%{name}-%{version}-root | |
6bd8fd3b | 52 | Obsoletes: bird gated mrt zebra |
788cdc6d | 53 | |
54 | %description | |
6bd8fd3b | 55 | Quagga is a free software that manages TCP/IP based routing |
788cdc6d | 56 | protocol. It takes multi-server and multi-thread approach to resolve |
57 | the current complexity of the Internet. | |
58 | ||
6bd8fd3b | 59 | Quagga supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, and RIPng. |
788cdc6d | 60 | |
6bd8fd3b | 61 | Quagga is intended to be used as a Route Server and a Route Reflector. It is |
62 | not a toolkit, it provides full routing power under a new architecture. | |
63 | Quagga by design has a process for each protocol. | |
64 | ||
65 | Quagga is a fork of GNU Zebra. | |
788cdc6d | 66 | |
448ed4a2 | 67 | %package contrib |
6bd8fd3b | 68 | Summary: contrib tools for quagga |
448ed4a2 | 69 | Group: System Environment/Daemons |
70 | ||
71 | %description contrib | |
6bd8fd3b | 72 | Contributed/3rd party tools which may be of use with quagga. |
448ed4a2 | 73 | |
e0626854 | 74 | %package devel |
6bd8fd3b | 75 | Summary: Header and object files for quagga development |
e0626854 | 76 | Group: System Environment/Daemons |
77 | ||
78 | %description devel | |
6bd8fd3b | 79 | The quagga-devel package contains the header and object files neccessary for |
80 | developing OSPF-API and quagga applications. | |
e0626854 | 81 | |
788cdc6d | 82 | %prep |
83 | %setup -q | |
788cdc6d | 84 | |
85 | %build | |
86 | %configure \ | |
788cdc6d | 87 | %if %with_ipv6 |
88 | --enable-ipv6 \ | |
89 | %endif | |
90 | %if %with_snmp | |
91 | --enable-snmp \ | |
92 | %endif | |
93 | %if %with_multipath | |
94 | --enable-multipath=%with_multipath \ | |
95 | %endif | |
96 | %if %with_tcp_zebra | |
97 | --enable-tcp-zebra \ | |
98 | %endif | |
99 | %if %with_nssa | |
100 | --enable-nssa \ | |
101 | %endif | |
102 | %if %with_opaque_lsa | |
103 | --enable-opaque-lsa \ | |
104 | %endif | |
105 | %if %with_ospf_te | |
106 | --enable-ospf-te \ | |
107 | %endif | |
108 | %if %with_vtysh | |
109 | --enable-vtysh \ | |
110 | %endif | |
68980084 | 111 | %if %with_ospfclient |
112 | --enable-ospfclient=yes \ | |
113 | %else | |
114 | --enable-ospfclient=no\ | |
115 | %endif | |
116 | %if %with_ospfapi | |
117 | --enable-ospfapi=yes \ | |
118 | %else | |
119 | --enable-ospfapi=no \ | |
120 | %endif | |
788cdc6d | 121 | %if %with_pam |
edd7c245 | 122 | --with-libpam \ |
788cdc6d | 123 | %endif |
6bd8fd3b | 124 | %if %quagga_user |
125 | --enable-user=%quagga_user \ | |
126 | --enable-group=%quagga_user \ | |
edd7c245 | 127 | %endif |
128 | %if %vty_group | |
129 | --enable-vty-group=%vty_group \ | |
130 | %endif | |
edd7c245 | 131 | --enable-netlink |
788cdc6d | 132 | |
133 | make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" | |
134 | ||
135 | pushd doc | |
6bd8fd3b | 136 | texi2html quagga.texi |
788cdc6d | 137 | popd |
138 | ||
139 | %install | |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | ||
142 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d,pam.d} \ | |
6bd8fd3b | 143 | $RPM_BUILD_ROOT/var/log/quagga $RPM_BUILD_ROOT%{_infodir} |
788cdc6d | 144 | |
145 | make install \ | |
146 | DESTDIR=$RPM_BUILD_ROOT | |
147 | ||
9a344b74 | 148 | # Remove this file, as it is uninstalled and causes errors when building on RH9 |
149 | rm -rf $RPM_BUILD_ROOT/usr/share/info/dir | |
150 | ||
8f754983 | 151 | install %{zeb_rh_src}/zebra.init $RPM_BUILD_ROOT/etc/rc.d/init.d/zebra |
152 | install %{zeb_rh_src}/bgpd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/bgpd | |
d7ccae28 | 153 | %if %with_ipv6 |
8f754983 | 154 | install %{zeb_rh_src}/ospf6d.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ospf6d |
155 | install %{zeb_rh_src}/ripngd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ripngd | |
d7ccae28 | 156 | %endif |
8f754983 | 157 | install %{zeb_rh_src}/ospfd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ospfd |
158 | install %{zeb_rh_src}/ripd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ripd | |
6bd8fd3b | 159 | install -m644 %{zeb_rh_src}/quagga.pam $RPM_BUILD_ROOT/etc/pam.d/quagga |
160 | install -m644 %{zeb_rh_src}/quagga.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/quagga | |
161 | install -d -m750 $RPM_BUILD_ROOT/var/run/quagga | |
edd7c245 | 162 | |
163 | %pre | |
164 | # add vty_group | |
165 | %if %vty_group | |
166 | groupadd -r %vty_group 2> /dev/null || : | |
167 | %endif | |
6bd8fd3b | 168 | # add quagga user and group |
169 | %if %quagga_user | |
170 | /usr/sbin/useradd -M -r -s /bin/false -c "Quagga routing suite" \ | |
171 | -d %_localstatedir %quagga_user 2> /dev/null || : | |
edd7c245 | 172 | %endif |
788cdc6d | 173 | |
788cdc6d | 174 | %post |
30b9d89b | 175 | # zebra_spec_add_service <service name> <port/proto> <comment> |
788cdc6d | 176 | # e.g. zebra_spec_add_service zebrasrv 2600/tcp "zebra service" |
177 | ||
178 | zebra_spec_add_service () | |
179 | { | |
180 | # Add port /etc/services entry if it isn't already there | |
181 | if [ -f /etc/services ] && ! grep -q "^$1[^a-zA-Z0-9]" /etc/services ; then | |
182 | echo "$1 $2 # $3" >> /etc/services | |
183 | fi | |
184 | } | |
185 | ||
186 | zebra_spec_add_service zebrasrv 2600/tcp "zebra service" | |
187 | zebra_spec_add_service zebra 2601/tcp "zebra vty" | |
188 | zebra_spec_add_service ripd 2602/tcp "RIPd vty" | |
d7ccae28 | 189 | %if %with_ipv6 |
788cdc6d | 190 | zebra_spec_add_service ripngd 2603/tcp "RIPngd vty" |
d7ccae28 | 191 | %endif |
788cdc6d | 192 | zebra_spec_add_service ospfd 2604/tcp "OSPFd vty" |
193 | zebra_spec_add_service bgpd 2605/tcp "BGPd vty" | |
d7ccae28 | 194 | %if %with_ipv6 |
788cdc6d | 195 | zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty" |
d7ccae28 | 196 | %endif |
7021c425 | 197 | %if %with_ospfapi |
198 | zebra_spec_add_service ospfapi 2607/tcp "OSPF-API" | |
199 | %endif | |
788cdc6d | 200 | |
201 | /sbin/chkconfig --add zebra | |
202 | /sbin/chkconfig --add ripd | |
d7ccae28 | 203 | %if %with_ipv6 |
788cdc6d | 204 | /sbin/chkconfig --add ripngd |
788cdc6d | 205 | /sbin/chkconfig --add ospf6d |
d7ccae28 | 206 | %endif |
30b9d89b | 207 | /sbin/chkconfig --add ospfd |
788cdc6d | 208 | /sbin/chkconfig --add bgpd |
209 | ||
6bd8fd3b | 210 | /sbin/install-info %{_infodir}/quagga.info.gz %{_infodir}/dir |
788cdc6d | 211 | |
212 | # Create dummy files if they don't exist so basic functions can be used. | |
213 | if [ ! -e %{_sysconfdir}/zebra.conf ]; then | |
214 | echo "hostname `hostname`" > %{_sysconfdir}/zebra.conf | |
215 | chmod 640 %{_sysconfdir}/zebra.conf | |
216 | fi | |
217 | if [ ! -e %{_sysconfdir}/vtysh.conf ]; then | |
218 | touch %{_sysconfdir}/vtysh.conf | |
219 | chmod 640 %{_sysconfdir}/vtysh.conf | |
220 | fi | |
221 | ||
222 | %postun | |
223 | if [ "$1" -ge "1" ]; then | |
224 | /etc/rc.d/init.d/zebra condrestart >/dev/null 2>&1 | |
225 | /etc/rc.d/init.d/ripd condrestart >/dev/null 2>&1 | |
d7ccae28 | 226 | %if %with_ipv6 |
788cdc6d | 227 | /etc/rc.d/init.d/ripngd condrestart >/dev/null 2>&1 |
d7ccae28 | 228 | %endif |
788cdc6d | 229 | /etc/rc.d/init.d/ospfd condrestart >/dev/null 2>&1 |
d7ccae28 | 230 | %if %with_ipv6 |
788cdc6d | 231 | /etc/rc.d/init.d/ospf6d condrestart >/dev/null 2>&1 |
d7ccae28 | 232 | %endif |
788cdc6d | 233 | /etc/rc.d/init.d/bgpd condrestart >/dev/null 2>&1 |
234 | fi | |
6bd8fd3b | 235 | /sbin/install-info --delete %{_infodir}/quagga.info.gz %{_infodir}/dir |
788cdc6d | 236 | |
237 | %preun | |
238 | if [ "$1" = "0" ]; then | |
239 | /sbin/chkconfig --del zebra | |
240 | /sbin/chkconfig --del ripd | |
d7ccae28 | 241 | %if %with_ipv6 |
788cdc6d | 242 | /sbin/chkconfig --del ripngd |
d7ccae28 | 243 | %endif |
788cdc6d | 244 | /sbin/chkconfig --del ospfd |
d7ccae28 | 245 | %if %with_ipv6 |
788cdc6d | 246 | /sbin/chkconfig --del ospf6d |
d7ccae28 | 247 | %endif |
788cdc6d | 248 | /sbin/chkconfig --del bgpd |
249 | fi | |
250 | ||
251 | %clean | |
252 | #rm -rf $RPM_BUILD_ROOT | |
253 | ||
254 | %files | |
255 | %defattr(-,root,root) | |
448ed4a2 | 256 | %doc */*.sample* AUTHORS COPYING |
6bd8fd3b | 257 | %doc doc/quagga.html |
30b9d89b | 258 | %doc doc/mpls |
8f754983 | 259 | %doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO |
6bd8fd3b | 260 | %if %quagga_user |
261 | %dir %attr(751,%quagga_user,%quagga_user) %{_sysconfdir} | |
262 | %dir %attr(750,%quagga_user,%quagga_user) /var/log/quagga | |
263 | %dir %attr(751,%quagga_user,%quagga_user) /var/run/quagga | |
edd7c245 | 264 | %else |
788cdc6d | 265 | %dir %attr(750,root,root) %{_sysconfdir} |
6bd8fd3b | 266 | %dir %attr(750,root,root) /var/log/quagga |
788cdc6d | 267 | %dir %attr(755,root,root) /usr/share/info |
6bd8fd3b | 268 | %dir %attr(750,root,root) /var/run/quagga |
edd7c245 | 269 | %endif |
270 | %if %vty_group | |
6bd8fd3b | 271 | %attr(750,%quagga_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample |
edd7c245 | 272 | %endif |
788cdc6d | 273 | %{_infodir}/*info* |
274 | %{_mandir}/man*/* | |
275 | %{_sbindir}/* | |
d7ccae28 | 276 | %if %with_vtysh |
788cdc6d | 277 | %{_bindir}/* |
d7ccae28 | 278 | %endif |
6bd8fd3b | 279 | %config /etc/quagga/[!v]* |
788cdc6d | 280 | %config /etc/rc.d/init.d/* |
6bd8fd3b | 281 | %config(noreplace) /etc/pam.d/quagga |
788cdc6d | 282 | %config(noreplace) %attr(640,root,root) /etc/logrotate.d/* |
283 | ||
448ed4a2 | 284 | %files contrib |
285 | %defattr(-,root,root) | |
286 | %doc tools | |
287 | ||
e0626854 | 288 | %files devel |
289 | %defattr(-,root,root) | |
290 | %dir %{_libdir}/* | |
406f7000 | 291 | %dir %{_includedir}/*.h |
68980084 | 292 | %dir %{_includedir}/ospfd/* |
293 | %if %with_ospfapi | |
e0626854 | 294 | %dir %{_includedir}/ospfapi/* |
68980084 | 295 | %endif |
e0626854 | 296 | |
788cdc6d | 297 | %changelog |
406f7000 | 298 | * Sun Nov 2 2003 Paul Jakma <paul@dishone.st> |
299 | - Fix -devel package to include all files | |
300 | - Sync to 0.96.4 | |
301 | ||
6bd8fd3b | 302 | * Tue Aug 12 2003 Paul Jakma <paul@dishone.st> |
303 | - Renamed to Quagga | |
304 | - Sync to Quagga release 0.96 | |
305 | ||
edd7c245 | 306 | * Tue Mar 20 2003 Paul Jakma <paul@dishone.st> |
307 | - zebra privileges support | |
308 | ||
e0626854 | 309 | * Mon Mar 18 2003 Paul Jakma <paul@dishone.st> |
310 | - Fix mem leak in 'show thread cpu' | |
311 | - Ralph Keller's OSPF-API | |
312 | - Amir: Fix configure.ac for net-snmp | |
313 | ||
448ed4a2 | 314 | * Sat Mar 1 2003 Paul Jakma <paul@dishone.st> |
315 | - ospfd IOS prefix to interface matching for 'network' statement | |
316 | - temporary fix for PtP and IPv6 | |
317 | - sync to zebra.org CVS | |
318 | ||
8f754983 | 319 | * Mon Jan 20 2003 Paul Jakma <paul@dishone.st> |
320 | - update to latest cvs | |
321 | - Yon's "show thread cpu" patch - 17217 | |
322 | - walk up tree - 17218 | |
323 | - ospfd NSSA fixes - 16681 | |
324 | - ospfd nsm fixes - 16824 | |
325 | - ospfd OLSA fixes and new feature - 16823 | |
326 | - KAME and ifindex fixes - 16525 | |
327 | - spec file changes to allow redhat files to be in tree | |
328 | ||
d7ccae28 | 329 | * Sat Dec 28 2002 Alexander Hoogerhuis <alexh@ihatent.com> |
330 | - Added conditionals for building with(out) IPv6, vtysh, RIP, BGP | |
331 | - Fixed up some build requirements (patch) | |
332 | - Added conditional build requirements for vtysh / snmp | |
333 | - Added conditional to %files for %_bindir depending on vtysh | |
334 | ||
788cdc6d | 335 | * Mon Nov 11 2002 Paul Jakma <paulj@alphyra.ie> |
336 | - update to latest CVS | |
337 | - add Greg Troxel's md5 buffer copy/dup fix | |
338 | - add RIPv1 fix | |
339 | - add Frank's multicast flag fix | |
340 | ||
341 | * Wed Oct 09 2002 Paul Jakma <paulj@alphyra.ie> | |
342 | - update to latest CVS | |
343 | - timestamped crypt_seqnum patch | |
344 | - oi->on_write_q fix | |
345 | ||
346 | * Mon Sep 30 2002 Paul Jakma <paulj@alphyra.ie> | |
347 | - update to latest CVS | |
348 | - add vtysh 'write-config (integrated|daemon)' patch | |
349 | - always 'make rebuild' in vtysh/ to catch new commands | |
350 | ||
351 | * Fri Sep 13 2002 Paul Jakma <paulj@alphyra.ie> | |
352 | - update to 0.93b | |
353 | ||
354 | * Wed Sep 11 2002 Paul Jakma <paulj@alphyra.ie> | |
355 | - update to latest CVS | |
356 | - add "/sbin/ip route flush proto zebra" to zebra RH init on startup | |
357 | ||
358 | * Sat Aug 24 2002 Paul Jakma <paulj@alphyra.ie> | |
359 | - update to current CVS | |
360 | - add OSPF point to multipoint patch | |
361 | - add OSPF bugfixes | |
362 | - add BGP hash optimisation patch | |
363 | ||
364 | * Fri Jun 14 2002 Paul Jakma <paulj@alphyra.ie> | |
365 | - update to 0.93-pre1 / CVS | |
366 | - add link state detection support | |
367 | - add generic PtP and RFC3021 support | |
368 | - various bug fixes | |
369 | ||
370 | * Thu Aug 09 2001 Elliot Lee <sopwith@redhat.com> 0.91a-6 | |
371 | - Fix bug #51336 | |
372 | ||
373 |