📄 zebra.spec.in
字号:
%define version @VERSION@Summary: Zebra routing engineName: zebraVersion: %{version}Release: 1Source: zebra-%{version}.tar.gzURL: http://www.zebra.orgCopyright: GPLGroup: System Environment/DaemonsBuildRoot: /tmp/zebra-%{version}-root%descriptionGNU Zebra is free software (distributed under GNU Generic Public License)that manages TCP/IP based routing protocols. It supports BGP-4 protocol asdescribed in RFC1771 (A Border Gateway Protocol 4) as well as RIPv1, RIPv2and OSPFv2. Unlike traditional, Gated based, monolithic architectures andeven the so-called "new modular architectures" that remove the burden ofprocessing routing functions from the cpu and utilize special ASIC chipsinstead, Zebra software offers true modularity.%prep%setup%build#./configure --enable-snmp --prefix=/usr --sysconfdir=/etc./configure --prefix=/usr --sysconfdir=/etcmake%installrm -rf $RPM_BUILD_ROOTmake DESTDIR=$RPM_BUILD_ROOT installrm -f $RPM_BUILD_ROOT/usr/info/dirrm -f $RPM_BUILD_ROOT/usr/man/man8/ospf6*rm -f $RPM_BUILD_ROOT/usr/man/man8/ripng*rm -f $RPM_BUILD_ROOT/usr/sbin/ospf6drm -f $RPM_BUILD_ROOT/usr/sbin/ripngdstrip $RPM_BUILD_ROOT/usr/sbin/*mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.dinstall -m755 init/redhat/bgpd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/bgpd#install -m755 init/redhat/ospf6d.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ospf6dinstall -m755 init/redhat/ospfd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ospfdinstall -m755 init/redhat/ripd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ripd#install -m755 init/redhat/ripngd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ripngdinstall -m755 init/redhat/zebra.init $RPM_BUILD_ROOT/etc/rc.d/init.d/zebra mkdir -p $RPM_BUILD_ROOT/etc/logrotate.dinstall -m644 init/redhat/zebra.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/zebra%post# zebra_spec_add_service <sercice name> <port/proto> <comment># e.g. zebra_spec_add_service zebrasrv 2600/tcp "zebra service"zebra_spec_add_service (){ # Add port /etc/services entry if it isn't already there if [ -f /etc/services ] && ! grep -q "^$1[^a-zA-Z0-9]" /etc/services ; then echo "$1 $2 # $3" >> /etc/services fi}zebra_spec_add_service zebrasrv 2600/tcp "zebra service"zebra_spec_add_service zebra 2601/tcp "zebra vty"zebra_spec_add_service ripd 2602/tcp "RIPd vty"zebra_spec_add_service ripngd 2603/tcp "RIPngd vty"zebra_spec_add_service ospfd 2604/tcp "OSPFd vty"zebra_spec_add_service bgpd 2605/tcp "BGPd vty"zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty"#Install info/sbin/install-info /usr/info/zebra.info /usr/info/dirif [ -x /sbin/chkconfig ]; then chkconfig --add bgpd# chkconfig --add ospf6d chkconfig --add ospfd chkconfig --add ripd# chkconfig --add ripngd chkconfig --add zebrafi%preunif [ "$1" = 0 ] ; then /sbin/install-info --delete /usr/info/zebra.info /usr/info/dir if [ -x /sbin/chkconfig ]; then chkconfig --del bgpd# chkconfig --del ospf6d chkconfig --del ospfd chkconfig --del ripd# chkconfig --del ripngd chkconfig --del zebra fifi%cleanrm -rf $RPM_BUILD_ROOTrm -rf $RPM_BUILD_DIR/%{name}-%{version}%files%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%attr(-,root,root) %config /etc/rc.d/init.d/*%attr(-,root,root) %config /etc/logrotate.d/*%attr(-,root,root) /usr/info/*#%attr(-,root,root) /usr/man/* # Not man1 to exclude vtysh man page as # it is not build by default (for now)%attr(-,root,root) /usr/man/man8/*%attr(-,root,root) /usr/sbin/*%changelog* Mon Nov 6 2000 Lennert Buytenhek <buytenh@gnu.org>- Don't include ospf6d and ripngd in package.- Fix logrotate file (add ospf.log).* Mon Oct 2 2000 Horms <horms@valinux.com>- Install and uninstall info in %post and %preun respectively- Moved chkconfig --del operations from %postun to %preun, as chkconfig needs to run while the init files are still present on the system.- Don't install vtysh man page as vtysh is not build by default- Added logrotate script so logs won't grow without bound* Wed Sep 27 2000 Horms <horms@vergenet.net>- Add ports to /etc/services if they aren't there- forcibly remove $RPM_BUILD_ROOT/usr/info/dir and friends so there is no error if it does not exist when rm is run.- Clean up the zebra build dir
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -