[csw-devel] SF.net SVN: gar:[8348] csw/mgar/pkg/spamassassin/trunk
bonivart at users.sourceforge.net
bonivart at users.sourceforge.net
Thu Feb 4 17:26:50 CET 2010
Revision: 8348
http://gar.svn.sourceforge.net/gar/?rev=8348&view=rev
Author: bonivart
Date: 2010-02-04 16:26:50 +0000 (Thu, 04 Feb 2010)
Log Message:
-----------
spamassassin: fix init script, deps
Modified Paths:
--------------
csw/mgar/pkg/spamassassin/trunk/Makefile
csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswspamd
Added Paths:
-----------
csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.spamd.CSW
Modified: csw/mgar/pkg/spamassassin/trunk/Makefile
===================================================================
--- csw/mgar/pkg/spamassassin/trunk/Makefile 2010-02-04 12:54:45 UTC (rev 8347)
+++ csw/mgar/pkg/spamassassin/trunk/Makefile 2010-02-04 16:26:50 UTC (rev 8348)
@@ -10,25 +10,31 @@
DNS blocklists, and collaborative filtering databases.
endef
-#MASTER_SITES = http://apache.jumper.nu/spamassassin/source/
-MASTER_SITES = http://people.apache.org/~jm/devel/
+#MASTER_SITES = http://people.apache.org/~jm/devel/
+MASTER_SITES = http://apache.dataphone.se/spamassassin/source/
DISTFILES = $(SPKG_NAME)-$(GARVERSION).tar.gz
#DISTFILES = $(SPKG_NAME)-$(GARVERSION)-rc3.tar.gz
DISTFILES += COPYING
-RUNTIME_DEP_PKGS = CSWosslrt CSWperl CSWpmarchivetar CSWpmdbi CSWpmdigestsha
+RUNTIME_DEP_PKGS = CSWgnupg CSWosslrt CSWperl CSWpmarchivetar CSWpmdbi CSWpmdigestsha
RUNTIME_DEP_PKGS += CSWpmiosocketinet6 CSWpmiosocketssl CSWpmiozlib
RUNTIME_DEP_PKGS += CSWpmipcountry CSWpmldap CSWpmlibwww CSWpmmaildkim
RUNTIME_DEP_PKGS += CSWpmmailspf CSWpmmailtools CSWpmmimebase64 CSWpmnetaddrip CSWpmnetdns
-RUNTIME_DEP_PKGS += CSWpmuri CSWpmhtmlparser CSWzlib
+RUNTIME_DEP_PKGS += CSWrazor CSWpmuri CSWpmhtmlparser CSWzlib
UFILES_REGEX = $(SPKG_NAME)-(\d+(?:\.\d+)*).tar.gz
-SAMPLECONF = /opt/csw/etc/spamassassin/.+\.pre\.CSW
-SAMPLECONF += /opt/csw/etc/spamassassin/local\.cf\.CSW
+#SAMPLECONF = /opt/csw/etc/spamassassin/.+\.pre\.CSW
+#SAMPLECONF += /opt/csw/etc/spamassassin/local\.cf\.CSW
+SAMPLECONF = /etc/opt/csw/spamassassin/.+\.pre\.CSW
+SAMPLECONF += /etc/opt/csw/spamassassin/local\.cf\.CSW
+SAMPLECONF += /etc/opt/csw/spamassassin/spamd\.CSW
+USERGROUP = /etc/opt/csw/pkg/CSWspamassassin/cswusergroup
INITSMF = /etc/opt/csw/init.d/cswspamd
-USERGROUP = /opt/csw/etc/CSWspamassassin/cswusergroup
+MIGRATE_FILES = /opt/csw/etc/spamassassin
+MIGRATE_DEST_DIR = /etc/opt/csw/spamassassin
+
CONFIGURE_SCRIPTS = custom
BUILD_SCRIPTS = custom
#TEST_SCRIPTS = custom
@@ -49,7 +55,7 @@
configure-custom:
@echo " ==> Configuring $(GARNAME) (custom)"
@( cd $(WORKSRC) ; \
- perl Makefile.PL INSTALLDIRS=vendor DESTDIR=$(DESTDIR) CONFDIR=/opt/csw/etc/spamassassin LOCALSTATEDIR=/var/opt/csw/spamassassin CONTACT_ADDRESS=postmaster )
+ perl Makefile.PL INSTALLDIRS=vendor DESTDIR=$(DESTDIR) CONFDIR=/etc/opt/csw/spamassassin LOCALSTATEDIR=/var/opt/csw/spamassassin CONTACT_ADDRESS=postmaster )
@$(MAKECOOKIE)
pre-build-modulated:
@@ -76,10 +82,13 @@
@rm -rf $(DESTDIR)
@ginstall -m 755 -d $(DESTDIR)$(docdir)/$(GARNAME)
@ginstall -m 755 -d $(DESTDIR)/var/opt/csw/$(GARNAME)
- @ginstall -m 755 -d $(DESTDIR)$(sysconfdir)/CSWspamassassin
+# @ginstall -m 755 -d $(DESTDIR)$(sysconfdir)/CSWspamassassin
+ @ginstall -m 755 -d $(DESTDIR)/etc/opt/csw/spamassassin
+ @ginstall -m 755 -d $(DESTDIR)/etc/opt/csw/pkg/CSWspamassassin
@ginstall -m 755 -d $(DESTDIR)/etc/opt/csw/init.d
@ginstall -m 755 $(FILEDIR)/CSWspamassassin.cswspamd $(DESTDIR)/etc/opt/csw/init.d/cswspamd
- @ginstall -m 644 $(FILEDIR)/CSWspamassassin.cswusergroup $(DESTDIR)$(sysconfdir)/CSWspamassassin/cswusergroup
+ @ginstall -m 644 $(FILEDIR)/CSWspamassassin.cswusergroup $(DESTDIR)/etc/opt/csw/pkg/CSWspamassassin/cswusergroup
+ @ginstall -m 644 $(FILEDIR)/CSWspamassassin.spamd.CSW $(DESTDIR)/etc/opt/csw/spamassassin/spamd.CSW
@cp $(FILEDIR)/CSWspamassassin.README.CSW $(DESTDIR)$(docdir)/$(GARNAME)/README.CSW
@cp $(FILEDIR)/CSWspamassassin.README.spamd $(DESTDIR)$(docdir)/$(GARNAME)/README.spamd
echo "WORKSRC: $(WORKSRC)"
@@ -87,11 +96,12 @@
gmake DESTDIR=$(DESTDIR) install )
@( cd $(WORKSRC) ; \
cp -r C* INSTALL NOTICE README TRADEMARK U* ldap/ sql/ procmailrc.example sample-* $(DESTDIR)$(docdir)/$(GARNAME)/ )
- @( cd $(DESTDIR)/opt/csw/etc/spamassassin ; \
+ @( cd $(DESTDIR)/etc/opt/csw/spamassassin ; \
mv local.cf local.cf.CSW ; \
mv init.pre init.pre.CSW ; \
mv v310.pre v310.pre.CSW ; \
mv v312.pre v312.pre.CSW ; \
+ mv v330.pre v330.pre.CSW ; \
mv v320.pre v320.pre.CSW )
@rm -rf $(DESTDIR)/opt/csw/lib
@$(MAKECOOKIE)
Modified: csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswspamd
===================================================================
--- csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswspamd 2010-02-04 12:54:45 UTC (rev 8347)
+++ csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.cswspamd 2010-02-04 16:26:50 UTC (rev 8348)
@@ -1,35 +1,61 @@
#!/sbin/sh
-#
-# From: skod at ises-llc.com (Scott Griffith, ISES-LLC)
-# To: <craig at stanfordalumni.org>, <spamassassin-talk at lists.sourceforge.net>
-# Subject: Re: [Spamassassin-talk] SysV-style startup script
-# Date: Sat, 24 Nov 2001 12:09:16 -0700
-# Modified for CSW by Alex Moore
-#
-# In case there are any Solaris folks out there who aren't comfortable
-# with their own rc scripts, here's what I've been using for Solaris 7
-# from day 1 with no problems. Filename:
-#
-# /etc/rc2.d/S78spamd
+#RC_KLEV 0,1,2,S
+#RC_SLEV 3
+
+# rc-script for CSW SpamAssassin
+# Peter Bonivart, 2010-02-01
+
+# Source SMF includes
+[ -r /lib/svc/share/smf_include.sh ] && . /lib/svc/share/smf_include.sh
+
+# Source config file
+[ -r /etc/opt/csw/spamassassin/spamd ] && . /etc/opt/csw/spamassassin/spamd
+
+PROG=spamd
PATH=$PATH:/usr/bin:/opt/csw/bin
+#OPTIONS=-i 127.0.0.1 -m 10 --min-children=2 --max-conn-per-child=50 -s local2 --syslog-socket=inet -u spamd -x -r /opt/csw/var/spamd/spamd.pid
+ZONE= # used for initialization, do not change
+
case "$1" in
-'start')
- if [ -x /usr/bin/spamd -o -x /opt/csw/bin/spamd ]
- then
- spamd -d -i 127.0.0.1 -m 10 --min-children=2 --max-conn-per-child=50 -s local2 --syslog-socket=inet -u spamd -x -r /opt/csw/var/spamd/spamd.pid
- fi
- ;;
+ start)
+ if [ -x /opt/csw/bin/spamd ]; then
+ if [ -d /var/opt/csw/spamassassin/3.003000 ]; then
+ echo "Starting $PROG."
+ /opt/csw/bin/spamd -d $OPTIONS
+ else
+ echo "Rules directory not found. Run sa-update to fetch rules."
+ fi
+ fi
+ ;;
-'stop')
- /usr/bin/pkill -9 -x -u 0 '(spamd)'
- ;;
+ stop)
+ echo "Shutting down $PROG."
+ if [ -x /usr/bin/zonename ]; then
+ if [ "`/usr/bin/zonename`" = "global" ]; then
+ ZONE="-z global"
+ fi
+ fi
+ pkill $ZONE -x spamd
+ ;;
-*)
- echo "Usage: $0 { start | stop }"
- exit 1
- ;;
+ restart)
+ $0 stop
+ echo "Waiting for $PROG to stop.\c"
+ while ( /usr/bin/pgrep -x $PROG > /dev/null ) ; do
+ echo ".\c"
+ sleep 1
+ done
+ echo
+ sleep 1
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: $0 { start | stop | restart }"
+ exit 1
+ ;;
esac
+
exit 0
-
Added: csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.spamd.CSW
===================================================================
--- csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.spamd.CSW (rev 0)
+++ csw/mgar/pkg/spamassassin/trunk/files/CSWspamassassin.spamd.CSW 2010-02-04 16:26:50 UTC (rev 8348)
@@ -0,0 +1,7 @@
+# This is where you customize some settings of your SpamAssassin installation so
+# you don't have to edit the scripts themselves as they will be replaced during
+# upgrades.
+#
+# Peter Bonivart, OpenCSW
+
+OPTIONS=-i 127.0.0.1 -m 10 --min-children=2 --max-conn-per-child=50 -s local2 --syslog-socket=inet -u spamd -x -r /opt/csw/var/spamd/spamd.pid
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list