View | Details | Raw Unified | Return to bug 205957
Collapse All | Expand All

(-)Makefile (-83 / +40 lines)
Lines 24-47 Link Here
24
PLIST=		${WRKDIR}/.PLIST.${PKGNAME}
24
PLIST=		${WRKDIR}/.PLIST.${PKGNAME}
25
SUB_FILES=	pkg-install
25
SUB_FILES=	pkg-install
26
26
27
PLIST_DIRS=	www/cgi-bin/openwebmail/etc/addressbooks \
28
		www/cgi-bin/openwebmail/etc/sessions \
29
		www/cgi-bin/openwebmail/etc/users \
30
		www/data/openwebmail/help/zh_CN.GB2312/images/_notes \
31
		www/data/openwebmail/help/zh_CN.GB2312/templates_and_data/_notes
32
27
OPTIONS_DEFINE=	ANTIWORD MAGICK ISPELL LEARNSPAM LSOF PAM POP3_OVER_SSL QUOTA \
33
OPTIONS_DEFINE=	ANTIWORD MAGICK ISPELL LEARNSPAM LSOF PAM POP3_OVER_SSL QUOTA \
28
		SPAMCHECK SPAMCHECK_ALL SPEEDYCGI TNEF VIRUSCHECK VIRUSCHECK_ALL \
34
		SPAMCHECK SPAMCHECK_ALL SPEEDYCGI TNEF VIRUSCHECK VIRUSCHECK_ALL \
29
		WGET
35
		WGET
30
36
31
ANTIWORD_DESC=	AntiWord
37
ANTIWORD_DESC=	AntiWord
38
ANTIWORD_RUN_DEPENDS=	antiword:${PORTSDIR}/textproc/antiword
32
ISPELL_DESC=	ISpell
39
ISPELL_DESC=	ISpell
40
ISPELL_RUN_DEPENDS=	ispell:${PORTSDIR}/textproc/aspell-ispell
33
LEARNSPAM_DESC=	Learn HAM/SPAM
41
LEARNSPAM_DESC=	Learn HAM/SPAM
42
LEARNSPAM_IMPLIES=	SPAMCHECK
34
LSOF_DESC=	lsof
43
LSOF_DESC=	lsof
44
LSOF_RUN_DEPENDS=	${LOCALBASE}/sbin/lsof:${PORTSDIR}/sysutils/lsof
45
MAGICK_RUN_DEPENDS=	convert:${PORTSDIR}/graphics/ImageMagick
35
PAM_DESC=	PAM
46
PAM_DESC=	PAM
47
PAM_RUN_DEPENDS=	p5-Authen-PAM>=0:${PORTSDIR}/security/p5-Authen-PAM
36
POP3_OVER_SSL_DESC=	POP3 Over SSL
48
POP3_OVER_SSL_DESC=	POP3 Over SSL
49
POP3_OVER_SSL_RUN_DEPENDS=	p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL
37
QUOTA_DESC=	Quota
50
QUOTA_DESC=	Quota
51
QUOTA_RUN_DEPENDS=	p5-Quota>=0:${PORTSDIR}/sysutils/p5-Quota
38
SPAMCHECK_DESC=	Spam check (Mail::SpamAssassin)
52
SPAMCHECK_DESC=	Spam check (Mail::SpamAssassin)
53
SPAMCHECK_RUN_DEPENDS=	spamassassin>=0:${PORTSDIR}/mail/spamassassin
39
SPAMCHECK_ALL_DESC=	Spam check for all (default: pop3)
54
SPAMCHECK_ALL_DESC=	Spam check for all (default: pop3)
55
SPAMCHECK_ALL_IMPLIES=	SPAMCHECK
40
SPEEDYCGI_DESC=	SpeedyCGI
56
SPEEDYCGI_DESC=	SpeedyCGI
57
SPEEDYCGI_RUN_DEPENDS=	speedy_suidperl:${PORTSDIR}/www/p5-CGI-SpeedyCGI
58
SPEEDYCGI_SUB_LIST=	WITHOUT_SPEEDYCGI="@comment "
59
SPEEDYCGI_SUB_LIST_OFF=	WITHOUT_SPEEDYCGI=""
60
SPEEDYCGI_EXTRA_PATCHES=	${PATCH_WRKSRC}/misc/patches/suidperl2speedy_suidperl.notmp.patch
41
TNEF_DESC=	tnef
61
TNEF_DESC=	tnef
62
TNEF_RUN_DEPENDS=	${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef
42
VIRUSCHECK_DESC=	Virus check (Clam AntiVirus)
63
VIRUSCHECK_DESC=	Virus check (Clam AntiVirus)
64
VIRUSCHECK_RUN_DEPENDS=	clamdscan:${PORTSDIR}/security/clamav
43
VIRUSCHECK_ALL_DESC=	Virus check for all (default: pop3)
65
VIRUSCHECK_ALL_DESC=	Virus check for all (default: pop3)
66
VIRUSCHECK_ALL_IMPLIES=	VIRUSCHECK
44
WGET_DESC=	wget
67
WGET_DESC=	wget
68
WGET_RUN_DEPENDS=	${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget
45
69
46
.include <bsd.port.pre.mk>
70
.include <bsd.port.pre.mk>
47
71
Lines 58-123 Link Here
58
.endif # exists(${PERL})
82
.endif # exists(${PERL})
59
.endif # SPEEDYCGI
83
.endif # SPEEDYCGI
60
84
61
.if ${PORT_OPTIONS:MLEARNSPAM} || !empty(PORT_OPTIONS:MSPAMCHECK_ALL)
62
PORT_OPTIONS+=	SPAMCHECK
63
.endif
64
65
.if ${PORT_OPTIONS:MVIRUSCHECK_ALL}
66
PORT_OPTIONS+=	VIRUSCHECK
67
.endif
68
69
.if ${PORT_OPTIONS:MANTIWORD}
70
RUN_DEPENDS+=	antiword:${PORTSDIR}/textproc/antiword
71
.endif
72
73
.if ${PORT_OPTIONS:MMAGICK}
74
RUN_DEPENDS+=	convert:${PORTSDIR}/graphics/ImageMagick
75
.endif
76
77
.if ${PORT_OPTIONS:MISPELL}
78
RUN_DEPENDS+=	ispell:${PORTSDIR}/textproc/aspell-ispell
79
.endif
80
81
.if ${PORT_OPTIONS:MLSOF}
82
RUN_DEPENDS+	${LOCALBASE}/sbin/lsof:${PORTSDIR}/sysutils/lsof
83
.endif
84
85
.if ${PORT_OPTIONS:MPAM}
86
RUN_DEPENDS+=	p5-Authen-PAM>=0:${PORTSDIR}/security/p5-Authen-PAM
87
.endif
88
89
.if ${PORT_OPTIONS:MPOP3_OVER_SSL}
90
RUN_DEPENDS+=	p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL
91
.endif
92
93
.if ${PORT_OPTIONS:MQUOTA}
94
RUN_DEPENDS+=	p5-Quota>=0:${PORTSDIR}/sysutils/p5-Quota
95
.endif
96
97
.if ${PORT_OPTIONS:MTNEF}
98
RUN_DEPENDS+=	${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef
99
.endif
100
101
.if ${PORT_OPTIONS:MSPAMCHECK}
102
RUN_DEPENDS+=	spamassassin>=0:${PORTSDIR}/mail/spamassassin
103
.endif
104
105
.if ${PORT_OPTIONS:MSPEEDYCGI}
106
RUN_DEPENDS+=	speedy_suidperl:${PORTSDIR}/www/p5-CGI-SpeedyCGI
107
SUB_LIST+=	WITHOUT_SPEEDYCGI="@comment "
108
EXTRA_PATCHES+=	${PATCH_WRKSRC}/misc/patches/suidperl2speedy_suidperl.notmp.patch
109
.else
110
SUB_LIST+=	WITHOUT_SPEEDYCGI=""
111
.endif
112
113
.if ${PORT_OPTIONS:MVIRUSCHECK}
114
RUN_DEPENDS+=	clamdscan:${PORTSDIR}/security/clamav
115
.endif
116
117
.if ${PORT_OPTIONS:MWGET}
118
RUN_DEPENDS+=	${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget
119
.endif
120
121
post-extract:
85
post-extract:
122
.for x in addressbooks/global calendar.book
86
.for x in addressbooks/global calendar.book
123
	@${RM} ${WRKSRC}/cgi-bin/openwebmail/etc/${x}
87
	@${RM} ${WRKSRC}/cgi-bin/openwebmail/etc/${x}
Lines 138-164 Link Here
138
	@${MV} ${PATCH_WRKSRC}/etc/openwebmail.conf ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
102
	@${MV} ${PATCH_WRKSRC}/etc/openwebmail.conf ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
139
	@${PERL} -pi.bak -e 's,${LOCALBASE}/www/cgi-bin/openwebmail,${OWCGIDIR},g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
103
	@${PERL} -pi.bak -e 's,${LOCALBASE}/www/cgi-bin/openwebmail,${OWCGIDIR},g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
140
	@${PERL} -pi.bak -e 's,${LOCALBASE}/www/data/openwebmail,${OWDATADIR},g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
104
	@${PERL} -pi.bak -e 's,${LOCALBASE}/www/data/openwebmail,${OWDATADIR},g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
141
.if ${PORT_OPTIONS:MLEARNSPAM}
105
106
post-patch-LEARNSPAM-on:
142
	@${PERL} -pi.bak -e 's,enable_learnspam	no,enable_learnspam	yes,g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
107
	@${PERL} -pi.bak -e 's,enable_learnspam	no,enable_learnspam	yes,g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
143
.endif
108
144
.if ${PORT_OPTIONS:MSPAMCHECK}
109
post-patch-SPAMCHECK-on:
145
	@${PERL} -pi.bak -e 's,enable_spamcheck	no,enable_spamcheck	yes,g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
110
	@${PERL} -pi.bak -e 's,enable_spamcheck	no,enable_spamcheck	yes,g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
146
	@${ECHO} "enable_saprefs	yes" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
111
	@${ECHO} "enable_saprefs	yes" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
147
.endif
112
148
.if ${PORT_OPTIONS:MSPAMCHECK_ALL}
113
post-patch-SPAMCHECK_ALL-on:
149
	@${ECHO} "spamcheck_source_allowed	all" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
114
	@${ECHO} "spamcheck_source_allowed	all" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
150
.endif
115
151
.if ${PORT_OPTIONS:MVIRUSCHECK}
116
post-patch-VIRUSCHECK-on:
152
	@${PERL} -pi.bak -e 's,enable_viruscheck	no,enable_viruscheck	yes,g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
117
	@${PERL} -pi.bak -e 's,enable_viruscheck	no,enable_viruscheck	yes,g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
153
.endif
118
154
.if ${PORT_OPTIONS:MVIRUSCHECK_ALL}
119
post-patch-VIRUSCHECK_ALL-on:
155
	@${ECHO} "viruscheck_source_allowed	all" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
120
	@${ECHO} "viruscheck_source_allowed	all" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
156
.endif
121
157
.if ${PORT_OPTIONS:MSPEEDYCGI}
122
post-patch-SPEEDYCGI-on:
158
	@${ECHO} "has_savedsuid_support	no" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
123
	@${ECHO} "has_savedsuid_support	no" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample
159
.else
124
125
post-patch-SPEEDYCGI-off:
160
	@${PERL} -pi.bak -e 's,/usr/bin/suidperl,${PERL},g' ${PATCH_WRKSRC}/openwebmail*pl
126
	@${PERL} -pi.bak -e 's,/usr/bin/suidperl,${PERL},g' ${PATCH_WRKSRC}/openwebmail*pl
161
.endif
162
127
163
pre-install:
128
pre-install:
164
	@: > ${PLIST}
129
	@: > ${PLIST}
Lines 171-190 Link Here
171
	@${PRINTF} "%s\n%s\n" "@owner" "@group" >> ${PLIST}
136
	@${PRINTF} "%s\n%s\n" "@owner" "@group" >> ${PLIST}
172
	@${FIND} ${WRKSRC}/data/openwebmail \( -type f -o -type l \) -and -not -name openwebmail.conf.sample | \
137
	@${FIND} ${WRKSRC}/data/openwebmail \( -type f -o -type l \) -and -not -name openwebmail.conf.sample | \
173
		${SED} -e 's,^${WRKSRC},www,' | ${SORT} -u >> ${PLIST}
138
		${SED} -e 's,^${WRKSRC},www,' | ${SORT} -u >> ${PLIST}
174
.if empty(PORT_OPTIONS:MSPEEDYCGI)
139
140
pre-install-SPEEDYCGI-off:
175
	@${FIND} ${WRKSRC}/*/openwebmail -name "openwebmail*pl" | \
141
	@${FIND} ${WRKSRC}/*/openwebmail -name "openwebmail*pl" | \
176
		${SED} -e 's,^${WRKSRC},www,' \
142
		${SED} -e 's,^${WRKSRC},www,' \
177
		-e 's,openwebmail/openwebmail,openwebmail/.openwebmail,g' \
143
		-e 's,openwebmail/openwebmail,openwebmail/.openwebmail,g' \
178
		>> ${TMPPLIST}
144
		>> ${TMPPLIST}
179
.endif
180
	@${FIND} ${WRKSRC}/*/openwebmail -type d | ${SORT} -ur | \
181
		${GREP} -v UTF-8 | \
182
		${SED} -e 's,^${WRKSRC},@dirrm www,' >> ${PLIST}
183
	@${FIND} ${WRKSRC}/*/openwebmail -type d | ${SORT} -ur | \
184
		${GREP} UTF-8 | \
185
		${SED} -e 's,^${WRKSRC},@dirrmtry www,' >> ${PLIST}
186
	@${ECHO_CMD} "@dirrmtry www/cgi-bin" >> ${PLIST}
187
	@${ECHO_CMD} "@dirrmtry www/data" >> ${PLIST}
188
145
189
do-install:
146
do-install:
190
	@${MKDIR} ${STAGEDIR}${OWCGIDIR} ${STAGEDIR}${OWDATADIR}
147
	@${MKDIR} ${STAGEDIR}${OWCGIDIR} ${STAGEDIR}${OWDATADIR}

Return to bug 205957