rpms/ip-sentinel/devel ip-sentinel.spec,1.9,1.10
Enrico Scholz (ensc)
fedora-extras-commits at redhat.com
Mon Jul 10 16:36:12 UTC 2006
Author: ensc
Update of /cvs/extras/rpms/ip-sentinel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27291/ip-sentinel/devel
Modified Files:
ip-sentinel.spec
Log Message:
- rebuilt with dietlibc-0.30
- use new fedora-usermgmt code
- use %%bcond_* macros
Index: ip-sentinel.spec
===================================================================
RCS file: /cvs/extras/rpms/ip-sentinel/devel/ip-sentinel.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ip-sentinel.spec 20 Feb 2006 18:00:22 -0000 1.9
+++ ip-sentinel.spec 10 Jul 2006 16:36:12 -0000 1.10
@@ -17,44 +17,31 @@
## This package understands the following switches:
-## --without dietlibc ... disable usage of dietlibc
-## --with dietlibc ... enforce dietlibc usage on archs not supporting it
-## --without minit ... disable creation of 'minit' subpackage
-## --with fedora ... enable fedora.us specific parts
-## --define username\ name ... set the name of the user running the daemon
+## --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...
-%{!?_with_minit:%global _without_minit --without minit}
-%{!?_without_fedora:%global _with_fedora --with fedora}
+%bcond_without fedora
+%bcond_without dietlibc
+%bcond_with minit
##
-%global uid 1
-%global useradd /usr/sbin/%{?_with_fedora:fedora-}useradd %{?_with_fedora:%uid }
-%global groupadd /usr/sbin/%{?_with_fedora:fedora-}groupadd %{?_with_fedora:%uid}
-%global userdel /usr/sbin/%{?_with_fedora:fedora-}userdel
-%global groupdel /usr/sbin/%{?_with_fedora:fedora-}groupdel
-
%{!?username:%global username ip-sentinel}
%global service ip-sentinel
%global homedir %_var/lib/ip-sentinel
%global minitdir %_sysconfdir/minit
%global minitsvcdir %minitdir/services/%name
-
-%global have_dietlibc %(case %_target_cpu in (i*86|athlon) true;; (*) test '%{?dist}' != .fc3;; esac && echo 1 || echo 0)
-%if ! %have_dietlibc
-%{!?_with_dietlibc:%global _without_dietlibc --without dietlibc}
-%endif
-
-
%{!?release_func:%global release_func() %1%{?dist}}
Summary: Tool to prevent unauthorized usage of IP addresses
Name: ip-sentinel
Version: 0.12
-Release: %release_func 6
+Release: %release_func 7
License: GPL
Group: System Environment/Daemons
URL: http://www.nongnu.org/ip-sentinel/
@@ -63,16 +50,13 @@
Patch0: ip-sentinel-0.12-pidfile.patch
BuildRoot: %_tmppath/%name-%version-%release-buildroot
Requires: init(ip-sentinel)
+Provides: user(%username)
+Provides: group(%username)
BuildRequires: which
+BuildRequires: fedora-usermgmt-devel
+%{?FE_USERADD_REQ}
-%{!?_without_dietlibc:BuildRequires: dietlibc}
-
-## The Requires(...) which depend on the '--with fedora' switch
-%{!?_with_fedora:Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd}
-%{!?_with_fedora:Requires(postun): /usr/sbin/userdel /usr/sbin/groupdel}
-%{?_with_fedora:Requires(pre): fedora-usermgmt}
-%{?_with_fedora:Requires(postun): fedora-usermgmt}
-
+%{?with_dietlibc:BuildRequires: dietlibc}
# dietlibc is not available for PPC anymore
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=182118
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=182123
@@ -132,7 +116,8 @@
%build
%configure --enable-release \
--with-initrddir=%_initrddir \
- --with-username=%username %{?_without_dietlibc:--disable-dietlibc}
+ --with-username=%username \
+ %{!?with_dietlibc:--disable}%{?with_dietlibc:--enable}-dietlibc
%__make %{?_smp_mflags} all
@@ -142,7 +127,7 @@
%__make DESTDIR=$RPM_BUILD_ROOT install install-contrib
%__install -m750 -d $RPM_BUILD_ROOT%homedir
-%{?_without_minit:rm -rf $RPM_BUILD_ROOT%minitsvcdir}
+%{!?with_minit:rm -rf $RPM_BUILD_ROOT%minitsvcdir}
%check
@@ -154,15 +139,14 @@
%pre
-%groupadd -r %username &>/dev/null || :
-%useradd -r -s /sbin/nologin -M -d %homedir \
- -c 'IP sentinel user' -g %username %username &>/dev/null || :
+%__fe_groupadd 1 -r %username &>/dev/null || :
+%__fe_useradd 1 -r -s /sbin/nologin -M -d %homedir \
+ -c 'IP sentinel user' -g %username %username &>/dev/null || :
+
%postun
-if test "$1" = "0"; then
- %userdel %username &>/dev/null || :
- %groupdel %username &>/dev/null || :
-fi
+%__fe_userdel %username &>/dev/null || :
+%__fe_groupdel %username &>/dev/null || :
%post sysv
@@ -192,7 +176,7 @@
%config(noreplace) %_sysconfdir/sysconfig/*
-%if 0%{!?_without_minit:1}
+%if 0%{?with_minit:1}
%files minit
%defattr(-,root,root,-)
@@ -205,6 +189,11 @@
%changelog
+* Sun Jul 9 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.12-7
+- rebuilt with dietlibc-0.30
+- use new fedora-usermgmt code
+- use %%bcond_* macros
+
* Mon Feb 20 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.12-6
- exclude PPC arch because dietlibc is not available there anymore
More information about the fedora-extras-commits
mailing list