rpms/dhcp-forwarder/devel dhcp-forwarder.spec,1.13,1.14
Enrico Scholz (ensc)
fedora-extras-commits at redhat.com
Mon Jul 10 16:35:33 UTC 2006
Author: ensc
Update of /cvs/extras/rpms/dhcp-forwarder/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27202/dhcp-forwarder/devel
Modified Files:
dhcp-forwarder.spec
Log Message:
- rebuilt with dietlibc-0.30
- use new fedora-usermgmt code
- use %%bcond_* macros
Index: dhcp-forwarder.spec
===================================================================
RCS file: /cvs/extras/rpms/dhcp-forwarder/devel/dhcp-forwarder.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- dhcp-forwarder.spec 20 Feb 2006 17:56:14 -0000 1.13
+++ dhcp-forwarder.spec 10 Jul 2006 16:35:33 -0000 1.14
@@ -2,43 +2,29 @@
## 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
+## --without fedora ... disable fedora specific parts
+## --with minit ... disable creation of 'minit' subpackage
## Fedora Extras specific customization below...
-%{!?_without_fedora:%global _with_fedora --with fedora}
-%{!?_with_minit:%global _without_minit --without minit}
+%bcond_without fedora
+%bcond_without dietlibc
+%bcond_with minit
##
-%global uid 11
-%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
-
-
%global username dhcp-fwd
%global homedir %_var/lib/%username
%global minitdir %_sysconfdir/minit
%global minitsvcdir %minitdir/services/dhcp-fwd
%global service dhcp-fwd
-
-%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: DHCP relay agent
Name: dhcp-forwarder
Version: 0.7
-Release: %release_func 8
+Release: %release_func 9
License: GPL
Group: System Environment/Daemons
URL: http://www.tu-chemnitz.de/~ensc/dhcp-fwd
@@ -48,15 +34,12 @@
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: init(dhcp-forwarder)
BuildRequires: which
+BuildRequires: fedora-usermgmt-devel
+Provides: user(%username)
+Provides: group(%username)
+%{?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=182120
@@ -117,14 +100,12 @@
%setup -q
%patch0 -p0
-%{!?_without_dietlibc:which diet}
-
%build
%configure \
--enable-release \
--with-initrddir=%_initrddir \
- %{?_without_dietlibc:--disable-dietlibc}
+ %{!?with_dietlibc:--disable}%{?with_dietlibc:--enable}-dietlibc
%__make %{?_smp_mflags}
@@ -134,7 +115,7 @@
%__make DESTDIR=$RPM_BUILD_ROOT install install-contrib
%__install -d -m700 $RPM_BUILD_ROOT%homedir
-%{?_without_minit:rm -rf $RPM_BUILD_ROOT%minitsvcdir}
+%{!?with_minit:rm -rf $RPM_BUILD_ROOT%minitsvcdir}
@@ -148,16 +129,14 @@
%pre
-%groupadd -r %username &>/dev/null || :
-%useradd -r -s /sbin/nologin -M -c 'DHCP Forwarder user' \
- -d %homedir -g %username %username &>/dev/null || :
+%__fe_groupadd 11 -r %username &>/dev/null || :
+%__fe_useradd 11 -r -s /sbin/nologin -M -c 'DHCP Forwarder user' \
+ -d %homedir -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 +171,7 @@
%config(noreplace) %_sysconfdir/sysconfig/*
-%if 0%{!?_without_minit:1}
+%if 0%{?with_minit:1}
%files minit
%defattr(-,root,root,-)
@@ -205,6 +184,11 @@
%changelog
+* Sun Jul 9 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.7-9
+- 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.7-8
- exclude PPC arch because dietlibc is not available there anymore
More information about the fedora-extras-commits
mailing list