[bird] initial commit
Jan Görig
jgorig at fedoraproject.org
Thu Oct 7 12:59:30 UTC 2010
commit 7bfc3515611e1dd2941c156494fab313a696ba03
Author: Jan Görig <jgorig at redhat.com>
Date: Thu Oct 7 14:55:38 2010 +0200
initial commit
.gitignore | 1 +
bird.init | 97 ++++++++++++++++++++++++++++++++++++++++
bird.spec | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 245 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..162ccea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/bird-1.2.4.tar.gz
diff --git a/bird.init b/bird.init
new file mode 100644
index 0000000..0f46567
--- /dev/null
+++ b/bird.init
@@ -0,0 +1,97 @@
+#!/bin/sh
+#
+# BIRD Internet Routing Daemon
+#
+# chkconfig: - 20 80
+# description: BIRD is dynamic routing daemon supporting \
+# routing protocols BGP, RIP and OSPF.
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+prog="BIRD_PROGNAME"
+exec="/usr/sbin/$prog"
+config="/etc/$prog.conf"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon $exec
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ echo -n $"Reloading $prog: "
+ killproc $prog -HUP
+ retval=$?
+ echo
+ return $retval
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ # run checks to determine if the service is running or use generic status
+ status $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/bird.spec b/bird.spec
new file mode 100644
index 0000000..51337f9
--- /dev/null
+++ b/bird.spec
@@ -0,0 +1,146 @@
+Name: bird
+Version: 1.2.4
+Release: 1%{?dist}
+Summary: BIRD Internet Routing Daemon
+
+Group: System Environment/Daemons
+License: GPLv2+
+URL: http://bird.network.cz
+Source0: ftp://bird.network.cz/pub/bird/bird-%{version}.tar.gz
+Source1: bird.init
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: flex bison ncurses-devel readline-devel sed
+Requires(post): chkconfig
+Requires(preun):chkconfig initscripts
+
+%description
+BIRD is dynamic routing daemon supporting IPv4 and IPv6 versions of routing
+protocols BGP, RIP and OSPF.
+
+This package contains IPv4 version.
+
+
+%package -n bird6
+Summary: BIRD Internet Routing Daemon
+Group: System Environment/Daemons
+Requires(post): chkconfig
+Requires(preun):chkconfig initscripts
+%description -n bird6
+BIRD is dynamic routing daemon supporting IPv4 and IPv6 versions of routing
+protocols BGP, RIP and OSPF.
+
+This package contains IPv6 version.
+
+
+%package doc
+Summary: BIRD Internet Routing Daemon
+Group: System Environment/Daemons
+%description doc
+BIRD is dynamic routing daemon supporting IPv4 and IPv6 versions of routing
+protocols BGP, RIP and OSPF.
+
+This package contains documentation.
+
+
+%prep
+%setup -q
+
+#Don't strip executables
+sed -i 's/\$(INSTALL_PROGRAM) -s/\$(INSTALL_PROGRAM)/' tools/Makefile.in
+
+%build
+mkdir ipv6
+tar c --exclude ipv6 . | tar x -C ipv6
+
+cd ipv6
+%configure --prefix=%{_prefix} \
+ --sysconfdir=%{_sysconfdir} \
+ --localstatedir=%{_localstatedir} \
+ --enable-ipv6
+make %{?_smp_mflags}
+cd ..
+
+%configure --prefix=%{_prefix} \
+ --sysconfdir=%{_sysconfdir} \
+ --localstatedir=%{_localstatedir}
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make install DESTDIR=$RPM_BUILD_ROOT
+
+cd ipv6
+make install DESTDIR=$RPM_BUILD_ROOT
+cd ..
+
+install -d $RPM_BUILD_ROOT%{_initddir}
+sed 's/BIRD_PROGNAME/bird/' %SOURCE1 > $RPM_BUILD_ROOT%{_initddir}/bird
+sed 's/BIRD_PROGNAME/bird6/' %SOURCE1 > $RPM_BUILD_ROOT%{_initddir}/bird6
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post
+/sbin/chkconfig --add %{name}
+
+
+%preun
+if [ $1 -eq 0 ] ; then
+ /sbin/service %{name} stop >/dev/null 2>&1
+ /sbin/chkconfig --del %{name}
+fi
+
+
+%postun
+if [ $1 -ge 1 ] ; then
+ /sbin/service %{name} condrestart >/dev/null 2>&1 || :
+fi
+
+
+%post -n bird6
+/sbin/chkconfig --add bird6
+
+
+%preun -n bird6
+if [ $1 -eq 0 ] ; then
+ /sbin/service bird6 stop >/dev/null 2>&1
+ /sbin/chkconfig --del bird6
+fi
+
+
+%postun -n bird6
+if [ $1 -ge 1 ] ; then
+ /sbin/service bird6 condrestart >/dev/null 2>&1 || :
+fi
+
+
+%files
+%defattr(-,root,root,-)
+%doc NEWS README TODO
+%config(noreplace) %{_sysconfdir}/bird.conf
+%attr(755,root,root) %{_initddir}/bird
+%{_sbindir}/bird
+%{_sbindir}/birdc
+
+%files -n bird6
+%defattr(-,root,root,-)
+%doc NEWS README TODO
+%config(noreplace) %{_sysconfdir}/bird6.conf
+%attr(755,root,root) %{_initddir}/bird6
+%{_sbindir}/bird6
+%{_sbindir}/birdc6
+
+%files doc
+%defattr(-,root,root,-)
+%doc NEWS README TODO
+%doc doc/bird*.html
+
+
+%changelog
+* Tue Oct 5 2010 Jan Görig <jgorig at redhat.com> 1.2.4-1
+- Initial release
diff --git a/sources b/sources
index e69de29..46612e7 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+8db90b12200ebb20f5aa93a2de9937c6 bird-1.2.4.tar.gz
More information about the scm-commits
mailing list