aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorLi-Wen Hsu <lwhsu@FreeBSD.org>2009-07-02 01:23:45 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2009-07-02 01:23:45 +0000
commitc2599781f507e17187f5588f5dbc0a4b2db0a46a (patch)
tree5619e843037c7998136a62b581fae645fa0e9a52 /mail
parent68c552f9b71da27cb4e46ffa3f123b50e846b0aa (diff)
downloadports-c2599781f507e17187f5588f5dbc0a4b2db0a46a.tar.gz
ports-c2599781f507e17187f5588f5dbc0a4b2db0a46a.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>
Notes
Notes: svn path=/head/; revision=236889
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"