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