File ipvsadm.spec of Package ipvsadm
#
# spec file for package ipvsadm (Version 1.24)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: ipvsadm
BuildRequires: kernel-source popt-devel
Summary: A Utility for Administering the Linux Virtual Server
Version: 1.24
Release: 297
License: GPL v2 or later
Url: http://www.LinuxVirtualServer.org/
Group: Productivity/Networking/System
Source0: http://www.LinuxVirtualServer.org/software/ipvsadm-%{version}.tar.bz2
Source1: ipvsadm.init
Patch: ipvsadm-%{version}.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: %{name}-%{version}
Requires: grep
PreReq: %insserv_prereq %fillup_prereq
%define prefix /usr
%description
ipvsadm is a utility for administering the IP virtual server services
offered by the Linux kernel with Linux Virtual Server support.
Authors:
--------
Wensong Zhang <wensong@iinchina.net>
%prep
%setup
# This files are embedded here instead of being another source in order
# to the prefix directory
cat >sysconfig.ipvsadm <<EOFF
## Path: Network/IPVS
## Description: Linux Virtual Server Configuration
## ServiceRestart: ipvsadm
## Type: string
## Default: /etc/ipvsadm.rules
#
# Where to find the IPVSADM config-file
#
IPVSADM_CONFIG="/etc/ipvsadm.rules"
EOFF
cat >ipvsadm.rules <<EOFF
#
# Please insert your ipvs-rules here
#
EOFF
%patch
%build
make FORCE_GETOPT=1 CFLAGS="${RPM_OPT_FLAGS}"
%install
mkdir -p ${RPM_BUILD_ROOT}/{sbin,usr/sbin,%{_mandir}/man8,etc/init.d,var/adm/fillup-templates}
BUILD_ROOT=${RPM_BUILD_ROOT} MANDIR=%{_mandir} make install
# install SuSE init script
install -m 755 %{S:1} ${RPM_BUILD_ROOT}/etc/init.d/ipvsadm
install -m 755 sysconfig.ipvsadm ${RPM_BUILD_ROOT}/var/adm/fillup-templates/sysconfig.ipvsadm
install -m 755 ipvsadm.rules ${RPM_BUILD_ROOT}/etc/ipvsadm.rules
ln -sf ../../etc/init.d/ipvsadm ${RPM_BUILD_ROOT}/usr/sbin/rcipvsadm
%post
%{fillup_and_insserv ipvsadm}
%postun
%{insserv_cleanup}
%clean
if [ -n "$RPM_BUILD_ROOT" ] ; then
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
fi
%files
%defattr(-,root,root)
%doc README
%config /etc/ipvsadm.rules
/etc/init.d/ipvsadm
/sbin/*
/usr/sbin/*
/%{_mandir}/man*/*
/var/adm/fillup-templates/sysconfig.ipvsadm
%changelog
* Mon Aug 25 2008 mt@suse.de
- init script: copy LSB *-Start tags to *-Stop
* Sat May 27 2006 schwab@suse.de
- Use RPM_OPT_FLAGS.
- Don't strip binaries.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Oct 05 2005 dmueller@suse.de
- add norootforbuild
* Wed Jan 28 2004 ro@suse.de
- update to 1.24
* Sat Sep 13 2003 ro@suse.de
- configure kernel-source if needed
* Tue Aug 19 2003 mt@suse.de
- added "ServiceRestart: ipvsadm" yast2 metadata
to sysconfig file
* Fri Jan 31 2003 mt@suse.de
- added yast2 metadata variables to sysconfig file
* Wed Sep 04 2002 mt@suse.de
- fixed rpm group (Productivity/Networking/System)
- changed failed to skipped if not configured
- removed some echo prefixes and colons
- added rpm dependency to grep
* Mon Aug 19 2002 mmj@suse.de
- Correct PreReq
* Mon Aug 05 2002 ro@suse.de
- update to 1.21 to compile with current kernel
* Tue Jul 30 2002 ro@suse.de
- fix patch
* Fri Jul 19 2002 mt@suse.de
- updated to ipvsadm-1.20
- enabled getopt usage, since newer popt is needed
* Tue Jan 15 2002 ro@suse.de
- removed START_IPVSADM
* Fri Jul 27 2001 mt@suse.de
- fixed popt dependency
- fixed init script to be LSB complaient
* Fri Apr 27 2001 mge@suse.de
- initial SuSE RPM