SPECS: spampd.spec - added manual and initscript

glen glen at pld-linux.org
Wed Jul 27 11:36:26 CEST 2005


Author: glen                         Date: Wed Jul 27 09:36:26 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added manual and initscript

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

---- Diffs:

================================================================
Index: SPECS/spampd.spec
diff -u SPECS/spampd.spec:1.1 SPECS/spampd.spec:1.2
--- SPECS/spampd.spec:1.1	Wed Jul 27 11:09:41 2005
+++ SPECS/spampd.spec	Wed Jul 27 11:36:20 2005
@@ -3,17 +3,22 @@
 Summary:	spampd - Spam Proxy Daemon
 Name:		spampd
 Version:	2.20
-Release:	0.1
+Release:	0.5
 Epoch:		0
 License:	GPL v2+
 Group:		Applications/Mail
 Source0:	http://www.worlddesign.com/Content/rd/mta/spampd/spampd-2.20.tar.gz
 # Source0-md5:	4efdb66e424bc24f8a7ce3bf6264ce31
+Source1:	%{name}.init
+Source2:	%{name}.sysconfig
 URL:		http://www.worlddesign.com/index.cfm/rd/mta/spampd.htm
-%if %{with initscript}
-PreReq:		rc-scripts
+BuildRequires:	perl-tools-pod
+BuildRequires:	rpmbuild(macros) >= 1.228
+# This is not automatically depended as it's only recommendation.
+# but we want PLD package be the best! :)
+Requires:	perl-Time-HiRes
+Requires(post,preun):	rc-scripts
 Requires(post,preun):	/sbin/chkconfig
-%endif
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -31,18 +36,37 @@
 %prep
 %setup -q
 
+%build
+pod2man spampd > spampd.1
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sbindir}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1,/etc/rc.d/init.d,/etc/sysconfig}
 install %{name} $RPM_BUILD_ROOT%{_sbindir}
+install %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add %{name}
+%service %{name} restart
+
+%preun
+if [ "$1" = "0" ]; then
+	%service -q %{name} stop
+	/sbin/chkconfig --del %{name}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc changelog.txt spampd.html
 %attr(755,root,root) %{_sbindir}/*
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%{_mandir}/man1/*
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -50,6 +74,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2005/07/27 09:36:20  glen
+- added manual and initscript
+
 Revision 1.1  2005/07/27 09:09:41  glen
 - initial
-
================================================================

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




More information about the pld-cvs-commit mailing list