2006-06-18 10:29:00 +02:00
|
|
|
# $NetBSD: Makefile,v 1.52 2006/06/18 08:29:00 xtraeme Exp $
|
2004-06-20 21:41:23 +02:00
|
|
|
|
2006-06-18 10:29:00 +02:00
|
|
|
DISTNAME= dspam-3.6.8
|
2004-06-20 21:41:23 +02:00
|
|
|
CATEGORIES= mail
|
|
|
|
MASTER_SITES= http://www.nuclearelephant.com/projects/dspam/sources/
|
|
|
|
|
2006-03-04 22:28:51 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2005-12-02 09:10:24 +01:00
|
|
|
HOMEPAGE= http://dspam.nuclearelephant.com/
|
2004-08-30 21:18:18 +02:00
|
|
|
COMMENT= Extremely scalable, statistical-hybrid anti-spam filter
|
2004-06-20 21:41:23 +02:00
|
|
|
|
2004-11-17 14:26:17 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2004-06-20 21:41:23 +02:00
|
|
|
USE_LIBTOOL= yes
|
|
|
|
|
2005-08-10 22:56:10 +02:00
|
|
|
USE_TOOLS+= perl:run pkg-config
|
2006-05-06 10:36:10 +02:00
|
|
|
REPLACE_PERL= src/tools/dspam_genaliases.in \
|
|
|
|
src/tools/dspam_corpus.in \
|
2005-10-20 10:33:13 +02:00
|
|
|
webui/cgi-bin/*.cgi webui/cgi-bin/configure.pl.in
|
2004-06-20 21:41:23 +02:00
|
|
|
|
2005-10-20 10:33:13 +02:00
|
|
|
PKGCONFIG_OVERRIDE+= src/dspam.pc.in
|
2004-06-20 21:41:23 +02:00
|
|
|
|
2005-10-20 10:33:13 +02:00
|
|
|
SUBST_CLASSES+= cgi
|
2004-06-20 21:41:23 +02:00
|
|
|
SUBST_STAGE.cgi= post-patch
|
2005-10-20 10:33:13 +02:00
|
|
|
SUBST_FILES.cgi= webui/cgi-bin/templates/nav_performance.html \
|
|
|
|
webui/cgi-bin/configure.pl.in \
|
|
|
|
webui/cgi-bin/dspam.cgi webui/cgi-bin/admin.cgi \
|
|
|
|
webui/cgi-bin/graph.cgi webui/cgi-bin/admingraph.cgi
|
|
|
|
SUBST_SED.cgi= -e "s|auxw|${DSPAM_PSFLAGS}|g" \
|
|
|
|
-e "s|yourdomain.com|${DSPAM_DOMAIN}|g" \
|
|
|
|
-e "s|./admins|${PKG_SYSCONFDIR}/cgi-admins|" \
|
|
|
|
-e "s|configure.pl|${PKG_SYSCONFDIR}/configure.pl|" \
|
|
|
|
-e "s|\"\/\";|\"${DSPAM_WWWHOME}\";|" \
|
|
|
|
-e "s|\$$FILE = \"./default.prefs\";|\$$FILE = \"${PKG_SYSCONFDIR}/cgi-default.prefs\";|"
|
2006-04-22 11:22:05 +02:00
|
|
|
SUBST_MESSAGE.cgi= Fixing paths and default options.
|
2004-06-20 21:41:23 +02:00
|
|
|
|
|
|
|
BUILD_DEFS+= DSPAM_HOME
|
|
|
|
BUILD_DEFS+= DSPAM_SIGNATURE_LIFE
|
|
|
|
BUILD_DEFS+= DSPAM_USER DSPAM_GROUP
|
|
|
|
BUILD_DEFS+= DSPAM_BINMODE
|
2004-10-22 07:43:28 +02:00
|
|
|
BUILD_DEFS+= DSPAM_LOGDIR
|
2006-05-06 10:36:10 +02:00
|
|
|
BUILD_DEFS+= DSPAM_LOGFILE
|
2004-10-28 12:12:47 +02:00
|
|
|
BUILD_DEFS+= DSPAM_DOMAIN
|
2005-10-20 10:33:13 +02:00
|
|
|
BUILD_DEFS+= DSPAM_WWWHOME
|
2005-03-21 22:35:52 +01:00
|
|
|
BUILD_DEFS+= DSPAM_PIDDIR
|
2005-11-12 17:53:19 +01:00
|
|
|
BUILD_DEFS+= DSPAM_WWWUSER DSPAM_WWWGROUP
|
2004-06-20 21:41:23 +02:00
|
|
|
|
2004-08-06 23:24:13 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
2004-06-20 21:41:23 +02:00
|
|
|
|
|
|
|
DSPAM_HOME?= ${VARBASE}/dspam
|
2004-08-06 23:24:13 +02:00
|
|
|
DSPAM_SIGNATURE_LIFE?= 14
|
2004-06-20 21:41:23 +02:00
|
|
|
|
|
|
|
DSPAM_BINMODE?= 4511
|
|
|
|
DSPAM_USER?= dspam
|
|
|
|
DSPAM_GROUP?= dspam
|
2004-10-22 07:43:28 +02:00
|
|
|
DSPAM_LOGDIR?= ${DSPAM_HOME}/log
|
2006-05-06 10:36:10 +02:00
|
|
|
DSPAM_LOGFILE?= ${DSPAM_LOGDIR}/dspam.log
|
2004-10-28 12:12:47 +02:00
|
|
|
DSPAM_DOMAIN?= yourdomain.com
|
2005-10-20 10:33:13 +02:00
|
|
|
DSPAM_WWWHOME?= /dspam
|
2005-03-21 22:35:52 +01:00
|
|
|
DSPAM_PIDDIR?= ${VARBASE}/run/dspam
|
2005-11-12 17:53:19 +01:00
|
|
|
DSPAM_WWWUSER?= ${APACHE_USER}
|
|
|
|
DSPAM_WWWGROUP?= ${APACHE_GROUP}
|
2004-06-20 21:41:23 +02:00
|
|
|
|
2005-12-06 00:55:01 +01:00
|
|
|
CONFIGURE_ARGS+= --with-signature-life=${DSPAM_SIGNATURE_LIFE:Q}
|
|
|
|
CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME:Q} \
|
|
|
|
--with-dspam-home-owner=${DSPAM_USER:Q} \
|
|
|
|
--with-dspam-home-group=${DSPAM_GROUP:Q} \
|
|
|
|
--with-dspam-owner=${DSPAM_USER:Q} \
|
|
|
|
--with-dspam-group=${DSPAM_GROUP:Q} \
|
|
|
|
--with-dspam-mode=${DSPAM_BINMODE:Q} \
|
|
|
|
--with-logdir=${DSPAM_LOGDIR:Q} \
|
|
|
|
--sysconfdir=${PKG_SYSCONFDIR:Q}
|
2004-06-20 21:41:23 +02:00
|
|
|
|
2004-08-06 23:24:13 +02:00
|
|
|
.include "options.mk"
|
|
|
|
.include "../../mk/pthread.buildlink3.mk"
|
2004-06-20 21:41:23 +02:00
|
|
|
|
2004-08-06 23:24:13 +02:00
|
|
|
DOCDIR= ${PREFIX}/share/doc/dspam
|
|
|
|
DATADIR= ${PREFIX}/share/dspam
|
2004-10-22 07:43:28 +02:00
|
|
|
EGDIR= ${PREFIX}/share/examples/dspam
|
2004-06-20 21:41:23 +02:00
|
|
|
|
2005-03-21 22:35:52 +01:00
|
|
|
RCD_SCRIPTS= dspam
|
|
|
|
|
|
|
|
PKG_SYSCONFSUBDIR= dspam
|
|
|
|
|
2004-10-28 12:12:47 +02:00
|
|
|
CONF_FILES_PERMS= ${EGDIR}/dspam.conf ${PKG_SYSCONFDIR}/dspam.conf \
|
2005-11-12 17:53:19 +01:00
|
|
|
${DSPAM_USER} ${DSPAM_WWWGROUP} 0640
|
2005-03-21 22:35:52 +01:00
|
|
|
CONF_FILES_PERMS+= ${EGDIR}/cgi-admins ${PKG_SYSCONFDIR}/cgi-admins \
|
2005-11-12 17:53:19 +01:00
|
|
|
${DSPAM_WWWUSER} ${DSPAM_WWWGROUP} 0640
|
2005-03-21 22:35:52 +01:00
|
|
|
CONF_FILES_PERMS+= ${EGDIR}/cgi-default.prefs \
|
2005-04-14 22:39:59 +02:00
|
|
|
${PKG_SYSCONFDIR}/cgi-default.prefs \
|
2005-11-12 17:53:19 +01:00
|
|
|
${DSPAM_WWWUSER} ${DSPAM_WWWGROUP} 0640
|
2005-03-21 22:35:52 +01:00
|
|
|
CONF_FILES_PERMS+= ${EGDIR}/configure.pl ${PKG_SYSCONFDIR}/configure.pl \
|
2005-11-12 17:53:19 +01:00
|
|
|
${DSPAM_WWWUSER} ${DSPAM_WWWGROUP} 0640
|
2004-10-22 07:43:28 +02:00
|
|
|
|
2004-08-07 08:12:20 +02:00
|
|
|
PKG_GROUPS= ${DSPAM_GROUP}
|
|
|
|
PKG_USERS= ${DSPAM_USER}:${DSPAM_GROUP}
|
|
|
|
SPECIAL_PERMS= ${PREFIX}/bin/dspam ${DSPAM_USER} ${DSPAM_GROUP} \
|
|
|
|
${DSPAM_BINMODE}
|
2005-11-12 17:53:19 +01:00
|
|
|
OWN_DIRS_PERMS= ${DSPAM_HOME} ${DSPAM_USER} ${DSPAM_WWWGROUP} 0775
|
2004-10-28 08:03:18 +02:00
|
|
|
OWN_DIRS_PERMS+= ${DSPAM_LOGDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0775
|
2005-10-20 10:33:13 +02:00
|
|
|
OWN_DIRS_PERMS+= ${DSPAM_PIDDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0770
|
2005-03-21 22:35:52 +01:00
|
|
|
|
2005-12-05 21:49:47 +01:00
|
|
|
FILES_SUBST+= DSPAM_USER=${DSPAM_USER:Q}
|
|
|
|
FILES_SUBST+= DSPAM_GROUP=${DSPAM_GROUP:Q}
|
|
|
|
FILES_SUBST+= DSPAM_PIDDIR=${DSPAM_PIDDIR:Q}
|
2004-08-07 08:12:20 +02:00
|
|
|
|
2004-10-22 07:43:28 +02:00
|
|
|
SUBST_CLASSES+= conf
|
|
|
|
SUBST_STAGE.conf= pre-install
|
2005-03-21 22:35:52 +01:00
|
|
|
SUBST_FILES.conf= src/dspam.conf.in
|
2004-10-22 07:43:28 +02:00
|
|
|
SUBST_SED.conf= -e "s,@dspam_home@,${DSPAM_HOME},g" \
|
2005-10-20 10:33:13 +02:00
|
|
|
-e "s,@delivery_agent@,${DSPAM_DELIVERY_AGENT_BIN},g" \
|
|
|
|
-e "s|@PREFIX@|${PREFIX}|g" \
|
|
|
|
-e "s|@VARBASE@|${VARBASE}|g" \
|
|
|
|
-e "s|@DSPAM_PIDDIR@|${DSPAM_PIDDIR}|g"
|
2006-04-22 11:22:05 +02:00
|
|
|
SUBST_MESSAGE.conf= Fixing configuration file.
|
2004-10-22 07:43:28 +02:00
|
|
|
|
2004-06-20 21:41:23 +02:00
|
|
|
post-install:
|
2004-08-06 23:24:13 +02:00
|
|
|
${INSTALL_DATA_DIR} ${DOCDIR}
|
2005-03-21 22:35:52 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
|
2004-08-06 23:24:13 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/RELEASE.NOTES ${DOCDIR}
|
2005-10-20 10:33:13 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/UPGRADING ${DOCDIR}
|
2005-03-21 22:35:52 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DOCDIR}
|
2004-08-06 23:24:13 +02:00
|
|
|
${INSTALL_DATA_DIR} ${DATADIR}
|
2004-10-22 07:43:28 +02:00
|
|
|
${INSTALL_DATA_DIR} ${EGDIR}
|
2005-03-21 22:35:52 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/src/dspam.conf.in ${EGDIR}/dspam.conf
|
2005-10-20 10:33:13 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/webui/cgi-bin/admins ${EGDIR}/cgi-admins
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/webui/cgi-bin/default.prefs \
|
|
|
|
${EGDIR}/cgi-default.prefs
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/webui/cgi-bin/configure.pl \
|
|
|
|
${EGDIR}/configure.pl
|
|
|
|
|
|
|
|
.for d in txt webui/cgi-bin webui/htdocs
|
2004-08-06 23:24:13 +02:00
|
|
|
${INSTALL_DATA_DIR} ${DATADIR}/${d}
|
|
|
|
cd ${WRKSRC}/${d} && ${PAX} -rwppm '-s|.*/Makefile.*$$||' \
|
2005-03-21 22:35:52 +01:00
|
|
|
'-s|./admins.*$$||' '-s|./default.prefs.*$$||' \
|
|
|
|
'-s|./configure.pl.*$$||' . ${DATADIR}/${d}
|
2004-06-20 21:41:23 +02:00
|
|
|
.endfor
|
2005-10-20 10:33:13 +02:00
|
|
|
|
2005-04-14 07:32:37 +02:00
|
|
|
.for drv in mysql pgsql
|
2004-10-22 07:43:28 +02:00
|
|
|
. if !empty(DSPAM_STORAGE_DRIVER:M${drv})
|
|
|
|
${INSTALL_DATA_DIR} ${DATADIR}/${drv}
|
2005-03-21 22:35:52 +01:00
|
|
|
cd ${WRKSRC}/src/tools.${drv}_drv && \
|
|
|
|
${PAX} -rwppm '-s|.*/Makefile.*$$||' . ${DATADIR}/${drv}
|
2004-10-22 07:43:28 +02:00
|
|
|
. endif
|
|
|
|
.endfor
|
2005-10-20 10:33:13 +02:00
|
|
|
|
2005-04-14 07:32:37 +02:00
|
|
|
.if !empty(DSPAM_STORAGE_DRIVER:Msqlite*)
|
|
|
|
${INSTALL_DATA_DIR} ${DATADIR}/sqlite
|
|
|
|
cd ${WRKSRC}/src/tools.sqlite_drv && \
|
|
|
|
${PAX} -rwppm '-s|.*/Makefile.*$$||' . ${DATADIR}/sqlite
|
|
|
|
.endif
|
2004-06-20 21:41:23 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|