Annotation of pkgsrc/mail/dspam/Makefile, Revision 1.3
1.3 ! recht 1: # $NetBSD: Makefile,v 1.2 2004/07/07 15:18:34 recht Exp $
1.1 xtraeme 2: #
3:
4: DISTNAME= dspam-3.0.0
1.2 recht 5: PKGREVISION= 1
1.1 xtraeme 6: CATEGORIES= mail
7: MASTER_SITES= http://www.nuclearelephant.com/projects/dspam/sources/
8:
9: MAINTAINER= xtraeme@NetBSD.org
10: HOMEPAGE= http://www.nuclearelephant.com/projects/dspam/
11: COMMENT= Extremely scalable and statistical hybrid anti-spam filter
12:
13: USE_BUILDLINK3= yes
14: USE_LIBTOOL= yes
15: USE_PKGINSTALL= yes
16: GNU_CONFIGURE= yes
17:
18: REPLACE_PERL= tools/dspam_genaliases.in \
19: tools/dspam_corpus.in \
20: cgi/admin.cgi cgi/admingraph.cgi \
21: cgi/dspam.cgi cgi/graph.cgi
22:
23: PKGCONFIG_OVERRIDE+= dspam.pc.in
24:
25: SUBST_CLASSES= cgi large
26: SUBST_STAGE.cgi= post-patch
27: SUBST_FILES.cgi= cgi/dspam.cgi cgi/admin.cgi
28: SUBST_SED.cgi= -e "s|/usr/local/bin/dspam|${PREFIX}/bin/dspam|g" \
29: -e "s|/var/dspam|${DSPAM_HOME}|g" \
30: -e "s|/usr/local|${PREFIX}|g" \
31: -e "s|LARGE_SCLAE|LARGE_SCALE|g" \
32: -e "s|-deaf|${DSPAM_PSFLAGS}|g"
33: SUBST_MESSAGE.cgi= "Fixing paths and typos."
34:
35: BDB_ACCEPTED= db4 db3
36:
37: BUILD_DEFS+= DSPAM_DELIVERY_AGENT
38: BUILD_DEFS+= DSPAM_HOME
39: BUILD_DEFS+= DSPAM_STORAGE_DRIVER
40: BUILD_DEFS+= DSPAM_SIGNATURE_LIFE
41: BUILD_DEFS+= DSPAM_SIGNATURE_ATTACHMENTS
42: BUILD_DEFS+= DSPAM_SIGNATURE_HEADERS
43: BUILD_DEFS+= DSPAM_LARGESCALE
44: BUILD_DEFS+= DSPAM_VIRTUAL_USERS
45: BUILD_DEFS+= DSPAM_USE_WEBMAIL
46: BUILD_DEFS+= DSPAM_HOMEDIR_DOTFILES
47: BUILD_DEFS+= DSPAM_USER DSPAM_GROUP
48: BUILD_DEFS+= DSPAM_BINMODE
49: BUILD_DEFS+= DSPAM_CGI_GRAPHS
50: BUILD_DEFS+= DSPAM_PSFLAGS
51:
52: DSPAM_DELIVERY_AGENT?= procmail
53: DSPAM_DELIVERY_AGENT_ARGS?= # empty
54:
55: DSPAM_HOME?= ${VARBASE}/dspam
56: DSPAM_STORAGE_DRIVER?= ${BDB_TYPE}
57: DSPAM_SIGNATURE_LIFE?= 15
58:
59: DSPAM_PSFLAGS?= aux
60:
61: DSPAM_BINMODE?= 4511
62: DSPAM_USER?= dspam
63: DSPAM_GROUP?= dspam
64: PKG_GROUPS= ${DSPAM_GROUP}
1.2 recht 65: PKG_USERS= ${DSPAM_USER}:${DSPAM_GROUP}
1.1 xtraeme 66:
67: # Default options
68: CONFIGURE_ARGS+= --enable-chi-square
69: CONFIGURE_ARGS+= --enable-robinson-pvalues
70: CONFIGURE_ARGS+= --with-signature-life=${DSPAM_SIGNATURE_LIFE}
71: CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME}
72: CONFIGURE_ARGS+= --with-dspam-home-owner=${DSPAM_USER} \
73: --with-dspam-home-group=${DSPAM_GROUP} \
74: --with-dspam-owner=${DSPAM_USER} \
75: --with-dspam-group=${DSPAM_GROUP} \
76: --with-dspam-mode=${DSPAM_BINMODE}
77:
78: .include "../../mk/bsd.prefs.mk"
79:
80: #
81: # Possible: procmail, maildrop or custom
82: # Default: procmail
83: #
84: .if !empty(DSPAM_DELIVERY_AGENT:Mprocmail)
85: BUILD_DEPENDS+= procmail-[0-9]*:../../mail/procmail
86: CONFIGURE_ARGS+= --with-delivery-agent="${LOCALBASE}/bin/procmail"
87: .elif !empty(DSPAM_DELIVERY_AGENT:Mmaildrop)
88: BUILD_DEPENDS+= maildrop-[0-9]*:../../mail/maildrop
89: CONFIGURE_ARGS+= --with-delivery-agent="${LOCALBASE}/bin/maildrop"
90: .elif !empty(DSPAM_DELIVERY_AGENT:Mcustom)
91: BUILD_DEFS+= DSPAM_DELIVERY_AGENT_ARGS
92: CONFIGURE_ARGS+= --with-delivery-agent=${DSPAM_DELIVERY_AGENT_ARGS:Q}
93: .endif
94:
95: #
96: # Possible: mysql, pgsql, db3 or db4
97: # Default: db3/db4
98: #
99: .if !empty(DSPAM_STORAGE_DRIVER:Mmysql)
100: BUILD_DEFS+= DSPAM_CLIENT_COMPRESSION
101: . if defined(DSPAM_CLIENT_COMPRESSION) && \
102: !empty(DSPAM_CLIENT_COMPRESSION:M[Yy][Ee][Ss])
103: CONFIGURE_ARGS+= --enable-client-compression
104: . endif
105: . include "../../databases/mysql4-client/buildlink3.mk"
106: CONFIGURE_ARGS+= --with-storage-driver=mysql_drv
107: CONFIGURE_ARGS+= \
108: --with-mysql-includes=${BUILDLINK_PREFIX.mysql-client}/include/mysql
109: CONFIGURE_ARGS+= \
110: --with-mysql-libraries=${BUILDLINK_PREFIX.mysql-client}/lib
111: .elif !empty(DSPAM_STORAGE_DRIVER:Mpgsql)
1.3 ! recht 112: . include "../../mk/pgsql.buildlink3.mk"
1.1 xtraeme 113: CONFIGURE_ARGS+= --with-storage-driver=pgsql_drv
114: CONFIGURE_ARGS+= \
1.3 ! recht 115: --with-pgsql-includes=${PGSQL_PREFIX}/include/postgresql
1.1 xtraeme 116: CONFIGURE_ARGS+= \
1.3 ! recht 117: --with-pgsql-libraries=${PGSQL_PREFIX}/lib
1.1 xtraeme 118: .elif !empty(DSPAM_STORAGE_DRIVER:M${BDB_TYPE})
119: CONFIGURE_ARGS+= --with-storage-driver=lib${BDB_TYPE}_drv
120: .endif
121:
122: #
123: # Use of home directory dot file for opt-in/opt-out
124: #
125: .if defined(DSPAM_HOMEDIR_DOTFILES) && \
126: !empty(DSPAM_HOMEDIR_DOTFILES:M[Yy][Ee][Ss])
127: CONFIGURE_ARGS+= --enable-homedir-dotfiles
128: .endif
129:
130: .if defined(DSPAM_USE_WEBMAIL) && \
131: !empty(DSPAM_USE_WEBMAIL:M[Yy][Ee][Ss])
132: CONFIGURE_ARGS+= --enable-webmail
133: .endif
134:
135: .if defined(DSPAM_SIGNATURE_ATTACHMENTS) && \
136: !empty(DSPAM_SIGNATURE_ATTACHMENTS:M[Yy][Ee][Ss])
137: CONFIGURE_ARGS+= --enable-signature-attachments
138: .endif
139:
140: .if defined(DSPAM_SIGNATURE_HEADERS) && \
141: !empty(DSPAM_SIGNATURE_HEADERS:M[Yy][Ee][Ss])
142: CONFIGURE_ARGS+= --enable-signature-headers
143: .endif
144:
145: .if defined(DSPAM_LARGESCALE) && !empty(DSPAM_LARGESCALE:M[Yy][Ee][Ss])
146: CONFIGURE_ARGS+= --enable-large-scale
147: SUBST_STAGE.large= post-patch
148: SUBST_FILES.large= cgi/dspam.cgi cgi/admin.cgi
149: SUBST_SED.large= \
150: -e "s|CONFIG{'LARGE_SCALE'}.*=.*0|CONFIG{'LARGE_SCALE'} = 1|"
151: SUBST_MESSAGE.large= "Fixing config options."
152: .endif
153:
154: .if defined(DSPAM_VIRTUAL_USERS) && !empty(DSPAM_VIRTUAL_USERS:M[Yy][Ee][Ss])
155: CONFIGURE_ARGS+= --enable-virtual-users
156: .endif
157:
158: .if defined(DSPAM_CGI_GRAPHS) && !empty(DSPAM_CGI_GRAPHS:M[Yy][Ee][Ss])
159: DEPENDS+= p5-GDGraph3d-[0-9]*:../../graphics/p5-GDGraph3d
160: .endif
161:
162: .if ${OPSYS} == "Linux"
163: DSPAM_PSFLAGS?= -deaf
164: .endif
165:
166: INSTALLATION_DIRS= share/doc/${PKGBASE} \
167: share/${PKGBASE}/txt share/${PKGBASE}/cgi \
168: share/${PKGBASE}/mysql share/${PKGBASE}/pgsql
169:
170: post-install:
171: .for d in txt cgi
172: cd ${WRKSRC}/${d} && ${PAX} -rwppm '-s|.*/Makefile.*$$||' \
173: . ${PREFIX}/share/${PKGBASE}/${d}
174: .endfor
175: .undef d
176: ${INSTALL_DATA} ${WRKSRC}/RE* ${PREFIX}/share/doc/${PKGBASE}
177: .for d in mysql pgsql
178: cd ${WRKSRC}/tools.${d}_drv && ${PAX} -rwppm '-s|.*/Makefile.*$$||' \
179: . ${PREFIX}/share/${PKGBASE}/${d}
180: .endfor
181: .undef d
182:
183: .include "../../devel/pkgconfig/buildlink3.mk"
184: .include "../../mk/bdb.buildlink3.mk"
185: .include "../../mk/pthread.buildlink3.mk"
186: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>