bird.spec 1.33 KB
Newer Older
1 2
Summary: BIRD Internet Routing Daemon
Name: bird
Ondřej Filip's avatar
Ondřej Filip committed
3 4
Version: 1.0.5
Release: 1
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Copyright: GPL
Group: Networking/Daemons
Source: ftp://bird.network.cz/pub/bird/bird-%{version}.tar.gz
Source1: bird.init
Buildroot: /var/tmp/bird-root
Url: http://bird.network.cz
Prereq: /sbin/chkconfig

%description
BIRD is dynamic routing daemon supporting IPv4 and IPv6 versions of routing
protocols BGP, RIP and OSPF.

%prep
%setup -n bird-%{version}

%build
21 22 23
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run --enable-ipv6
make
mv bird bird6
24 25 26
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run
make

27

28 29 30
%install
rm -rf $RPM_BUILD_ROOT/*
make install prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc localstatedir=$RPM_BUILD_ROOT/var/run
31
install bird6 $RPM_BUILD_ROOT/usr/sbin
32 33

cd $RPM_BUILD_ROOT
34 35 36
install -d etc/rc.d/init.d
install $RPM_SOURCE_DIR/bird.init etc/rc.d/init.d/bird
install $RPM_SOURCE_DIR/birdc6 usr/bin/
37 38 39

%post
/sbin/ldconfig
40
/sbin/chkconfig --add bird
41 42 43
 
%preun
if [ $1 = 0 ] ; then
44
        /sbin/chkconfig --del bird
45 46 47 48
fi                                                                              

%files
%attr(755,root,root) /usr/sbin/bird
49
%attr(755,root,root) /usr/sbin/bird6
50
%attr(755,root,root) /usr/sbin/birdc
51
%attr(755,root,root) /usr/sbin/birdc6
52
%attr(755,root,root) /etc/rc.d/init.d/bird
53
%config /etc/bird.conf