aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2009-07-02 09:23:45 +0800
committerlwhsu <lwhsu@FreeBSD.org>2009-07-02 09:23:45 +0800
commit4b3074917ee18ba86558157fc095080f14166892 (patch)
treebcfc293711992ba22fed569035fdb6bc1a5a5148 /mail
parent70ec1904143c0a992a65fbbf03f29de9e885ff62 (diff)
downloadfreebsd-ports-gnome-4b3074917ee18ba86558157fc095080f14166892.tar.gz
freebsd-ports-gnome-4b3074917ee18ba86558157fc095080f14166892.tar.zst
freebsd-ports-gnome-4b3074917ee18ba86558157fc095080f14166892.zip
- Mark USE_PYTHON=-2.5 because it cannot work for Python 2.6
- Cleanup rc script Tested/reported by: Torfinn Ingolfsen <tingox AT gmail.com>
Diffstat (limited to 'mail')
-rw-r--r--mail/py-spambayes/Makefile6
-rw-r--r--mail/py-spambayes/files/pyspamd.in9
2 files changed, 7 insertions, 8 deletions
diff --git a/mail/py-spambayes/Makefile b/mail/py-spambayes/Makefile
index 02c4b95b4c64..a80df90490d5 100644
--- a/mail/py-spambayes/Makefile
+++ b/mail/py-spambayes/Makefile
@@ -7,19 +7,18 @@
PORTNAME= spambayes
PORTVERSION= 1.0.4
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
-DISTNAME= ${PORTNAME}-${PORTVERSION:C/(.)\.(..)\.(.)$/\1\2\3/}
MAINTAINER= ports@FreeBSD.org
COMMENT= A Bayesian anti-spam filter written in Python
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/_bsddb.so:${PORTSDIR}/databases/py-bsddb
-USE_PYTHON= yes
+USE_PYTHON= -2.5
USE_PYDISTUTILS= yes
USE_RC_SUBR= pyspamd
LOCALSTATDIR?= /var/db/spambayes
@@ -28,6 +27,7 @@ CACHEDIR?= ${LOCALSTATDIR}/cache
PLIST_SUB+= LOCALSTATDIR=${LOCALSTATDIR} \
DBDIR=${DBDIR} \
CACHEDIR=${CACHEDIR}
+SUB_LIST+= PYTHON_CMD=${PYTHON_CMD}
PORTDOCS= CHANGELOG.txt \
LICENSE.txt \
diff --git a/mail/py-spambayes/files/pyspamd.in b/mail/py-spambayes/files/pyspamd.in
index 7dab9dfbf92a..dbbda2ba1520 100644
--- a/mail/py-spambayes/files/pyspamd.in
+++ b/mail/py-spambayes/files/pyspamd.in
@@ -7,7 +7,6 @@
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
-prefix=/usr/local
# Define these pyspamd_* variables in one of these files:
# /etc/rc.conf
@@ -16,7 +15,7 @@ prefix=/usr/local
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
-. /etc/rc.subr
+. %%RC_SUBR%%
name="pyspamd"
rcvar=`set_rcvar`
@@ -24,12 +23,12 @@ rcvar=`set_rcvar`
load_rc_config $name
: ${pyspamd_enable="NO"}
-: ${pyspamd_config="/usr/local/etc/bayescustomize.ini"}
+: ${pyspamd_config="%%PREFIX%%/etc/bayescustomize.ini"}
command="/usr/sbin/daemon"
-command_args=" -p /var/run/pyspamd.pid /usr/local/bin/python -OO /usr/local/bin/sb_server.py 2>&1 >/dev/null"
pidfile="/var/run/pyspamd.pid"
-procname="/usr/local/bin/python"
+command_args="-p ${pidfile} %%PYTHON_CMD%% -OO %%PREFIX%%/bin/sb_server.py 2>&1 >/dev/null"
+procname="%%PYTHON_CMD%%"
export BAYESCUSTOMIZE=${pyspamd_config}
run_rc_command "$1"