Major package cleanup.

This commit is contained in:
Matthias Saou 2007-08-24 14:13:07 +00:00
parent 19d275bc18
commit c8652dc920
3 changed files with 69 additions and 43 deletions

View File

@ -1,6 +1,6 @@
# Makefile for source rpm: ipvsadm
# $Id$
# $Id: Makefile,v 1.1 2004/09/09 06:20:27 cvsdist Exp $
NAME := ipvsadm
SPECFILE = $(firstword $(wildcard *.spec))
include ../common/Makefile.common
include ../../common/Makefile.common

View File

@ -0,0 +1,23 @@
diff -Naupr ipvsadm-1.24.orig/Makefile ipvsadm-1.24/Makefile
--- ipvsadm-1.24.orig/Makefile 2004-01-10 10:39:03.000000000 +0100
+++ ipvsadm-1.24/Makefile 2007-08-24 16:08:21.000000000 +0200
@@ -87,16 +87,15 @@ ipvsadm: $(OBJS) $(STATIC_LIBS)
install: all
if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
- $(INSTALL) -m 0755 -s ipvsadm $(SBIN)
+ $(INSTALL) -m 0755 ipvsadm $(SBIN)
$(INSTALL) -m 0755 ipvsadm-save $(SBIN)
$(INSTALL) -m 0755 ipvsadm-restore $(SBIN)
[ -d $(MAN) ] || $(MKDIR) -p $(MAN)
$(INSTALL) -m 0644 ipvsadm.8 $(MAN)
$(INSTALL) -m 0644 ipvsadm-save.8 $(MAN)
$(INSTALL) -m 0644 ipvsadm-restore.8 $(MAN)
- if [ -d $(INIT) ]; then \
- $(INSTALL) -m 0755 ipvsadm.sh $(INIT)/ipvsadm; \
- fi
+ [ -d $(INIT) ] || $(MKDIR) -p $(INIT)
+ $(INSTALL) -m 0755 ipvsadm.sh $(INIT)/ipvsadm
clean:
rm -f ipvsadm $(NAME).spec $(NAME)-$(VERSION).tar.gz

View File

@ -1,26 +1,17 @@
Summary: Utility to administer the Linux Virtual Server
Name: ipvsadm
Version: 1.24
Release: 8.1
License: GPL
URL: http://www.LinuxVirtualServer.org/
Release: 9
License: GPLv2+
Group: Applications/System
Buildroot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-buildroot
Provides: %{name}-%{version}
PreReq: chkconfig
#ExcludeArch: ppc
Conflicts: piranha <= 0.4.14
Source0: http://www.LinuxVirtualServer.org/software/ipvsadm-%{version}.tar.gz
patch0: ipvsadm-1.24-kernhdr-1.2.0.patch
#patch1: ipvsadm-1.21-desc.patch
#patch2: ipvsadm-1.21-restore.patch
#patch3: ipvsadm-1.21-sort.patch
#patch4: ipvsadm-1.21-sched.patch
#patch5: ipvsadm-1.21-spelling.patch
#patch6: ipvsadm-1.21-fmt.patch
URL: http://www.linuxvirtualserver.org/software/ipvs.html
Source: http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-%{version}.tar.gz
Patch0: ipvsadm-1.24-kernhdr-1.2.0.patch
Patch1: ipvsadm-1.24-Makefile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Buildrequires: kernel-headers
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
%description
ipvsadm is a utility to administer the IP Virtual Server services
@ -28,48 +19,59 @@ offered by the Linux kernel.
%prep
%setup -n %{name}-%{version}
%setup -q
%patch0 -p1
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
#%patch4 -p1
#%patch5 -p1
#%patch6 -p1
%patch1 -p1
%build
CFLAGS="${RPM_OPT_FLAGS}" make
# Don't use _smp_mflags as it makes to build fail (1.2.4)
CFLAGS="%{optflags}" make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p ${RPM_BUILD_ROOT}/{sbin,%{_mandir}/man8,etc/rc.d/init.d}
make install BUILD_ROOT=${RPM_BUILD_ROOT} MANDIR=%{_mandir}
rm -rf %{buildroot}
mkdir -p %{buildroot}/etc/rc.d/init.d
make install BUILD_ROOT=%{buildroot} MANDIR=%{_mandir}
%files
%defattr(-,root,root)
%doc README
%config /etc/rc.d/init.d/ipvsadm
/sbin/ipvsadm*
%{_mandir}/man8/ipvsadm*
%clean
rm -rf %{buildroot}
%post
/sbin/chkconfig --add ipvsadm
%preun
/sbin/chkconfig --del ipvsadm
if [ $1 -eq 0 ]; then
/sbin/chkconfig --del ipvsadm
fi
%clean
rm -rf $RPM_BUILD_DIR/%{name}
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README
/etc/rc.d/init.d/ipvsadm
/sbin/ipvsadm
/sbin/ipvsadm-restore
/sbin/ipvsadm-save
%{_mandir}/man8/ipvsadm.8*
%{_mandir}/man8/ipvsadm-restore.8*
%{_mandir}/man8/ipvsadm-save.8*
%changelog
* Fri Aug 24 2007 Matthias Saou <http://freshrpms.net/> 1.24-9
- Spec file cleanup.
- Update License field.
- Don't "chkconfig --del" upon update.
- Add missing kernel-headers build requirement.
- Update URL and Source locations.
- Remove outdated piranha obsoletes, it has never been part of any Fedora.
- No longer mark init script as config.
- Include Makefile patch to prevent stripping and install init script.
- The init script could use a rewrite... leave that one for later.
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.24-8.1
- rebuild
@ -169,3 +171,4 @@ rm -rf $RPM_BUILD_ROOT
* Mon Apr 10 2000 Horms <horms@vergenet.net>
- created for version 1.9