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

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

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

%build
23
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-ipv6
24 25
make
mv bird bird6
26 27
make clean
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
28 29
make

30

31 32
%install
rm -rf $RPM_BUILD_ROOT/*
33
make install prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc localstatedir=$RPM_BUILD_ROOT/var
34
install bird6 $RPM_BUILD_ROOT/usr/sbin
35 36

cd $RPM_BUILD_ROOT
37 38
install -d etc/rc.d/init.d
install $RPM_SOURCE_DIR/bird.init etc/rc.d/init.d/bird
39
install $RPM_SOURCE_DIR/birdc6 usr/sbin/birdc6
40 41 42

%post
/sbin/ldconfig
43
/sbin/chkconfig --add bird
44

45 46
%preun
if [ $1 = 0 ] ; then
47
        /sbin/chkconfig --del bird
48
fi
49 50 51

%files
%attr(755,root,root) /usr/sbin/bird
52
%attr(755,root,root) /usr/sbin/bird6
53
%attr(755,root,root) /usr/sbin/birdc
54
%attr(755,root,root) /usr/sbin/birdc6
55
%attr(755,root,root) /etc/rc.d/init.d/bird