diff options
author | crees <crees@FreeBSD.org> | 2014-09-21 22:31:31 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2014-09-21 22:31:31 +0800 |
commit | ce24407abbffa0535e3d47961652dde06ef0121b (patch) | |
tree | f4accd5edcbcf1b79bd828b49120a0f5cfa1476b | |
parent | 2d7554fce384c3f822b920169cac5f8b90b77643 (diff) | |
download | freebsd-ports-gnome-ce24407abbffa0535e3d47961652dde06ef0121b.tar.gz freebsd-ports-gnome-ce24407abbffa0535e3d47961652dde06ef0121b.tar.zst freebsd-ports-gnome-ce24407abbffa0535e3d47961652dde06ef0121b.zip |
Stage, resurrect and adopt mail/openwebmail.
-rw-r--r-- | MOVED | 1 | ||||
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/openwebmail/Makefile | 210 | ||||
-rw-r--r-- | mail/openwebmail/distinfo | 2 | ||||
-rw-r--r-- | mail/openwebmail/files/pkg-install.in | 22 | ||||
-rw-r--r-- | mail/openwebmail/pkg-deinstall | 12 | ||||
-rw-r--r-- | mail/openwebmail/pkg-descr | 10 |
7 files changed, 257 insertions, 1 deletions
@@ -6680,7 +6680,6 @@ mail/ftrack||2014-09-01|Not staged mail/greylite||2014-09-01|Not staged mail/ilohamail||2014-09-01|Not staged mail/majordomo||2014-09-01|Not staged -mail/openwebmail||2014-09-01|Not staged mail/p3scan||2014-09-01|Not staged mail/popd||2014-09-01|Not staged mail/popper||2014-09-01|Not staged diff --git a/mail/Makefile b/mail/Makefile index c9705fb9dd0a..9a966476ed76 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -282,6 +282,7 @@ SUBDIR += opendmarc SUBDIR += opensmtpd SUBDIR += opensmtpd-devel + SUBDIR += openwebmail SUBDIR += osbf-lua SUBDIR += ovs SUBDIR += p5-CGP-CLI diff --git a/mail/openwebmail/Makefile b/mail/openwebmail/Makefile new file mode 100644 index 000000000000..ade5a1ec215a --- /dev/null +++ b/mail/openwebmail/Makefile @@ -0,0 +1,210 @@ +# Created by: Yen-Ming Lee <leeym@leeym.com> +# $FreeBSD$ + +PORTNAME= openwebmail +PORTVERSION= 2.53 +PORTREVISION= 2 +CATEGORIES= mail +MASTER_SITES= http://openwebmail.acatysmoof.com/download/%SUBDIR%/ \ + http://openwebmail.org/openwebmail/download/%SUBDIR%/ +MASTER_SITE_SUBDIR?= release + +MAINTAINER= crees@FreeBSD.org +COMMENT= Webmail system designed to manage big mail folder files efficiently + +RUN_DEPENDS= p5-Text-Iconv>=0:${PORTSDIR}/converters/p5-Text-Iconv + +USES= perl5 +USE_PERL5= run build patch +NO_BUILD= yes +NO_WRKSUBDIR= yes +OWCGIDIR= ${PREFIX}/www/cgi-bin/openwebmail +OWDATADIR= ${PREFIX}/www/data/openwebmail +PATCH_WRKSRC= ${WRKSRC}/cgi-bin/openwebmail +PATCH_STRIP= -p1 +PLIST= ${WRKDIR}/.PLIST.${PKGNAME} +SUB_FILES= pkg-install + +OPTIONS_DEFINE= ANTIWORD MAGICK ISPELL LEARNSPAM LSOF PAM POP3_OVER_SSL QUOTA \ + SPAMCHECK SPAMCHECK_ALL SPEEDYCGI TNEF VIRUSCHECK VIRUSCHECK_ALL \ + WGET ZLIB + +ANTIWORD_DESC= AntiWord +ISPELL_DESC= ISpell +LEARNSPAM_DESC= Learn HAM/SPAM +LSOF_DESC= lsof +PAM_DESC= PAM +POP3_OVER_SSL_DESC= POP3 Over SSL +QUOTA_DESC= Quota +SPAMCHECK_DESC= Spam check (Mail::SpamAssassin) +SPAMCHECK_ALL_DESC= Spam check for all (default: pop3) +SPEEDYCGI_DESC= SpeedyCGI +TNEF_DESC= tnef +VIRUSCHECK_DESC= Virus check (Clam AntiVirus) +VIRUSCHECK_ALL_DESC= Virus check for all (default: pop3) +WGET_DESC= wget +ZLIB_DESC= ZLib + +.include <bsd.port.pre.mk> + +# WITH_SPEEDYCGI needs suidperl enabled under perl 5.8.4 or above, +# so, disable it first, and enable it again if perl exists and enabled suidperl +.if ${PERL_LEVEL} >= 500804 && !empty(PORT_OPTIONS:MSPEEDYCGI) +DISABLE_SPEEDYCGI=yes +PORT_OPTIONS:= ${PORT_OPTIONS:NSPEEDYCGI} +.if exists(${PERL}) +PERL_V!= ${PERL} -V +.if ${PERL_V:M*dosuid*} != "" +.undef DISABLE_SPEEDYCGI +.endif # dosuid +.endif # exists(${PERL}) +.endif # perl5.8 + +.if ${PORT_OPTIONS:MLEARNSPAM} || !empty(PORT_OPTIONS:MSPAMCHECK_ALL) +PORT_OPTIONS+= SPAMCHECK +.endif + +.if ${PORT_OPTIONS:MVIRUSCHECK_ALL} +PORT_OPTIONS+= VIRUSCHECK +.endif + +.if ${PORT_OPTIONS:MANTIWORD} +RUN_DEPENDS+= antiword:${PORTSDIR}/textproc/antiword +.endif + +.if ${PORT_OPTIONS:MMAGICK} +RUN_DEPENDS+= convert:${PORTSDIR}/graphics/ImageMagick +.endif + +.if ${PORT_OPTIONS:MISPELL} +RUN_DEPENDS+= ispell:${PORTSDIR}/textproc/aspell-ispell +.endif + +.if ${PORT_OPTIONS:MLSOF} +RUN_DEPENDS+ ${LOCALBASE}/sbin/lsof:${PORTSDIR}/sysutils/lsof +.endif + +.if ${PORT_OPTIONS:MPAM} +RUN_DEPENDS+= p5-Authen-PAM>=0:${PORTSDIR}/security/p5-Authen-PAM +.endif + +.if ${PORT_OPTIONS:MPOP3_OVER_SSL} +RUN_DEPENDS+= p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL +.endif + +.if ${PORT_OPTIONS:MQUOTA} +RUN_DEPENDS+= p5-Quota>=0:${PORTSDIR}/sysutils/p5-Quota +.endif + +.if ${PORT_OPTIONS:MTNEF} +RUN_DEPENDS+= ${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef +.endif + +.if ${PORT_OPTIONS:MSPAMCHECK} +RUN_DEPENDS+= spamassassin>=0:${PORTSDIR}/mail/spamassassin +.endif + +.if ${PORT_OPTIONS:MSPEEDYCGI} +RUN_DEPENDS+= speedy_suidperl:${PORTSDIR}/www/p5-CGI-SpeedyCGI +SUB_LIST+= WITHOUT_SPEEDYCGI="@comment " +.if ${PERL_LEVEL} < 500804 +EXTRA_PATCHES+= ${PATCH_WRKSRC}/misc/patches/suidperl2speedy_suidperl.patch +.else +EXTRA_PATCHES+= ${PATCH_WRKSRC}/misc/patches/suidperl2speedy_suidperl.notmp.patch +.endif +.else +SUB_LIST+= WITHOUT_SPEEDYCGI="" +.endif + +.if ${PORT_OPTIONS:MVIRUSCHECK} +RUN_DEPENDS+= clamdscan:${PORTSDIR}/security/clamav +.endif + +.if ${PORT_OPTIONS:MWGET} +RUN_DEPENDS+= ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget +.endif + +.if ${PORT_OPTIONS:MZLIB} +. if ${PERL_LEVEL} < 500903 +RUN_DEPENDS+= p5-IO-Compress>=0:${PORTSDIR}/archivers/p5-IO-Compress +. endif +.endif + +post-extract: +.for x in addressbooks/global calendar.book + @${RM} ${WRKSRC}/cgi-bin/openwebmail/etc/${x} +.endfor + +post-patch: + ### XXX: Hack, some of this should be LOCALBASE + @${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g' +.if defined(DISABLE_SPEEDYCGI) + @${ECHO_MSG} "" + @${ECHO_MSG} "WARNING:" + @${ECHO_MSG} "Your perl doesn't support SUID, or you don't have perl yet," + @${ECHO_MSG} "so SpeedyCGI support is disabled automatically." + @${ECHO_MSG} "If you want SpeedyCGI support, please reinstall perl with ENABLE_SUIDPERL=yes," + @${ECHO_MSG} "and reinstall ${PORTNAME}." + @${ECHO_MSG} "" +.endif + @${MV} ${PATCH_WRKSRC}/etc/openwebmail.conf ${PATCH_WRKSRC}/etc/openwebmail.conf.sample + @${PERL} -pi.bak -e 's,${LOCALBASE}/www/cgi-bin/openwebmail,${OWCGIDIR},g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample + @${PERL} -pi.bak -e 's,${LOCALBASE}/www/data/openwebmail,${OWDATADIR},g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample +.if ${PORT_OPTIONS:MLEARNSPAM} + @${PERL} -pi.bak -e 's,enable_learnspam no,enable_learnspam yes,g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample +.endif +.if ${PORT_OPTIONS:MSPAMCHECK} + @${PERL} -pi.bak -e 's,enable_spamcheck no,enable_spamcheck yes,g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample + @${ECHO} "enable_saprefs yes" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample +.endif +.if ${PORT_OPTIONS:MSPAMCHECK_ALL} + @${ECHO} "spamcheck_source_allowed all" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample +.endif +.if ${PORT_OPTIONS:MVIRUSCHECK} + @${PERL} -pi.bak -e 's,enable_viruscheck no,enable_viruscheck yes,g' ${PATCH_WRKSRC}/etc/openwebmail.conf.sample +.endif +.if ${PORT_OPTIONS:MVIRUSCHECK_ALL} + @${ECHO} "viruscheck_source_allowed all" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample +.endif +.if ${PORT_OPTIONS:MSPEEDYCGI} + @${ECHO} "has_savedsuid_support no" >> ${PATCH_WRKSRC}/etc/openwebmail.conf.sample +.else + @${PERL} -pi.bak -e 's,/usr/bin/suidperl,${PERL},g' ${PATCH_WRKSRC}/openwebmail*pl +.endif + +pre-install: + @: > ${PLIST} + @${FIND} ${WRKSRC}/*/openwebmail \( -name "*.bak" -or -name "*.orig" \) -delete + @${PRINTF} "%s\n%s\n" "@owner ${BINOWN}" "@group mail" >> ${PLIST} + @${ECHO} "@sample www/cgi-bin/openwebmail/etc/openwebmail.conf.sample" >> ${PLIST} + @${FIND} ${WRKSRC}/cgi-bin/openwebmail \( -type f -o -type l \) -and -not -name openwebmail.conf.sample | \ + ${SED} -e 's,^${WRKSRC},www,' | ${SORT} -u >> ${PLIST} + @${ECHO} "www/cgi-bin/openwebmail/etc/dbm.conf" >> ${PLIST} + @${PRINTF} "%s\n%s\n" "@owner" "@group" >> ${PLIST} + @${FIND} ${WRKSRC}/data/openwebmail \( -type f -o -type l \) -and -not -name openwebmail.conf.sample | \ + ${SED} -e 's,^${WRKSRC},www,' | ${SORT} -u >> ${PLIST} +.if empty(PORT_OPTIONS:MSPEEDYCGI) + @${FIND} ${WRKSRC}/*/openwebmail -name "openwebmail*pl" | \ + ${SED} -e 's,^${WRKSRC},www,' \ + -e 's,openwebmail/openwebmail,openwebmail/.openwebmail,g' \ + >> ${TMPPLIST} +.endif + @${FIND} ${WRKSRC}/*/openwebmail -type d | ${SORT} -ur | \ + ${GREP} -v UTF-8 | \ + ${SED} -e 's,^${WRKSRC},@dirrm www,' >> ${PLIST} + @${FIND} ${WRKSRC}/*/openwebmail -type d | ${SORT} -ur | \ + ${GREP} UTF-8 | \ + ${SED} -e 's,^${WRKSRC},@dirrmtry www,' >> ${PLIST} + @${ECHO_CMD} "@dirrmtry www/cgi-bin" >> ${PLIST} + @${ECHO_CMD} "@dirrmtry www/data" >> ${PLIST} + +do-install: + @${MKDIR} ${STAGEDIR}${OWCGIDIR} ${STAGEDIR}${OWDATADIR} + @(cd ${WRKSRC}/cgi-bin/openwebmail && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${OWCGIDIR}) + @(cd ${WRKSRC}/data/openwebmail && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${OWDATADIR}) + @${PERL} ${OWCGIDIR}/misc/test/dbmtest.pl | ${GREP} "^dbm" > ${STAGEDIR}${OWCGIDIR}/etc/dbm.conf + @${CHMOD} 4755 ${STAGEDIR}${OWCGIDIR}/openwebmail*pl + +.include <bsd.port.post.mk> diff --git a/mail/openwebmail/distinfo b/mail/openwebmail/distinfo new file mode 100644 index 000000000000..03b5116c3d30 --- /dev/null +++ b/mail/openwebmail/distinfo @@ -0,0 +1,2 @@ +SHA256 (openwebmail-2.53.tar.gz) = d1c133ea0ef65c95e30217db5274104022df0b3877c6291ef23f09654b2fdca7 +SIZE (openwebmail-2.53.tar.gz) = 8887260 diff --git a/mail/openwebmail/files/pkg-install.in b/mail/openwebmail/files/pkg-install.in new file mode 100644 index 000000000000..863c996bfda9 --- /dev/null +++ b/mail/openwebmail/files/pkg-install.in @@ -0,0 +1,22 @@ +#!/bin/sh +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +mkdir -p ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/addressbooks +mkdir -p ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/sessions +chmod 0770 ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/sessions +mkdir -p ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/users +chmod 0700 ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/users +chmod 4755 ${PKG_PREFIX}/www/cgi-bin/openwebmail/openwebmail*pl + +for x in addressbooks/global calendar.book; do + if [ ! -s "${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x}" ]; then + touch ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x} + chmod 0666 ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x} + fi +done + +%%WITHOUT_SPEEDYCGI%% perl ${PKG_PREFIX}/www/cgi-bin/openwebmail/misc/tools/wrapsuid/wrapsuid.pl ${PKG_PREFIX}/www/cgi-bin/openwebmail 2>/dev/null + +${PKG_PREFIX}/www/cgi-bin/openwebmail/openwebmail-tool.pl --init --no diff --git a/mail/openwebmail/pkg-deinstall b/mail/openwebmail/pkg-deinstall new file mode 100644 index 000000000000..a63d9953a511 --- /dev/null +++ b/mail/openwebmail/pkg-deinstall @@ -0,0 +1,12 @@ +#!/bin/sh +if [ "$2" != "DEINSTALL" ]; then + exit 0 +fi + +for x in addressbooks/global calendar.book; do + if [ ! -s "${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x}" ]; then + rm ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x} + fi +done + +rm -fr ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/sessions/* diff --git a/mail/openwebmail/pkg-descr b/mail/openwebmail/pkg-descr new file mode 100644 index 000000000000..5c71eac7fb1f --- /dev/null +++ b/mail/openwebmail/pkg-descr @@ -0,0 +1,10 @@ +Open WebMail is a webmail system designed to manage very large mail folder +files in a memory efficient way. It also provides a range of features to help +users migrate smoothly from Microsoft Outlook to Open WebMail. Open WebMail +has the following features: multiple languages, multiple iconsets/styles, +strong MIME support, virtual host/login alias, PAM support, online password +changing, convenient folder/message operations, draft folder, confirmed +reading support, full content search, a spelling checker, auto reply, mail +filtering, POP3 support, and message count previewing. + +WWW: http://openwebmail.org/ |