summaryrefslogtreecommitdiff
path: root/mail/openwebmail/Makefile
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2003-03-29 19:08:43 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2003-03-29 19:08:43 +0000
commitf57251d375ab99dc710170c1c63f7fe0d75b215e (patch)
treeb605872b480218c806020d65218afcf7b755f79a /mail/openwebmail/Makefile
parentReplace portepoch line. Sorry for the trouble (diff)
update to openwebmail-2.00, and add some optional supports.
Diffstat (limited to 'mail/openwebmail/Makefile')
-rw-r--r--mail/openwebmail/Makefile88
1 files changed, 65 insertions, 23 deletions
diff --git a/mail/openwebmail/Makefile b/mail/openwebmail/Makefile
index cf6c89d7419a..f60806ecea3d 100644
--- a/mail/openwebmail/Makefile
+++ b/mail/openwebmail/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= openwebmail
-PORTVERSION= 1.90
+PORTVERSION= 2.00
CATEGORIES= mail
MASTER_SITES= http://openwebmail.org/openwebmail/download/ \
http://turtle.ee.ncku.edu.tw/openwebmail/download/
@@ -15,34 +15,76 @@ EXTRACT_SUFX= .tgz
MAINTAINER= leeym@FreeBSD.org
COMMENT= A webmail system designed to manage very big mail folder files in a memory efficient way
-RUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/CGI.pm:${PORTSDIR}/www/p5-CGI.pm \
- ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net \
- ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Text/Iconv.pm:${PORTSDIR}/converters/p5-Text-Iconv \
- ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64
+RUN_DEPENDS= ${SITE_PERL}/CGI.pm:${PORTSDIR}/www/p5-CGI.pm \
+ ${SITE_PERL}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net \
+ ${SITE_PERL}/${PERL_ARCH}/Text/Iconv.pm:${PORTSDIR}/converters/p5-Text-Iconv \
+ ${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64
NO_BUILD= yes
NO_WRKSUBDIR= yes
OWCGIDIR= ${PREFIX}/www/cgi-bin/openwebmail
-USE_REINPLACE= yes
+OWDATADIR= ${PREFIX}/www/data/openwebmail
+PATCH_WRKSRC= ${WRKSRC}/cgi-bin/openwebmail
+PATCH_STRIP= -p1
+
+.if defined(WITH_SPEEDYCGI)
+BUILD_DEPENDS+= ${SITE_PERL}/CGI/SpeedyCGI.pm:${PORTSDIR}/www/p5-CGI-SpeedyCGI
+RUN_DEPENDS+= ${SITE_PERL}/CGI/SpeedyCGI.pm:${PORTSDIR}/www/p5-CGI-SpeedyCGI
+EXTRA_PATCHES= ${PATCH_WRKSRC}/uty/suidperl2speedy.diff
+.endif
+
+.if defined(WITH_PAM)
+RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Authen/PAM.pm:${PORTSDIR}/security/p5-Authen-PAM
+.endif
+
+.if defined(WITH_ISPELL)
+RUN_DEPENDS+= ispell:${PORTSDIR}/textproc/ispell
+.endif
+
+.if defined(WITH_IMAGEMAGICK)
+RUN_DEPENDS+= convert:${PORTSDIR}/graphics/ImageMagick
+.endif
+
+pre-fetch:
+.if defined(WITH_PAM)
+ @${ECHO} "PAM support will be added."
+.endif
+.if defined(WITH_ISPELL)
+ @${ECHO} "ISpell support will be added."
+.endif
+.if defined(WITH_SPEEDYCGI)
+ @${ECHO} "SpeedyCGI support will be added."
+.endif
+.if defined(WITH_IMAGEMAGICK)
+ @${ECHO} "ImageMagick support will be added."
+.endif
+.if !defined(WITH_PAM) && !defined(WITH_ISPELL) && !defined(WITH_IMAGEMAGICK) && !defined(WITH_SPEEDYCGI)
+ @${ECHO} ""
+ @${ECHO} "Type \"make WITH_PAM=yes\" if you want PAM support."
+ @${ECHO} "Type \"make WITH_ISPELL=yes\" if you want ISpell support."
+ @${ECHO} "Type \"make WITH_SPEEDYCGI=yes\" if you want SpeedyCGI support."
+ @${ECHO} "Type \"make WITH_IMAGEMAGICK=yes\" if you want ImageMagick support."
+ @${ECHO} "You can use them in combinations."
+ @${ECHO} ""
+.endif
+
+post-patch:
+ @${PERL} -pi.bak -e 's,/usr/local/www/cgi-bin/openwebmail,${OWCGIDIR},g' ${PATCH_WRKSRC}/etc/openwebmail.conf
+ @${PERL} -pi.bak -e 's,/usr/local/www/data/openwebmail,${OWDATADIR},g' ${PATCH_WRKSRC}/etc/openwebmail.conf
+.if defined(WITH_SPEEDYCGI)
+ @${ECHO} "savedsuid_support no" >> ${PATCH_WRKSRC}/etc/openwebmail.conf
+.else
+ @${PERL} -pi.bak -e 's,/usr/bin/suidperl,${PERL},g' ${PATCH_WRKSRC}/openwebmail*pl
+.endif
do-install:
-.for dir in cgi-bin data
- @${MKDIR} ${PREFIX}/www/${dir}
- @${CP} -R ${WRKSRC}/${dir}/openwebmail ${PREFIX}/www/${dir}/
- @${CHOWN} -R root:mail ${PREFIX}/www/${dir}/openwebmail
-.endfor
-.for dir in sessions users
- @${CHMOD} 0770 ${OWCGIDIR}/etc/${dir}
-.endfor
-.for file in openwebmail-abook.pl openwebmail-advsearch.pl openwebmail-cal.pl \
- openwebmail-folder.pl openwebmail-main.pl openwebmail-prefs.pl \
- openwebmail-read.pl openwebmail-send.pl openwebmail-spell.pl \
- openwebmail-tool.pl openwebmail-viewatt.pl openwebmail-webdisk.pl openwebmail.pl
- @${REINPLACE_CMD} -e 's,suidperl,perl,g' ${OWCGIDIR}/${file}
- @${CHMOD} 4555 ${OWCGIDIR}/${file}
-.endfor
- @${PERL5} ${WRKSRC}/cgi-bin/openwebmail/uty/wrapsuid.pl ${OWCGIDIR}
+ @${CP} -R ${WRKSRC}/cgi-bin/openwebmail ${OWCGIDIR}
+ @${CP} -R ${WRKSRC}/data/openwebmail ${OWDATADIR}
+ @${CHOWN} -R root:mail ${OWCGIDIR}
+ @${CHMOD} 0770 ${OWCGIDIR}/etc/sessions ${OWCGIDIR}/etc/users
+ @${CHMOD} 4755 ${OWCGIDIR}/openwebmail*pl
+ @${PERL} ${OWCGIDIR}/uty/wrapsuid.pl ${OWCGIDIR}
@${OWCGIDIR}/openwebmail-tool.pl --init --no
- @${RM} ${OWCGIDIR}/*bak
+ @${FIND} ${OWCGIDIR} \( -name "*.bak" -or -name "*.orig" \) -delete
.include <bsd.port.mk>