]> git.pld-linux.org Git - packages/bird.git/commitdiff
- IPv6 and IPv4 enabled binaries moved to separate packages -- don't pretend
authorJacek Konieczny <jajcus@pld-linux.org>
Wed, 22 Sep 2004 12:26:53 +0000 (12:26 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  bird can do both with the same binary.

Changed files:
    bird.spec -> 1.27

bird.spec

index 02c59d65f3b7002b85dfef5a82604fe0bac8ee46..c0225f2678502118cee5fc9d1a6684f7e8ce1abd 100644 (file)
--- a/bird.spec
+++ b/bird.spec
@@ -1,15 +1,23 @@
+
+%bcond_without ipv6    # disable IPv6 support (and building bird-ipv6 package) 
+%bcond_without ipv4    # disable IPv4 support (and building bird-ipv4 package)
+
+# TODO:
+#      - trigger to clean up after old bird package (stop, chkconfig --del)
+
 Summary:       Routing daemon
 Summary(pl):   Demon dynamicznego routingu
 Name:          bird
 Version:       1.0.9
-Release:       0.1
+Release:       0.3
 License:       GPL
 Group:         Networking/Daemons
 Source0:       ftp://bird.network.cz/pub/bird/%{name}-%{version}.tar.gz
 # Source0-md5: 6a1d94b8a33b80e754ea4f9cc0ac1ff3
-Source1:       ftp://bird.network.cz/pub/bird/%{name}-doc-%{version}.tar.gz
-# Source1-md5: a65161e37449da5303cbe454125c3c9c
-Source2:       %{name}.init
+Source1:       %{name}-ipv4.init
+Source2:       %{name}-ipv4.sysconfig
+Source3:       %{name}-ipv6.init
+Source4:       %{name}-ipv6.sysconfig
 Patch0:                %{name}-posix.patch
 Patch1:                %{name}-flex.patch
 URL:           http://bird.network.cz/
@@ -17,7 +25,7 @@ BuildRequires:        automake
 BuildRequires: readline-devel >= 4.2
 PreReq:                rc-scripts
 Requires(post,preun):  /sbin/chkconfig
-Provides:      routingdaemon
+Requires:      bird-daemon
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Obsoletes:     gated
 Obsoletes:     mrt
@@ -36,53 +44,166 @@ pracuj
 protoko³ów routingu, ³atwym interfejsem konfiguracji i jêzykiem
 filtrów o du¿ych mo¿liwo¶ciach.
 
+%package ipv4
+Summary:       Routing daemon for IPv4
+Summary(pl):   Demon dynamicznego routingu IPv4
+Group:         Networking/Daemons
+PreReq:                rc-scripts
+Requires(post,preun):  /sbin/chkconfig
+Provides:      routingdaemon
+Provides:      bird-daemon
+Obsoletes:     gated
+Obsoletes:     mrt
+Obsoletes:     zebra
+Obsoletes:     zebra-guile
+Requires:      %{name} = %{version}-%{release}
+
+%description ipv4
+The BIRD project is an attempt to create a routing daemon running on
+UNIX-like systems (but not necessarily limited to them) with full
+support of all modern routing protocols, easy to use configuration
+interface and powerful route filtering language.
+
+%description -l pl ipv4
+Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
+pracuj±cego na systemach UNIX z pe³nym wsparciem dla nowoczesnych
+protoko³ów routingu, ³atwym interfejsem konfiguracji i jêzykiem
+filtrów o du¿ych mo¿liwo¶ciach.
+
+%package ipv6
+Summary:       Routing daemon for IPv6
+Summary(pl):   Demon dynamicznego routingu IPv6
+Group:         Networking/Daemons
+PreReq:                rc-scripts
+Requires(post,preun):  /sbin/chkconfig
+Provides:      routingdaemon
+Provides:      bird-daemon
+Obsoletes:     gated
+Obsoletes:     mrt
+Obsoletes:     zebra
+Obsoletes:     zebra-guile
+Requires:      %{name} = %{version}-%{release}
+
+%description ipv6
+The BIRD project is an attempt to create a routing daemon running on
+UNIX-like systems (but not necessarily limited to them) with full
+support of all modern routing protocols, easy to use configuration
+interface and powerful route filtering language.
+
+%description -l pl ipv6
+Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
+pracuj±cego na systemach UNIX z pe³nym wsparciem dla nowoczesnych
+protoko³ów routingu, ³atwym interfejsem konfiguracji i jêzykiem
+filtrów o du¿ych mo¿liwo¶ciach.
+
 %prep
-%setup -q -a1
+%setup -q
 %patch0 -p1
 %patch1 -p1
 
 %build
 cp -f /usr/share/automake/config.* tools
-%configure2_13 \
+
+%if %{with ipv6}
+%{__autoconf}
+%configure \
        --disable-memcheck \
        --enable-client \
        --enable-ipv6
 %{__make}
 
+mv bird bird-6
+
+%{__make} clean
+%endif
+
+%if %{with ipv4}
+%configure \
+       --disable-memcheck \
+       --enable-client \
+       --disable-ipv6
+%{__make}
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sbindir}}
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}}
 
-install bird $RPM_BUILD_ROOT%{_sbindir}
 install birdc $RPM_BUILD_ROOT%{_sbindir}
 
+%if %{with ipv6}
+install bird $RPM_BUILD_ROOT%{_sbindir}
 install doc/bird.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv4
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv4
+%endif
+
+%if %{with ipv6}
+install bird-6 $RPM_BUILD_ROOT%{_sbindir}
+cat <<EOF > $RPM_BUILD_ROOT%{_sbindir}/birdc-6
+#!/bin/sh
+exec %{_sbindir}/birdc -s /var/run/bird-6.ctl
+EOF
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv6
+install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv6
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-/sbin/chkconfig --add %{name} >&2
+%post ipv4
+/sbin/chkconfig --add %{name}-ipv4 >&2
 
-if [ -f /var/lock/subsys/%{name} ]; then
-       /etc/rc.d/init.d/%{name} restart >&2
+if [ -f /var/lock/subsys/%{name}-ipv4 ]; then
+       /etc/rc.d/init.d/%{name}-ipv4 restart >&2
 else
-       echo "Run '/etc/rc.d/init.d/%{name} start' to start routing deamon." >&2
+       echo "Run '/etc/rc.d/init.d/%{name}-ipv4 start' to start routing deamon." >&2
 fi
 
-%preun
+%preun ipv4
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/%{name} ]; then
-               /etc/rc.d/init.d/%{name} stop >&2
+       if [ -f /var/lock/subsys/%{name}-ipv4 ]; then
+               /etc/rc.d/init.d/%{name}-ipv4 stop >&2
        fi
-        /sbin/chkconfig --del %{name} >&2
+        /sbin/chkconfig --del %{name}-ipv4 >&2
+fi
+
+%post ipv6
+/sbin/chkconfig --add %{name}-ipv6 >&2
+
+if [ -f /var/lock/subsys/%{name}-ipv6 ]; then
+       /etc/rc.d/init.d/%{name}-ipv6 restart >&2
+else
+       echo "Run '/etc/rc.d/init.d/%{name}-ipv6 start' to start routing deamon." >&2
+fi
+
+%preun ipv6
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/%{name}-ipv6 ]; then
+               /etc/rc.d/init.d/%{name}-ipv6 stop >&2
+       fi
+        /sbin/chkconfig --del %{name}-ipv6 >&2
 fi
 
 %files
+%doc doc/*.html TODO README
+%attr(755,root,root) %{_sbindir}/birdc
+
+%if %{with ipv4}
+%files ipv4
 %defattr(644,root,root,755)
-%doc doc/*.html %{name}-doc-*/doc/*.ps TODO README
+%attr(755,root,root) %{_sbindir}/bird
+%attr(754,root,root) /etc/rc.d/init.d/bird-ipv4
+%attr(754,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/bird-ipv4
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bird.conf
+%endif
 
-%attr(755,root,root) %{_sbindir}/*
-%attr(754,root,root) /etc/rc.d/init.d/*
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.conf
+%if %{with ipv6}
+%files ipv6
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_sbindir}/bird-6
+%attr(755,root,root) %{_sbindir}/birdc-6
+%attr(754,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/bird-ipv6
+%attr(754,root,root) %config(noreplace) %verify(not size mtime md5) /etc/rc.d/init.d/bird-ipv6
+#%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bird-6.conf
+%endif
This page took 0.088103 seconds and 4 git commands to generate.