SPECS: hula.spec - pldize

glen glen at pld-linux.org
Tue Mar 14 09:21:29 CET 2006


Author: glen                         Date: Tue Mar 14 08:21:29 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- pldize

---- Files affected:
SPECS:
   hula.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/hula.spec
diff -u SPECS/hula.spec:1.1 SPECS/hula.spec:1.2
--- SPECS/hula.spec:1.1	Tue Mar 14 07:33:30 2006
+++ SPECS/hula.spec	Tue Mar 14 09:21:24 2006
@@ -1,4 +1,6 @@
 # $Revision$, $Date$
+# TODO
+# - register uid in PLD-doc/uid_gid.db.txt and use it
 Summary:	A calendar and mail server
 Name:		hula
 Version:	r1164
@@ -13,6 +15,12 @@
 BuildRequires:	automake
 BuildRequires:	libtool
 BuildRequires:	openssl-devel
+BuildRequires:	rpmbuild(macros) >= 1.268
+Requires(post,postun):	/sbin/ldconfig
+Requires(postun):	/usr/sbin/userdel
+Requires(pre):	/bin/id
+Requires(pre):	/usr/sbin/useradd
+Provides:	user(hula)
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -33,45 +41,47 @@
 %setup -q
 
 %build
-./autogen.sh --with-user=hula
+./autogen.sh \
+	--with-user=hula
 %configure
-%{__make} %{?_smp_mflags}
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/hula
+
 # remove all .la files
-/bin/rm -rf $RPM_BUILD_ROOT%{_libdir}/connmgr/*.la \
+rm -f $RPM_BUILD_ROOT%{_libdir}/connmgr/*.la \
 	    $RPM_BUILD_ROOT%{_libdir}/hulamdb/*.la \
 	    $RPM_BUILD_ROOT%{_libdir}/*.la \
 	    $RPM_BUILD_ROOT%{_libdir}/modweb/*.la
 
 # remove empty or irrelevant doco
-for foo in ChangeLog INSTALL NEWS; do
-  /bin/rm -rf $RPM_BUILD_ROOT/$foo
-done
+rm -f $RPM_BUILD_ROOT/{ChangeLog,INSTALL,NEWS}
 
-install -D %{SOURCE1} -D $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/hula
+%pre
+# Create system user for hula
+# TODO: use specific uid
+%useradd -c "Hula" -s /sbin/nologin -r hula
 
 %post
 /sbin/ldconfig
-if [ $1 = 1 ]; then
-  /sbin/chkconfig --add hula
-fi
-
-%pre
-# Create system user for hula
-/usr/sbin/useradd -c "Hula" -s /sbin/nologin -r hula 2> /dev/null || :
+/sbin/chkconfig --add hula
 
 %preun
-if [ $1 -eq 0 ]; then
-  /sbin/service hula stop >/dev/null 2>&1 ||:
-  /sbin/chkconfig --del hula
+if [ "$1" -eq 0 ]; then
+	%service hula stop
+	/sbin/chkconfig --del hula
 fi
 
-%postun -p /sbin/ldconfig
+%postun
+/sbin/ldconfig
+if [ "$1" = "0" ]; then
+	%userremove lula
+fi
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -255,6 +265,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2006/03/14 08:21:24  glen
+- pldize
+
 Revision 1.1  2006/03/14 06:33:30  aredridel
 - added, NFY (from fedora extras)
-
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/hula.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list