Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > main-src > by-pkgid > 71f0de1d22a36252ee6f59b1080a7732 > files > 5

ipvsadm-1.19-1mdk.src.rpm

%define name ipvsadm
%define version 1.19
%define release 1mdk

Summary: Administration tool for Linux Virtual Server
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL 
Group: System/Kernel and hardware
URL: http://www.linuxvirtualserver.org
Source: http://www.linuxvirtualserver.org/software/%{name}-%{version}.tar.bz2
Source1: ip_vs.h
Source2: %{name}.sysconfig
Source3: rc.firewall.iptables.bz2
Patch0: ipvsadm-1.19-mdk.patch.bz2
Patch1: ipvsadm-1.19-fhs.patch.bz2
Buildroot: %{_tmppath}/%{name}-root
BuildRequires: popt-devel

%description 
ipvsadm is a utility to administer the IP virtual server services
offered by the Linux kernel with virtual server patch.
Virtual Server in Linux kernel can be used to build a high-performance
and highly available server.

%prep
rm -rf $RPM_BUILD_ROOT

%setup -q -n %{name}
%patch0 -p1 -b .mdk
%patch1 -p1 -b .fhs

%build
%{__cp} %{SOURCE1} ip_vs.h
make CFLAGS="$RPM_OPT_FLAGS" 

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p ${RPM_BUILD_ROOT}/{sbin,%{_mandir}/man8,etc/rc.d/init.d,etc/sysconfig}
make BUILD_ROOT=$RPM_BUILD_ROOT install

# 345 default runlevels in the initscript
perl -p -i -e 's@\# chkconfig\: \- 08 92+@\# chkconfig\: 345 08 92@' ${RPM_BUILD_ROOT}%{_initrddir}/%{name};

install -m 755 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} 
install -m 755 %SOURCE2 $RPM_BUILD_DIR/%name/sysconfig.example
bzcat %SOURCE3 > $RPM_BUILD_DIR/%name/rc.firewall.iptables

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add ipvsadm

%preun
if [ $1 = 0 ]; then
   if [ -f /var/lock/subsys/lvs ]; then
         %{_initrddir}/lvs stop
		fi

   /sbin/chkconfig --del ipvsadm
fi


%files
%defattr(-,root,root)
%doc README sysconfig.example rc.firewall.iptables
%config(noreplace) %{_initrddir}/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
/sbin/*
%{_mandir}/*/*

%changelog
* Fri Sep  7 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.19-1mdk
- 1.19 (needed for latest kernel upgrade).

* Fri Aug 31 2001 Florin <florin@mandrakesoft.com> 1.18-4mdk
- add the rc.firewall.iptables example

* Wed Aug 29 2001 Florin <florin@mandrakesoft.com> 1.18-3mdk
- add the sysconf file in docs as example

* Sun Aug 26 2001 Florin <florin@mandrakesoft.com> 1.18-2mdk
- add the sysconfig file
- add the requires on popt-devel

* Sat Aug 25 2001 Florin <florin@mandrakesoft.com> 1.18-1mdk
- 1.18
- major changings: remove lvs, lvs.example, ldirectord patch
- merge with redhat
- 345 default runlevels

* Tue Aug 29 2000  Philippe Libat <philippe@mandrakesoft.com> 0.9.16-2.2.17mdk
- new version 0.9.16-2.2.17
- sysconfig/lvs example

* Tue Aug 29 2000  Philippe Libat <philippe@mandrakesoft.com> 0.9.15-2.2.16mdk
- new version 0.9.15-2.2.16
- rebuild using %{_initrddir} macro

* Tue Aug 29 2000  Etienne Faure <etienne@mandrakesoft.com> 0.9.9-2.2.14.4mdk
- rebuild using the _mandir macro 

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.9.9-2.2.14.3mdk
- automatically added BuildRequires

* Thu Apr 13 2000 Philippe Libat  <philippe@mandrakesoft.com> 0.9.9-2.2.14.2mdk
- Add lvs.init
- Add ldirectord.patch

* Tue Apr 11 2000 Philippe Libat  <philippe@mandrakesoft.com> 0.9.9-2.2.14mdk
- Mandrake first spec