blob: 6eb31778d3605ce646291c503383e493772b52ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# $NetBSD: Makefile,v 1.7 2015/06/05 13:43:20 gdt Exp $
DISTNAME= dcc-1.3.158
CATEGORIES= mail
MASTER_SITES= http://www.rhyolite.com/dcc/source/old/
EXTRACT_SUFX= .tar.Z
OWNER= petar@smokva.net
HOMEPAGE= http://www.rhyolite.com/dcc/
COMMENT= Anti-spam content filter
LICENSE= dcc-free-license
.include "../../mk/bsd.prefs.mk"
DCC_USER?= dcc
DCC_GROUP?= dcc
DCC_HOME?= ${VARBASE}/dcc
DCC_RUN?= ${VARBASE}/run/dcc
# dcc already implements $DESTDIR as $installroot but also prepends
# $installroot to $BINDIR, which bsd.prog.mk subsequently extends to
# $DESTDIR/$BINDIR, effectively doubling the $DESTDIR prefix. The
# following bit of make dances around the issue and avoids adding
# $DESTDIR when evaluated within a bsd.prog.mk target.
DCC_DESTDIR= $${"$${@:Mproginstall-*}"=="":?$${DESTDIR}:}
# expanded in files/dcc*.sh
FILES_SUBST+= DCC_HOME=${DCC_HOME}
FILES_SUBST+= DCC_EGDIR=${DCC_EGDIR}
FILES_SUBST+= DCC_RC=${PREFIX}/libexec/rcDCC
FILES_SUBST+= DCC_FIXMAP=${PREFIX}/libexec/fix-map
# enabling/disabling daemons is done in rc.conf
SUBST_CLASSES+= dae
SUBST_STAGE.dae= post-patch
SUBST_FILES.dae= homedir/dcc_conf.in
SUBST_SED.dae= -e 's/^\(DCCD_ENABLE=\).*$$/\1on/'
SUBST_SED.dae+= -e 's/^\(GREY_ENABLE=\).*$$/\1on/'
SUBST_SED.dae+= -e 's/^\(DCCM_ENABLE=\).*$$/\1on/'
SUBST_SED.dae+= -e 's/^\(DCCIFD_ENABLE=\).*$$/\1on/'
SUBST_MESSAGE.dae= Enabling all daemons in dcc_conf
HAS_CONFIGURE= yes
USE_TOOLS+= perl:run
USE_TOOLS+= xargs:run
CONFIGURE_ENV+= PERL=${TOOLS_PATH.perl:Q}
CONFIGURE_ENV+= DCC_XARGS=${TOOLS_PATH.xargs:Q}
CONFIGURE_ARGS+= --homedir=${DCC_HOME}
CONFIGURE_ARGS+= --bindir=${PREFIX}/bin
CONFIGURE_ARGS+= --libexecdir=${PREFIX}/libexec
CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
CONFIGURE_ARGS+= --with-cgi-bin=${DCC_EGDIR}/cgi-bin
CONFIGURE_ARGS+= --with-rundir=${DCC_RUN}
CONFIGURE_ARGS+= --with-uid=${DCC_USER}
CONFIGURE_ARGS+= --with-make-cmd=${MAKE_PROGRAM:Q}
CONFIGURE_ARGS+= --with-installroot=\$$\(DCC_DESTDIR\)
CONFIGURE_ARGS+= --disable-sys-inst
CONFIGURE_ARGS+= --disable-dccm
USE_BSD_MAKEFILE= yes
MAKE_JOBS_SAFE= no
# PKGSRC_DCC_EGDIR is for homedir/Makefile
MAKE_ENV+= PKGSRC_DCC_EGDIR=${DCC_EGDIR}
MAKE_ENV+= DCC_DESTDIR=${DCC_DESTDIR:Q}
MAKE_ENV+= NO_SUID=yes
BUILD_DEFS+= VARBASE
INSTALLATION_DIRS+= bin
INSTALLATION_DIRS+= libexec
INSTALLATION_DIRS+= ${PKGMANDIR}/man8
PKG_GROUPS= ${DCC_GROUP}
PKG_USERS= ${DCC_USER}:${DCC_GROUP}
OWN_DIRS_PERMS+= ${DCC_HOME} ${DCC_USER} ${DCC_GROUP} 0755
OWN_DIRS_PERMS+= ${DCC_HOME}/log ${DCC_USER} ${DCC_GROUP} 0710
DCC_EGDIR= ${PREFIX}/share/examples/dcc
DCC_PERMS_CONFIG= ${DCC_USER} ${DCC_GROUP} 0600
CONF_FILES_PERMS+= ${DCC_EGDIR}/dcc_conf ${DCC_HOME}/dcc_conf ${DCC_PERMS_CONFIG}
CONF_FILES_PERMS+= ${DCC_EGDIR}/flod ${DCC_HOME}/flod ${DCC_PERMS_CONFIG}
CONF_FILES_PERMS+= ${DCC_EGDIR}/grey_flod ${DCC_HOME}/grey_flod ${DCC_PERMS_CONFIG}
CONF_FILES_PERMS+= ${DCC_EGDIR}/grey_whitelist ${DCC_HOME}/grey_whitelist ${DCC_PERMS_CONFIG}
CONF_FILES_PERMS+= ${DCC_EGDIR}/whiteclnt ${DCC_HOME}/whiteclnt ${DCC_PERMS_CONFIG}
CONF_FILES_PERMS+= ${DCC_EGDIR}/whitecommon ${DCC_HOME}/whitecommon ${DCC_PERMS_CONFIG}
CONF_FILES_PERMS+= ${DCC_EGDIR}/whitelist ${DCC_HOME}/whitelist ${DCC_PERMS_CONFIG}
RCD_SCRIPTS+= dccd dccifd
DCC_PERMS_SETUID= ${DCC_USER} ${REAL_ROOT_GROUP} 4555
SPECIAL_PERMS+= bin/cdcc ${DCC_PERMS_SETUID}
SPECIAL_PERMS+= bin/dccproc ${DCC_PERMS_SETUID}
SPECIAL_PERMS+= libexec/dccsight ${DCC_PERMS_SETUID}
.include "../../mk/bsd.pkg.mk"
|