]> git.proxmox.com Git - mirror_frr.git/blobdiff - redhat/quagga.spec.in
2004-11-07 Paul Jakma <paul@dishone.st>
[mirror_frr.git] / redhat / quagga.spec.in
index 2512d313d9c9073684ac70ff6b4627daf96b814e..ec7f206fc26f12607dc4583c0466ffc16bc217c4 100644 (file)
@@ -1,5 +1,5 @@
 # configure options
-%define        with_snmp       0
+%define        with_snmp       1
 %define                with_vtysh      1
 %define                with_ospf_te    1
 %define                with_nssa       1
@@ -10,6 +10,9 @@
 %define                with_ipv6       1
 %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
+%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@
@@ -43,11 +53,11 @@ License:    GPL
 Group: System Environment/Daemons
 Source0:       http://www.quagga.net/snapshots/cvs/%{name}-%{version}.tar.gz
 URL:           http://www.quagga.net
-%if %with_snmp
-BuildRequires: ucd-snmp-devel
-Prereq:                ucd-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
@@ -93,41 +103,54 @@ developing OSPF-API and quagga applications.
 
 %build
 %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_pam
+%if %{with_irdp}
+       --enable-irdp=yes \
+%else
+       --enable-irdp=no \
+%endif
+%if %{with_isisd}
+       --enable-isisd \
+%else
+       --disable-isisd \
+%endif
+%if %{with_pam}
        --with-libpam \
 %endif
 %if %quagga_user
@@ -158,9 +181,11 @@ make 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
@@ -190,7 +215,8 @@ groupadd -r %vty_group 2> /dev/null || :
 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
 }
@@ -198,18 +224,20 @@ zebra_spec_add_service ()
 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}
@@ -244,7 +272,9 @@ if [ "$1" = "0" ]; then
 fi
 
 %clean
-#rm -rf $RPM_BUILD_ROOT
+%if !%{keep_build}
+rm -rf $RPM_BUILD_ROOT
+%endif
 
 %files
 %defattr(-,root,root)
@@ -252,7 +282,7 @@ fi
 %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
@@ -262,13 +292,28 @@ fi
 %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}/*
-%if %with_vtysh
+%{_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.*
+%endif
+%if %{with_vtysh}
 %{_bindir}/*
 %endif
 %config /etc/quagga/[!v]*
@@ -283,15 +328,43 @@ fi
 
 %files devel
 %defattr(-,root,root)
-%dir %{_libdir}/*
-%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
+* 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
+- added ospfd persistent interface configuration patch
+
 * Tue Dec 30 2003 Paul Jakma <paul@dishone.st>
 - sync to CVS
 - integrate RH sysconfig patch to specify daemon options (RH)