1 |
|
# $MidnightBSD$ |
2 |
|
|
3 |
|
PORTNAME= dcc-dccd |
4 |
< |
PORTVERSION= 1.3.158 |
4 |
> |
PORTVERSION= 1.3.159 |
5 |
|
CATEGORIES= mail |
6 |
|
MASTER_SITES= http://www.dcc-servers.net/dcc/source/old/ \ |
7 |
– |
http://www.rhyolite.com/anti-spam/dcc/source/old/ \ |
7 |
|
ftp://ftp.dcc-servers.net/src/dcc/old/ \ |
8 |
< |
ftp://ftp.rhyolite.com/src/dcc/old/ |
8 |
> |
FREEBSD_LOCAL/mat/${PORTNAME} |
9 |
|
DISTNAME= dcc-${PORTVERSION} |
11 |
– |
EXTRACT_SUFX= .tar.Z |
10 |
|
|
11 |
|
MAINTAINER= ports@MidnightBSD.org |
12 |
|
COMMENT= Distributed Checksum Clearinghouse bulk email detector |
13 |
|
|
14 |
+ |
.if ! defined(PACKAGE_BUILDING) |
15 |
|
LICENSE= DCC |
16 |
|
LICENSE_NAME= DCC |
17 |
|
LICENSE_FILE= ${WRKSRC}/LICENSE |
18 |
|
LICENSE_PERMS= no-pkg-sell no-dist-mirror no-pkg-mirror no-dist-sell |
19 |
+ |
.endif |
20 |
|
|
21 |
– |
USE_GCC= any |
22 |
– |
|
21 |
|
HAS_CONFIGURE= yes |
22 |
|
|
23 |
< |
# |
24 |
< |
# ALT_HOME - DCC keeps its config files in its home directory but writes |
25 |
< |
# status and database files there as well. This latter point |
28 |
< |
# means that the FreeBSD default home directory for DCC, |
29 |
< |
# /usr/local/dcc, cannot be mounted read-only. |
30 |
< |
# |
31 |
< |
# DCC's default home dir of /var/dcc breaks FreeBSD hierarchy |
32 |
< |
# conventions, but allows for a read-only /usr. |
33 |
< |
# |
34 |
< |
# Setting ALT_HOME on will set DCC's home to /var/dcc, but |
35 |
< |
# keep its binaries in /usr/local/dcc/libexec. Since this |
36 |
< |
# also means DCC's config files will be in /var/dcc, for |
37 |
< |
# convenience a soft link from /usr/local/etc/dcc to /var/dcc |
38 |
< |
# may be created. |
39 |
< |
# |
40 |
< |
# Note also that dccifd's default socket location is DCC's |
41 |
< |
# home, so if /var/dcc is used for the home, then programs |
42 |
< |
# like SpamAssassin may need to be explicitly told where |
43 |
< |
# to find dccifd's socket. |
44 |
< |
# |
45 |
< |
OPTIONS_SUB= yes |
46 |
< |
OPTIONS_DEFINE= DCCIFD DCCM DCCD DCCGREY IPV6 ALT_HOME PORTS_SENDMAIL |
23 |
> |
USES= tar:Z |
24 |
> |
|
25 |
> |
OPTIONS_DEFINE= DCCIFD DCCD DCCGREY IPV6 |
26 |
|
OPTIONS_DEFAULT= DCCIFD DCCM DCCD DCCGREY |
27 |
+ |
OPTIONS_GROUP= MILTER |
28 |
+ |
OPTIONS_GROUP_MILTER= DCCM PORTS_MILTER |
29 |
|
DCCIFD_DESC= DCC interface daemon (for SpamAssassin etc) |
30 |
< |
DCCM_DESC= DCC milter (for Sendmail only) |
30 |
> |
DCCM_DESC= DCC milter |
31 |
|
DCCD_DESC= DCC server |
32 |
|
DCCGREY_DESC= DCC greylisting server |
33 |
< |
ALT_HOME_DESC= DCC home in /var/dcc |
53 |
< |
PORTS_SENDMAIL_DESC= Use base Sendmail if off, ports if on |
33 |
> |
PORTS_MILTER_DESC= Use ports milter instead of base |
34 |
|
|
35 |
+ |
OPTIONS_SUB= yes |
36 |
+ |
|
37 |
|
## User for DCC files and SUID binaries |
38 |
|
# |
39 |
|
DCCUSER?= dcc |
42 |
|
USERS= ${DCCUSER} |
43 |
|
GROUPS= ${DCCGROUP} |
44 |
|
|
45 |
< |
PLIST_SUB+= DCCUSER="${DCCUSER}" |
45 |
> |
DCCHOME= ${PREFIX}/dcc |
46 |
|
|
47 |
+ |
PLIST_SUB+= DCCUSER="${DCCUSER}" DCCGROUP="${DCCGROUP}" |
48 |
+ |
SUB_FILES= pkg-install pkg-message |
49 |
+ |
SUB_LIST+= WRKSRC=${WRKSRC} DCCHOME=${DCCHOME} DCCUSER="${DCCUSER}" |
50 |
+ |
|
51 |
|
## Use the configure script to explicitly set the locations of all files, |
52 |
|
## in case the standard locations have been locally overridden |
53 |
< |
# |
54 |
< |
CONFIGURE_ARGS= --with-uid=${DCCUSER} --bindir=${PREFIX}/bin --mandir=${MANPREFIX}/man --with-configsuffix=.sample |
53 |
> |
## Also, use a similar hack to USES=desthack. |
54 |
> |
CONFIGURE_ARGS= -q \ |
55 |
> |
--with-uid=${DCCUSER} \ |
56 |
> |
--bindir=${PREFIX}/bin \ |
57 |
> |
--mandir=${FAKE_DESTDIR}${TRUE_PREFIX}/man \ |
58 |
> |
--with-installroot=\$${${DESTDIRNAME}} \ |
59 |
> |
--with-configsuffix=.sample \ |
60 |
> |
--with-make-cmd=${MAKE_CMD} \ |
61 |
> |
--with-install-cmd=${BSD_INSTALL_PROGRAM} \ |
62 |
> |
--enable-pkg-make \ |
63 |
> |
--homedir=${DCCHOME} \ |
64 |
> |
--libexecdir=${DCCHOME}/libexec \ |
65 |
> |
--with-cgibin=${DCCHOME}/cgi-bin |
66 |
|
|
67 |
< |
.include <bsd.mport.options.mk> |
67 |
> |
CONFIGURE_ENV= ac_cv_header_histedit_h=no # disable libedit detection |
68 |
|
|
69 |
< |
SUB_FILES= pkg-install pkg-message |
70 |
< |
SUB_LIST+= WRKSRC=${WRKSRC} DCCHOME=${DCCHOME} |
69 |
> |
DCCM_CONFIGURE_ENABLE= dccm |
70 |
> |
DCCM_USE= rc_subr=dccm |
71 |
> |
PORTS_MILTER_BUILD_DEPENDS= ${LOCALBASE}/lib/libmilter.a:mail/libmilter |
72 |
> |
PORTS_MILTER_CONFIGURE_ON= --with-sendmail=yes |
73 |
> |
DCCIFD_CONFIGURE_ENABLE= dccifd |
74 |
> |
DCCIFD_USE= rc_subr=dccifd |
75 |
> |
DCCD_CONFIGURE_ENABLE= server |
76 |
> |
IPV6_CONFIGURE_OFF= --disable-IPv6 |
77 |
> |
DCCD_USE= rc_subr=dccd |
78 |
> |
DCCGREY_USE= rc_subr=dccgrey |
79 |
|
|
80 |
< |
## /var/dcc home support |
76 |
< |
# |
77 |
< |
.if ${PORT_OPTIONS:MALT_HOME} |
78 |
< |
CONFIGURE_ARGS+= --libexecdir=${PREFIX}/dcc/libexec --with-cgibin=${PREFIX}/dcc/cgi-bin |
79 |
< |
DCCHOME= /var/dcc |
80 |
< |
PLIST_SUB+= WITH_ALT_HOME="" |
81 |
< |
.else |
82 |
< |
DCCHOME= ${PREFIX}/dcc |
83 |
< |
PLIST_SUB+= WITH_ALT_HOME="@comment " |
84 |
< |
.endif |
80 |
> |
.include <bsd.mport.options.mk> |
81 |
|
|
86 |
– |
CONFIGURE_ARGS+= --homedir=${DCCHOME} |
87 |
– |
|
82 |
|
## dccm milter support |
83 |
|
# |
84 |
< |
.if ${PORT_OPTIONS:MDCCM} |
91 |
< |
|
92 |
< |
.if !exists(/usr/lib/libmilter.a) && !exists(${LOCALBASE}/lib/libmilter.a) |
93 |
< |
IGNORE= neither base system nor Ports version of Sendmail installed, cannot build milter |
94 |
< |
.endif |
95 |
< |
.if ! ${PORT_OPTIONS:MPORTS_SENDMAIL} && !exists(/usr/lib/libmilter.a) |
96 |
< |
IGNORE= base system Sendmail not found or too old, rebuild with WITH_PORTS_SENDMAIL=yes or WITHOUT_DCCM=yes |
97 |
< |
.endif |
98 |
< |
.if ${PORT_OPTIONS:MPORTS_SENDMAIL} && !exists(${LOCALBASE}/lib/libmilter.a) |
99 |
< |
IGNORE= ports Sendmail not found, rebuild with WITHOUT_PORTS_SENDMAIL=yes or WITHOUT_DCCM=yes |
100 |
< |
.endif |
101 |
< |
|
102 |
< |
.if ! ${PORT_OPTIONS:MPORTS_SENDMAIL} |
103 |
< |
MILTERBASE= /usr |
104 |
< |
.else |
105 |
< |
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail |
84 |
> |
.if ${PORT_OPTIONS:MPORTS_MILTER} |
85 |
|
MILTERBASE?= ${LOCALBASE} |
107 |
– |
.endif |
86 |
|
|
87 |
|
MILTERINC= ${MILTERBASE}/include |
88 |
|
MILTERLIB= ${MILTERBASE}/lib |
90 |
|
CPPFLAGS+= -I${MILTERINC} |
91 |
|
CFLAGS+= -I${MILTERINC} |
92 |
|
LDFLAGS+= -L${MILTERLIB} |
115 |
– |
|
116 |
– |
CONFIGURE_ARGS+= --with-sendmail=yes |
117 |
– |
|
118 |
– |
PLIST_SUB+= WITH_DCCM="" |
119 |
– |
|
120 |
– |
USE_RC_SUBR+= dccm |
121 |
– |
|
122 |
– |
.else |
123 |
– |
CONFIGURE_ARGS+= --disable-dccm |
124 |
– |
PLIST_SUB+= WITH_DCCM="@comment " |
93 |
|
.endif |
94 |
|
|
95 |
< |
## dccifd client interface daemon support |
96 |
< |
# |
129 |
< |
.if ! ${PORT_OPTIONS:MDCCIFD} |
130 |
< |
CONFIGURE_ARGS+= --disable-dccifd |
131 |
< |
PLIST_SUB+= WITH_DCCIFD="@comment " |
95 |
> |
.if ${PORT_OPTIONS:MDCCIFD} || ${PORT_OPTIONS:MDCCM} |
96 |
> |
PLIST_SUB+= IFD_MILT="" |
97 |
|
.else |
98 |
< |
PLIST_SUB+= WITH_DCCIFD="" |
134 |
< |
USE_RC_SUBR+= dccifd |
98 |
> |
PLIST_SUB+= IFD_MILT="@comment " |
99 |
|
.endif |
100 |
|
|
101 |
< |
## dccd server support |
102 |
< |
# |
103 |
< |
.if ! ${PORT_OPTIONS:MDCCD} && ! ${PORT_OPTIONS:MDCCGREY} |
104 |
< |
CONFIGURE_ARGS+= --disable-server |
105 |
< |
PLIST_SUB+= WITH_DCCD="@comment " |
106 |
< |
.else |
107 |
< |
PLIST_SUB+= WITH_DCCD="" |
101 |
> |
post-install: |
102 |
> |
@${MV} ${STAGEDIR}${PREFIX}/dcc/cgi-bin/footer-dist \ |
103 |
> |
${STAGEDIR}${PREFIX}/dcc/cgi-bin/footer.sample |
104 |
> |
@${MV} ${STAGEDIR}${PREFIX}/dcc/cgi-bin/header-dist \ |
105 |
> |
${STAGEDIR}${PREFIX}/dcc/cgi-bin/header.sample |
106 |
> |
.for sf in bin/dccproc bin/cdcc dcc/libexec/dccsight dcc/libexec/check_ip_range \ |
107 |
> |
dcc/libexec/wlist dcc/libexec/ck2ip |
108 |
> |
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${sf} |
109 |
> |
.endfor |
110 |
> |
.if ${PORT_OPTIONS:MDCCIFD} || ${PORT_OPTIONS:MDCCM} |
111 |
> |
${STRIP_CMD} ${STAGEDIR}${PREFIX}/dcc/libexec/dns-helper |
112 |
|
.endif |
113 |
+ |
${REINPLACE_CMD} -e 's|${FAKE_DESTDIR}||g' ${PREFIX}/dcc/libexec/updatedcc |
114 |
|
|
115 |
< |
## IPV6 support |
116 |
< |
# |
117 |
< |
.if ! ${PORT_OPTIONS:MIPV6} |
118 |
< |
CONFIGURE_ARGS+= --disable-IPv6 |
150 |
< |
.endif |
115 |
> |
post-install-DCCIFD-on: |
116 |
> |
.for sf in bin/dccif-test dcc/libexec/dccifd |
117 |
> |
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${sf} |
118 |
> |
.endfor |
119 |
|
|
120 |
< |
## Packing list and rcNG script fixups |
121 |
< |
# |
122 |
< |
.if ! ${PORT_OPTIONS:MDCCIFD} && ! ${PORT_OPTIONS:MDCCM} |
123 |
< |
PLIST_SUB+= WITH_IFD_MILT="@comment " |
124 |
< |
.else |
157 |
< |
PLIST_SUB+= WITH_IFD_MILT="" |
158 |
< |
.endif |
120 |
> |
post-install-DCCD-on: |
121 |
> |
.for sf in dcc/libexec/dump-clients dcc/libexec/dbclean \ |
122 |
> |
dcc/libexec/dblist dcc/libexec/dccd |
123 |
> |
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${sf} |
124 |
> |
.endfor |
125 |
|
|
126 |
< |
.if ${PORT_OPTIONS:MDCCD} |
127 |
< |
USE_RC_SUBR+= dccd |
162 |
< |
.endif |
163 |
< |
|
164 |
< |
.if ${PORT_OPTIONS:MDCCGREY} |
165 |
< |
USE_RC_SUBR+= dccgrey |
166 |
< |
PLIST_SUB+= WITH_DCCGREY="" |
167 |
< |
.else |
168 |
< |
PLIST_SUB+= WITH_DCCGREY="@comment " |
169 |
< |
.endif |
170 |
< |
|
171 |
< |
pre-everything:: |
172 |
< |
@${ECHO_MSG} ' ' |
173 |
< |
@${ECHO_MSG} "A description of ALT_HOME may be found in the port's Makefile." |
174 |
< |
@${ECHO_MSG} ' ' |
175 |
< |
|
176 |
< |
pre-build: |
177 |
< |
${MKDIR} ${FAKE_DESTDIR}/usr/lib |
178 |
< |
${LN} -sf /usr/lib/libc.a ${FAKE_DESTDIR}/usr/lib/libc.a |
179 |
< |
|
180 |
< |
pre-fake: |
181 |
< |
${MKDIR} ${FAKE_DESTDIR}${TRUE_PREFIX}/dcc/libexec |
182 |
< |
|
183 |
< |
post-install: |
184 |
< |
|
185 |
< |
## Make certain DCC's config files are owned by DCC's user |
186 |
< |
# |
187 |
< |
@${CHOWN} ${DCCUSER} ${DCCHOME}/* |
126 |
> |
post-install-DCCM-on: |
127 |
> |
${STRIP_CMD} ${STAGEDIR}${PREFIX}/dcc/libexec/dccm |
128 |
|
|
129 |
|
.include <bsd.port.mk> |