[ip-sentinel] Spec cleanup.

Jon Ciesla limb at fedoraproject.org
Thu Mar 7 18:18:12 UTC 2013


commit cdab2d2fa0edde1c720e23a5947d104663e1fb0c
Author: Jon Ciesla <limburgher at gmail.com>
Date:   Thu Mar 7 12:15:00 2013 -0600

    Spec cleanup.

 ip-sentinel.spec |  102 ++++++++++++++++++-----------------------------------
 1 files changed, 35 insertions(+), 67 deletions(-)
---
diff --git a/ip-sentinel.spec b/ip-sentinel.spec
index 0122f83..ae68045 100644
--- a/ip-sentinel.spec
+++ b/ip-sentinel.spec
@@ -1,84 +1,47 @@
-## $id: ip-sentinel.spec.in,v 1.3 2003/05/26 21:53:02 ensc Exp $		--*- rpm-spec -*--
-
-# Copyright (C) 2004,2005 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-## This package understands the following switches:
-## --without dietlibc		...   disable usage of dietlibc
-## --without fedora		...   disable fedora specific parts
-## --with    minit		...   disable creation of 'minit' subpackage
-## --define  username\ name	...   set the name of the user running the daemon
-
-
-## Fedora Extras specific customization below...
-%bcond_without			fedora
-%bcond_without			dietlibc
-%bcond_with			minit
-%bcond_with			upstart
-##
-
-
 %{!?username:%global username	ip-sentinel}
 %global service		ip-sentinel
-%global homedir		%_var/lib/ip-sentinel
-%global minitdir	%_sysconfdir/minit
-%global minitsvcdir	%minitdir/services/%name
-
-%{!?release_func:%global release_func() %1%{?dist}}
+%global homedir		%{_var}/lib/ip-sentinel
+%global minitdir	%{_sysconfdir}/minit
+%global minitsvcdir	%minitdir/services/%{name}
 
 Summary:	Tool to prevent unauthorized usage of IP addresses
 Name:		ip-sentinel
 Version:	0.12
-Release:	%release_func 1901
+Release:	1902%{?dist}
 License:	GPLv2
 Group:		System Environment/Daemons
 URL:		http://www.nongnu.org/ip-sentinel/
-Source0:	http://savannah.nongnu.org/download/ip-sentinel/%name-%version.tar.bz2
-Source1:	http://savannah.nongnu.org/download/ip-sentinel/%name-%version.tar.bz2.sig
+Source0:	http://savannah.nongnu.org/download/ip-sentinel/%{name}-%{version}.tar.bz2
+Source1:	http://savannah.nongnu.org/download/ip-sentinel/%{name}-%{version}.tar.bz2.sig
 Patch0:		ip-sentinel-0.12-pidfile.patch
-BuildRoot:	%_tmppath/%name-%version-%release-buildroot
+Patch1:		ip-sentinel-0.12-glibc.patch
+BuildRoot:	%_tmppath/%{name}-%{version}-%{release}-buildroot
 Requires:	init(ip-sentinel)
 Provides:	user(%username) = 1
 Provides:	group(%username) = 1
 BuildRequires:	which
 BuildRequires:	fedora-usermgmt-devel
-%{?FE_USERADD_REQ}
-
-%{?with_dietlibc:BuildRequires:	dietlibc}
 
 %package sysvinit
 Summary:		SysV initscripts for ip-sentinel
 Group:			System Environment/Base
 Provides:		init(ip-sentinel) = sysv
-Requires(preun):	%name = %version-%release
-Requires(postun):	%name = %version-%release
+Requires(preun):	%{name} = %{version}-%{release}
+Requires(postun):	%{name} = %{version}-%{release}
 Requires(preun):	initscripts
 Requires(postun):	initscripts
 Requires(post):		/sbin/chkconfig
 Requires(preun):	/sbin/chkconfig
-Provides:		%name-sysv = %version-%release
-Obsoletes:		%name-sysv < %version-%release
+Provides:		%{name}-sysv = %{version}-%{release}
+Obsoletes:		%{name}-sysv < %{version}-%{release}
 BuildArch:		noarch
 
 %package upstart
 Summary:		upstart initscripts for ip-sentinel
 Group:			System Environment/Base
 Source10:		ip-sentinel.upstart
-Provides:		init(%name) = upstart
-Requires:		%name = %version-%release
+Provides:		init(%{name}) = upstart
+Requires:		%{name} = %{version}-%{release}
 Requires(pre):		/etc/init
 Requires(post):		/usr/bin/killall
 Requires(postun):	/sbin/initctl
@@ -87,8 +50,8 @@ BuildArch:		noarch
 %package minit
 Summary:		minit initscripts for ip-sentinel
 Group:			System Environment/Base
-Provides:		init(%name) = minit
-Requires:		%name = %version-%release
+Provides:		init(%{name}) = minit
+Requires:		%{name} = %{version}-%{release}
 Requires(pre):		minit-setup
 Requires(postun):	minit-setup
 BuildArch:		noarch
@@ -129,28 +92,29 @@ with the minit initconcept.
 %prep
 %setup -q
 %patch0 -p0 -b .pidfile
+%patch1 -p0
 
 %build
 %configure --enable-release \
-	   --with-initrddir=%_initrddir \
-	   --with-username=%username	\
-	   %{!?with_dietlibc:--disable}%{?with_dietlibc:--enable}-dietlibc
-%__make %{?_smp_mflags} all
+	   --with-initrddir=%{_initrddir} \
+	   --with-username=%username \
+           --disable-dietlibc
+make %{?_smp_mflags} all
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%__make DESTDIR=$RPM_BUILD_ROOT install install-contrib
-%__install -m750 -d $RPM_BUILD_ROOT%homedir
-%__install -pD -m 0644 %SOURCE10 $RPM_BUILD_ROOT/etc/init/ip-sentinel.conf
+make DESTDIR=$RPM_BUILD_ROOT install install-contrib
+install -m750 -d $RPM_BUILD_ROOT%homedir
+install -pD -m 0644 %SOURCE10 $RPM_BUILD_ROOT/etc/init/ip-sentinel.conf
 
-%{!?with_upstart: rm -rf $RPM_BUILD_ROOT%_sysconfdir/init}
+%{!?with_upstart: rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/init}
 %{!?with_minit:   rm -rf $RPM_BUILD_ROOT%minitsvcdir}
 
 
 %check
-%__make check
+make check
 
 
 %clean
@@ -173,7 +137,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %preun sysvinit
 if test "$1" = "0"; then
-	%_initrddir/%service stop >/dev/null
+	%{_initrddir}/%service stop >/dev/null
 	/sbin/chkconfig --del %service
 fi
 
@@ -191,15 +155,15 @@ test "$1" != "0" || /sbin/initctl -q stop ip-sentinel || :
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
-%_mandir/*/*
-%_sbindir/*
+%{_mandir}/*/*
+%{_sbindir}/*
 %attr(-,root,%username) %homedir
 
 
 %files sysvinit
 %defattr(-,root,root,-)
-%config %_initrddir/*
-%config(noreplace) %_sysconfdir/sysconfig/*
+%config %{_initrddir}/*
+%config(noreplace) %{_sysconfdir}/sysconfig/*
 
 
 %if 0%{?with_upstart:1}
@@ -222,6 +186,10 @@ test "$1" != "0" || /sbin/initctl -q stop ip-sentinel || :
 
 
 %changelog
+* Thu Feb 28 2013 Jon Ciesla <limburgher at gmail.com> - 0.12-1902
+- Spec cleanup.
+- Switch from dietlibc to glibc.
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.12-1901
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list