%define with_ospfclient 1
%define with_ospfapi 1
%define with_irdp 1
+%define with_isisd 0
+%define with_shared 1
%define with_multipath 64
%define quagga_user quagga
%define vty_group quaggavty
# misc internal defines
%define quagga_uid 92
%define quagga_gid 92
-%if %with_ipv6
-%define daemon_list zebra ripd isisd ospfd ripngd ospf6d bgpd
+%define daemon_list zebra ripd ospfd bgpd
+
+%if %{with_ipv6}
+%define daemonv6_list %{daemon_list} ripngd ospf6d
+%else
+%define daemonv6_list ""
+%endif
+
+%if %{with_isisd}
+%define daemon_other isisd
%else
-%define daemon_list zebra ripd isisd ospfd bgpd
+%define daemon_other ""
%endif
+# allow build dir to be kept
+%define keep_build 0
+
Summary: Routing daemon
Name: quagga
Version: @VERSION@
Group: System Environment/Daemons
Source0: http://www.quagga.net/snapshots/cvs/%{name}-%{version}.tar.gz
URL: http://www.quagga.net
-%if %with_snmp
+%if %{with_snmp}
BuildRequires: net-snmp-devel
Prereq: net-snmp
%endif
-%if %with_vtysh
+%if %{with_vtysh}
BuildRequires: readline readline-devel ncurses ncurses-devel
Prereq: readline ncurses
%endif
%setup -q
%build
+
+# For standard gcc verbosity, uncomment these lines:
+#CFLAGS="%{optflags} -Wall -Wsign-compare -Wpointer-arith"
+#CFLAGS="${CFLAGS} -Wbad-function-cast -Wwrite-strings"
+
+# For ultra gcc verbosity, uncomment these lines also:
+#CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes"
+#CFLAGS="${CFLAGS} -Wmissing-declarations -Wmissing-noreturn"
+#CFLAGS="${CFLAGS} -Wmissing-format-attribute -Wunreachable-code"
+#CFLAGS="${CFLAGS} -Wpacked -Wpadded"
+
%configure \
-%if %with_ipv6
+%if !%{with_shared}
+ --disable-shared \
+%endif
+%if %{with_ipv6}
--enable-ipv6 \
%endif
-%if %with_snmp
+%if %{with_snmp}
--enable-snmp \
%endif
-%if %with_multipath
- --enable-multipath=%with_multipath \
+%if %{with_multipath}
+ --enable-multipath=%{with_multipath} \
%endif
-%if %with_tcp_zebra
+%if %{with_tcp_zebra}
--enable-tcp-zebra \
%endif
-%if %with_nssa
+%if %{with_nssa}
--enable-nssa \
%endif
-%if %with_opaque_lsa
+%if %{with_opaque_lsa}
--enable-opaque-lsa \
%endif
-%if %with_ospf_te
+%if %{with_ospf_te}
--enable-ospf-te \
%endif
-%if %with_vtysh
+%if %{with_vtysh}
--enable-vtysh \
%endif
-%if %with_ospfclient
+%if %{with_ospfclient}
--enable-ospfclient=yes \
%else
--enable-ospfclient=no\
%endif
-%if %with_ospfapi
+%if %{with_ospfapi}
--enable-ospfapi=yes \
%else
--enable-ospfapi=no \
%endif
-%if %with_irdp
+%if %{with_irdp}
--enable-irdp=yes \
%else
--enable-irdp=no \
%endif
-%if %with_pam
+%if %{with_isisd}
+ --enable-isisd \
+%else
+ --disable-isisd \
+%endif
+%if %{with_pam}
--with-libpam \
%endif
%if %quagga_user
make %{?_smp_mflags} MAKEINFO="makeinfo --no-split"
pushd doc
-texi2html quagga.texi
+makeinfo --no-split --html -o quagga.html quagga.texi
popd
%install
rm -rf $RPM_BUILD_ROOT/usr/share/info/dir
# install etc sources
-for daemon in %daemon_list ; do
- install %{zeb_rh_src}/${daemon}.init \
- $RPM_BUILD_ROOT/etc/rc.d/init.d/${daemon}
+for daemon in %{daemon_list} %{daemonv6_list} %{daemon_other} ; do
+ if [ x"${daemon}" != x"" ] ; then
+ install %{zeb_rh_src}/${daemon}.init \
+ $RPM_BUILD_ROOT/etc/rc.d/init.d/${daemon}
+ fi
done
install -m644 %{zeb_rh_src}/quagga.pam \
$RPM_BUILD_ROOT/etc/pam.d/quagga
zebra_spec_add_service ()
{
# Add port /etc/services entry if it isn't already there
- if [ -f /etc/services ] && ! grep -q "^$1[^a-zA-Z0-9]" /etc/services ; then
+ if [ -f /etc/services ] && \
+ ! %__sed -e 's/#.*$//' /etc/services | %__grep -wq $1 ; then
echo "$1 $2 # $3" >> /etc/services
fi
}
zebra_spec_add_service zebrasrv 2600/tcp "zebra service"
zebra_spec_add_service zebra 2601/tcp "zebra vty"
zebra_spec_add_service ripd 2602/tcp "RIPd vty"
-%if %with_ipv6
+%if %{with_ipv6}
zebra_spec_add_service ripngd 2603/tcp "RIPngd vty"
%endif
zebra_spec_add_service ospfd 2604/tcp "OSPFd vty"
zebra_spec_add_service bgpd 2605/tcp "BGPd vty"
-%if %with_ipv6
+%if %{with_ipv6}
zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty"
%endif
-%if %with_ospfapi
+%if %{with_ospfapi}
zebra_spec_add_service ospfapi 2607/tcp "OSPF-API"
%endif
+%if %{with_isisd}
zebra_spec_add_service isisd 2608/tcp "ISISd vty"
+%endif
for daemon in %daemon_list ; do
/sbin/chkconfig --add ${daemon}
fi
%clean
-#rm -rf $RPM_BUILD_ROOT
+%if !%{keep_build}
+rm -rf $RPM_BUILD_ROOT
+%endif
%files
%defattr(-,root,root)
%doc doc/quagga.html
%doc doc/mpls
%doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO
-%if %quagga_user
+%if %{quagga_user}
%dir %attr(751,%quagga_user,%quagga_user) %{_sysconfdir}
%dir %attr(750,%quagga_user,%quagga_user) /var/log/quagga
%dir %attr(751,%quagga_user,%quagga_user) /var/run/quagga
%dir %attr(755,root,root) /usr/share/info
%dir %attr(750,root,root) /var/run/quagga
%endif
-%if %vty_group
+%if %{vty_group}
%attr(750,%quagga_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample
%endif
%{_infodir}/*info*
%{_mandir}/man*/*
-%{_sbindir}/*
+%{_sbindir}/zebra
+%{_sbindir}/ospfd
+%{_sbindir}/ripd
+%{_sbindir}/bgpd
+%if %{with_ipv6}
+%{_sbindir}/ripngd
+%{_sbindir}/ospf6d
+%endif
+%if %{with_isisd}
+%{_sbindir}/isisd
+%endif
+%dir %attr(755,root,root) %{_libdir}
+%if %{with_shared}
%{_libdir}/lib*.so
%{_libdir}/lib*.so.*
-%if %with_vtysh
+%endif
+%if %{with_vtysh}
%{_bindir}/*
%endif
%config /etc/quagga/[!v]*
%files devel
%defattr(-,root,root)
-%dir %{_libdir}/*.a
-%dir %{_libdir}/*.la
-%dir %{_includedir}/%name/*.h
-%dir %{_includedir}/%name/ospfd/*.h
-%if %with_ospfapi
-%dir %{_includedir}/%name/ospfapi/*.h
+%if %{with_ospfclient}
+%{_sbindir}/ospfclient
+%endif
+%{_libdir}/*.a
+%{_libdir}/*.la
+%dir %attr(755,root,root) %{_includedir}/%{name}
+%{_includedir}/%name/*.h
+%dir %attr(755,root,root) %{_includedir}/%{name}/ospfd
+%{_includedir}/%name/ospfd/*.h
+%if %{with_ospfapi}
+%dir %attr(755,root,root) %{_includedir}/%{name}/ospfapi
+%{_includedir}/%name/ospfapi/*.h
%endif
%changelog
%changelog
+* Mon Nov 08 2004 Paul Jakma <paul@dishone.st>
+- Use makeinfo --html to generate quagga.html
+
+* Sun Nov 07 2004 Paul Jakma <paul@dishone.st>
+- Fix with_ipv6 set to 0 build
+
+* Sat Oct 23 2004 Paul Jakma <paul@dishone.st>
+- Update to 0.97.2
+
+* Sat Oct 23 2004 Andrew J. Schorr <aschorr@telemetry-investments.com>
+- Make directories be owned by the packages concerned
+- Update logrotate scripts to use correct path to killall and use pid files
+
+* Fri Oct 08 2004 Paul Jakma <paul@dishone.st>
+- Update to 0.97.0
+
+* Wed Sep 15 2004 Paul Jakma <paul@dishone.st>
+- build snmp support by default
+- build irdp support
+- build with shared libs
+- devel subpackage for archives and headers
+
* Thu Jan 08 2004 Paul Jakma <paul@dishone.st>
- updated sysconfig files to specify local dir
- added ospf_dump.c crash quick fix patch