Annotation of pkgsrc/mail/dspam/Makefile, Revision 1.33
1.33 ! xtraeme 1: # $NetBSD: Makefile,v 1.32 2005/05/25 15:36:06 cube Exp $
1.1 xtraeme 2:
1.33 ! xtraeme 3: DISTNAME= dspam-3.4.7
1.1 xtraeme 4: CATEGORIES= mail
5: MASTER_SITES= http://www.nuclearelephant.com/projects/dspam/sources/
6:
7: MAINTAINER= xtraeme@NetBSD.org
8: HOMEPAGE= http://www.nuclearelephant.com/projects/dspam/
1.9 snj 9: COMMENT= Extremely scalable, statistical-hybrid anti-spam filter
1.1 xtraeme 10:
1.18 xtraeme 11: GNU_CONFIGURE= yes
1.1 xtraeme 12: USE_LIBTOOL= yes
13:
1.4 jlam 14: USE_PERL5= yes
15: REPLACE_PERL= tools/dspam_genaliases.in \
16: tools/dspam_corpus.in \
1.15 adrianp 17: cgi/*.cgi cgi/configure.pl.in
1.1 xtraeme 18:
19: PKGCONFIG_OVERRIDE+= dspam.pc.in
20:
1.24 xtraeme 21: SUBST_CLASSES+= cgi cgi2
1.1 xtraeme 22: SUBST_STAGE.cgi= post-patch
1.24 xtraeme 23: SUBST_FILES.cgi= cgi/dspam.cgi cgi/admin.cgi \
24: cgi/templates/nav_performance.html \
25: cgi/configure.pl.in
26: SUBST_SED.cgi= -e "s|/usr/local/bin/dspam|${PREFIX}/bin/dspam|g" \
1.4 jlam 27: -e "s|/var/dspam|${DSPAM_HOME}|g" \
28: -e "s|/usr/local|${PREFIX}|g" \
1.15 adrianp 29: -e "s|-deaf|${DSPAM_PSFLAGS}|g" \
30: -e "s|yourdomain.com|${DSPAM_DOMAIN}|g"
1.11 xtraeme 31: SUBST_MESSAGE.cgi= "Fixing paths and default options."
1.24 xtraeme 32: SUBST_STAGE.cgi2= post-patch
33: SUBST_FILES.cgi2= cgi/dspam.cgi cgi/admin.cgi cgi/admingraph.cgi \
34: cgi/graph.cgi
35: SUBST_SED.cgi2= -e "s|./admins|${PKG_SYSCONFDIR}/cgi-admins|" \
36: -e "s|\$$FILE = \"./default.prefs\";|\$$FILE = \"${PKG_SYSCONFDIR}/cgi-default.prefs\";|" \
37: -e "s|configure.pl|${PKG_SYSCONFDIR}/configure.pl|"
1.1 xtraeme 38:
39: BUILD_DEFS+= DSPAM_HOME
40: BUILD_DEFS+= DSPAM_SIGNATURE_LIFE
41: BUILD_DEFS+= DSPAM_USER DSPAM_GROUP
42: BUILD_DEFS+= DSPAM_BINMODE
1.11 xtraeme 43: BUILD_DEFS+= DSPAM_LOGDIR
1.15 adrianp 44: BUILD_DEFS+= DSPAM_DOMAIN
1.24 xtraeme 45: BUILD_DEFS+= DSPAM_PIDDIR
1.1 xtraeme 46:
1.4 jlam 47: .include "../../mk/bsd.prefs.mk"
1.1 xtraeme 48:
49: DSPAM_HOME?= ${VARBASE}/dspam
1.4 jlam 50: DSPAM_SIGNATURE_LIFE?= 14
1.1 xtraeme 51:
52: DSPAM_BINMODE?= 4511
53: DSPAM_USER?= dspam
54: DSPAM_GROUP?= dspam
1.11 xtraeme 55: DSPAM_LOGDIR?= ${DSPAM_HOME}/log
1.15 adrianp 56: DSPAM_DOMAIN?= yourdomain.com
1.24 xtraeme 57: DSPAM_PIDDIR?= ${VARBASE}/run/dspam
1.1 xtraeme 58:
59: CONFIGURE_ARGS+= --with-signature-life=${DSPAM_SIGNATURE_LIFE}
1.8 jlam 60: CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME} \
61: --with-dspam-home-owner=${DSPAM_USER} \
1.1 xtraeme 62: --with-dspam-home-group=${DSPAM_GROUP} \
63: --with-dspam-owner=${DSPAM_USER} \
64: --with-dspam-group=${DSPAM_GROUP} \
1.11 xtraeme 65: --with-dspam-mode=${DSPAM_BINMODE} \
1.24 xtraeme 66: --with-logdir=${DSPAM_LOGDIR} \
1.28 xtraeme 67: --sysconfdir=${PKG_SYSCONFDIR}
1.1 xtraeme 68:
1.4 jlam 69: .include "options.mk"
70: .include "../../devel/pkgconfig/buildlink3.mk"
71: .include "../../mk/pthread.buildlink3.mk"
1.1 xtraeme 72:
1.4 jlam 73: DOCDIR= ${PREFIX}/share/doc/dspam
74: DATADIR= ${PREFIX}/share/dspam
1.11 xtraeme 75: EGDIR= ${PREFIX}/share/examples/dspam
1.1 xtraeme 76:
1.6 jlam 77: USE_PKGINSTALL= yes
1.24 xtraeme 78: RCD_SCRIPTS= dspam
79:
80: PKG_SYSCONFSUBDIR= dspam
81:
1.15 adrianp 82: CONF_FILES_PERMS= ${EGDIR}/dspam.conf ${PKG_SYSCONFDIR}/dspam.conf \
83: ${BINOWN} ${DSPAM_GROUP} 0640
1.24 xtraeme 84: CONF_FILES_PERMS+= ${EGDIR}/cgi-admins ${PKG_SYSCONFDIR}/cgi-admins \
1.29 xtraeme 85: ${APACHE_USER} ${APACHE_GROUP} 0640
1.24 xtraeme 86: CONF_FILES_PERMS+= ${EGDIR}/cgi-default.prefs \
1.29 xtraeme 87: ${PKG_SYSCONFDIR}/cgi-default.prefs \
88: ${APACHE_USER} ${APACHE_GROUP} 0640
1.24 xtraeme 89: CONF_FILES_PERMS+= ${EGDIR}/configure.pl ${PKG_SYSCONFDIR}/configure.pl \
1.29 xtraeme 90: ${APACHE_USER} ${APACHE_GROUP} 0640
1.11 xtraeme 91:
1.6 jlam 92: PKG_GROUPS= ${DSPAM_GROUP}
93: PKG_USERS= ${DSPAM_USER}:${DSPAM_GROUP}
94: SPECIAL_PERMS= ${PREFIX}/bin/dspam ${DSPAM_USER} ${DSPAM_GROUP} \
95: ${DSPAM_BINMODE}
1.29 xtraeme 96: OWN_DIRS_PERMS= ${DSPAM_HOME} ${DSPAM_USER} ${APACHE_GROUP} 0775
1.14 xtraeme 97: OWN_DIRS_PERMS+= ${DSPAM_LOGDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0775
1.24 xtraeme 98: OWN_DIRS_PERMS+= ${DSPAM_PIDDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0700
99:
100: FILES_SUBST+= DSPAM_USER=${DSPAM_USER}
101: FILES_SUBST+= DSPAM_GROUP=${DSPAM_GROUP}
102: FILES_SUBST+= DSPAM_PIDDIR=${DSPAM_PIDDIR}
1.6 jlam 103:
1.11 xtraeme 104: SUBST_CLASSES+= conf
105: SUBST_STAGE.conf= pre-install
1.24 xtraeme 106: SUBST_FILES.conf= src/dspam.conf.in
1.11 xtraeme 107: SUBST_SED.conf= -e "s,@dspam_home@,${DSPAM_HOME},g" \
108: -e "s,@delivery_agent@,${DSPAM_DELIVERY_AGENT_BIN},g"
109: SUBST_MESSAGE.conf= "Fixing configuration file."
110:
1.1 xtraeme 111: post-install:
1.4 jlam 112: ${INSTALL_DATA_DIR} ${DOCDIR}
1.24 xtraeme 113: ${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
1.4 jlam 114: ${INSTALL_DATA} ${WRKSRC}/RELEASE.NOTES ${DOCDIR}
1.24 xtraeme 115: ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DOCDIR}
1.4 jlam 116: ${INSTALL_DATA_DIR} ${DATADIR}
1.11 xtraeme 117: ${INSTALL_DATA_DIR} ${EGDIR}
1.24 xtraeme 118: ${INSTALL_DATA} ${WRKSRC}/src/dspam.conf.in ${EGDIR}/dspam.conf
119: ${INSTALL_DATA} ${WRKSRC}/cgi/admins ${EGDIR}/cgi-admins
120: ${INSTALL_DATA} ${WRKSRC}/cgi/default.prefs ${EGDIR}/cgi-default.prefs
121: ${INSTALL_DATA} ${WRKSRC}/cgi/configure.pl ${EGDIR}/configure.pl
122:
1.1 xtraeme 123: .for d in txt cgi
1.4 jlam 124: ${INSTALL_DATA_DIR} ${DATADIR}/${d}
125: cd ${WRKSRC}/${d} && ${PAX} -rwppm '-s|.*/Makefile.*$$||' \
1.24 xtraeme 126: '-s|./admins.*$$||' '-s|./default.prefs.*$$||' \
127: '-s|./configure.pl.*$$||' . ${DATADIR}/${d}
1.1 xtraeme 128: .endfor
129: .undef d
1.28 xtraeme 130: .for drv in mysql pgsql
1.11 xtraeme 131: . if !empty(DSPAM_STORAGE_DRIVER:M${drv})
132: ${INSTALL_DATA_DIR} ${DATADIR}/${drv}
1.24 xtraeme 133: cd ${WRKSRC}/src/tools.${drv}_drv && \
134: ${PAX} -rwppm '-s|.*/Makefile.*$$||' . ${DATADIR}/${drv}
1.11 xtraeme 135: . endif
136: .endfor
137: .undef drv
1.28 xtraeme 138: .if !empty(DSPAM_STORAGE_DRIVER:Msqlite*)
139: ${INSTALL_DATA_DIR} ${DATADIR}/sqlite
140: cd ${WRKSRC}/src/tools.sqlite_drv && \
141: ${PAX} -rwppm '-s|.*/Makefile.*$$||' . ${DATADIR}/sqlite
142: .endif
1.1 xtraeme 143:
144: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>