1 %define version @VERSION@
3 Summary: Zebra routing engine
7 Source: zebra
-%{version}.tar.gz
8 URL: http
://www.zebra.org
10 Group: System Environment
/Daemons
11 BuildRoot: /tmp
/zebra
-%{version}-root
14 GNU Zebra is free software
(distributed under GNU Generic Public
License)
15 that manages TCP
/IP based routing protocols. It supports BGP
-4 protocol as
16 described
in RFC1771
(A Border Gateway Protocol
4) as well as RIPv1
, RIPv2
17 and OSPFv2. Unlike traditional
, Gated based
, monolithic architectures and
18 even the so
-called "new modular architectures" that remove the burden of
19 processing routing functions from the cpu and utilize special ASIC chips
20 instead
, Zebra software offers true modularity.
26 #./configure --enable-snmp --prefix=/usr --sysconfdir=/etc
27 .
/configure
--prefix
=/usr
--sysconfdir
=/etc
31 rm -rf $RPM_BUILD_ROOT
32 make DESTDIR
=$RPM_BUILD_ROOT
install
33 rm -f $RPM_BUILD_ROOT
/usr
/info
/dir
34 rm -f $RPM_BUILD_ROOT
/usr
/man
/man8
/ospf6
*
35 rm -f $RPM_BUILD_ROOT
/usr
/man
/man8
/ripng
*
36 rm -f $RPM_BUILD_ROOT
/usr
/sbin
/ospf6d
37 rm -f $RPM_BUILD_ROOT
/usr
/sbin
/ripngd
38 strip $RPM_BUILD_ROOT
/usr
/sbin
/*
40 mkdir -p $RPM_BUILD_ROOT
/etc
/rc.d
/init.d
41 install -m755 init
/redhat
/bgpd.init $RPM_BUILD_ROOT
/etc
/rc.d
/init.d
/bgpd
42 #install -m755 init/redhat/ospf6d.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ospf6d
43 install -m755 init
/redhat
/ospfd.init $RPM_BUILD_ROOT
/etc
/rc.d
/init.d
/ospfd
44 install -m755 init
/redhat
/ripd.init $RPM_BUILD_ROOT
/etc
/rc.d
/init.d
/ripd
45 #install -m755 init/redhat/ripngd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ripngd
46 install -m755 init
/redhat
/zebra.init $RPM_BUILD_ROOT
/etc
/rc.d
/init.d
/zebra
48 mkdir -p $RPM_BUILD_ROOT
/etc
/logrotate.d
49 install -m644 init
/redhat
/zebra.logrotate $RPM_BUILD_ROOT
/etc
/logrotate.d
/zebra
53 # zebra_spec_add_service <sercice name> <port/proto> <comment>
54 # e.g. zebra_spec_add_service zebrasrv 2600/tcp "zebra service"
56 zebra_spec_add_service
()
58 # Add port /etc/services entry if it isn't already there
59 if [ -f
/etc
/services
] && ! grep
-q "^$
1[^a
-zA
-Z0
-9]"
/etc
/services
; then
60 echo "$
1 $
2 # $3" >> /etc/services
64 zebra_spec_add_service zebrasrv
2600/tcp "zebra service"
65 zebra_spec_add_service zebra
2601/tcp "zebra vty"
66 zebra_spec_add_service ripd
2602/tcp "RIPd vty"
67 zebra_spec_add_service ripngd
2603/tcp "RIPngd vty"
68 zebra_spec_add_service ospfd
2604/tcp "OSPFd vty"
69 zebra_spec_add_service bgpd
2605/tcp "BGPd vty"
70 zebra_spec_add_service ospf6d
2606/tcp "OSPF6d vty"
73 /sbin
/install-info
/usr
/info
/zebra.info
/usr
/info
/dir
75 if [ -x
/sbin
/chkconfig
]; then
77 # chkconfig --add ospf6d
80 # chkconfig --add ripngd
86 if [ "$
1"
= 0 ] ; then
87 /sbin
/install-info
--delete
/usr
/info
/zebra.info
/usr
/info
/dir
89 if [ -x
/sbin
/chkconfig
]; then
91 # chkconfig --del ospf6d
94 # chkconfig --del ripngd
100 rm -rf $RPM_BUILD_ROOT
101 rm -rf $RPM_BUILD_DIR
/%{name}-%{version}
104 %attr(-,root
,root
) %doc AUTHORS COPYING ChangeLog INSTALL NEWS README SERVICES TODO bgpd
/bgpd.conf.sample ospfd
/ospfd.conf.sample ripd
/ripd.conf.sample zebra
/zebra.conf.sample
105 %attr(-,root
,root
) %config /etc
/rc.d
/init.d
/*
106 %attr(-,root
,root
) %config /etc
/logrotate.d
/*
107 %attr(-,root
,root
) /usr
/info
/*
108 #%attr(-,root,root) /usr/man/* # Not man1 to exclude vtysh man page as
109 # it is not build by default (for now)
110 %attr(-,root
,root
) /usr
/man
/man8
/*
111 %attr(-,root
,root
) /usr
/sbin
/*
114 * Mon Nov
6 2000 Lennert Buytenhek
<buytenh@gnu.org
>
115 - Don't include ospf6d and ripngd
in package.
116 - Fix logrotate file
(add ospf.log
).
117 * Mon Oct
2 2000 Horms
<horms@valinux.com
>
118 - Install and uninstall info
in %post and
%preun respectively
119 - Moved chkconfig
--del operations from
%postun to
%preun, as
120 chkconfig needs to run
while the init files are still present on
122 - Don't
install vtysh man page as vtysh is not build by default
123 - Added logrotate script so logs won't grow without bound
124 * Wed Sep
27 2000 Horms
<horms@vergenet.net
>
125 - Add ports to
/etc
/services
if they aren't there
126 - forcibly remove $RPM_BUILD_ROOT
/usr
/info
/dir and friends so
127 there is no error
if it does not exist when
rm is run.
128 - Clean up the zebra build dir