aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authoralepulver <alepulver@FreeBSD.org>2007-09-30 03:09:03 +0800
committeralepulver <alepulver@FreeBSD.org>2007-09-30 03:09:03 +0800
commitdd2873f0118eccbbc030c3ef07ae7db9e4f8e674 (patch)
tree85851ec57c1e0f7c44286f936848b744b04a8057 /mail
parent2ba2a7a4967026db4c2749aab8077cddc3c62273 (diff)
downloadfreebsd-ports-gnome-dd2873f0118eccbbc030c3ef07ae7db9e4f8e674.tar.gz
freebsd-ports-gnome-dd2873f0118eccbbc030c3ef07ae7db9e4f8e674.tar.zst
freebsd-ports-gnome-dd2873f0118eccbbc030c3ef07ae7db9e4f8e674.zip
- Add support for Cyrus IMAPd 2.3.x
- Remove explicit dependence on Apache. - Install into ${PREFIX}/www/websieve (${WWWDIR}). - Use the generic OPTIONS mechanism rather than some strange precursor to it. PR: ports/116493 Submitted by: Matthew Seaman <m.seaman@infracaninophile.co.uk>
Diffstat (limited to 'mail')
-rw-r--r--mail/websieve/Makefile49
-rw-r--r--mail/websieve/files/patch-websieve.pl11
-rw-r--r--mail/websieve/files/pkg-message.in19
-rw-r--r--mail/websieve/options17
-rw-r--r--mail/websieve/pkg-message6
-rw-r--r--mail/websieve/pkg-plist5
6 files changed, 59 insertions, 48 deletions
diff --git a/mail/websieve/Makefile b/mail/websieve/Makefile
index b9c5c827f1ab..2d1aea5fab12 100644
--- a/mail/websieve/Makefile
+++ b/mail/websieve/Makefile
@@ -16,49 +16,52 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= Web based Cyrus IMAP user admin client
DISTVERSION= 063a
-APACHE_COMPAT= yes
-.include "options"
-.if defined(WITH_CYRUS_IMAPD_VER)
-.if ${WITH_CYRUS_IMAPD_VER} == 22
-RUN_DEPENDS= ${CYRUS_IMAP_PM}:${PORTSDIR}/mail/cyrus-imapd22
-.elif ${WITH_CYRUS_IMAPD_VER} == 21
-RUN_DEPENDS= ${CYRUS_IMAP_PM}:${PORTSDIR}/mail/cyrus-imapd2
-.else
-IGNORE= Cannot install: WITH_CYRUS_IMAPD_VER must be 22 or 21
-.endif
-.else
-RUN_DEPENDS= ${SITE_PERL}/IMAP/Admin.pm:${PORTSDIR}/mail/p5-IMAP-Admin \
- ${SITE_PERL}/IMAP/Sieve.pm:${PORTSDIR}/mail/p5-IMAP-Sieve
-.endif
-RUN_DEPENDS+= ${LOCALBASE}/www/cgi-bin:${PORTSDIR}/${APACHE_PORT}
-
-PKGMESSAGE= ${WRKDIR}/pkg-message
+# Oh for the ability to do radio buttons. In this case, just use the
+# highest select version number. If no Cyrus IMAPd versions are
+# selected, use some generic IMAP modules
-USE_PERL5_RUN= yes
+OPTIONS= CYRUS_IMAPD_21 "With Cyrus IMAPd version 2.1.x" off \
+ CYRUS_IMAPD_22 "With Cyrus IMAPd version 2.2.x" off \
+ CYRUS_IMAPD_23 "With Cyrus IMAPd version 2.3.x" on
-NO_BUILD= yes
+.include <bsd.port.pre.mk>
CYRUS_IMAP_PM= ${SITE_PERL}/${PERL_ARCH}/Cyrus/IMAP/Admin.pm
-.if defined(WITH_CYRUS_IMAPD_VER)
+.if defined(WITH_CYRUS_IMAPD_23)
+RUN_DEPENDS+= ${CYRUS_IMAP_PM}:${PORTSDIR}/mail/cyrus-imapd23
+FUNCLIB_PL= funclib.cyrus
+.elif defined(WITH_CYRUS_IMAPD_22)
+RUN_DEPENDS+= ${CYRUS_IMAP_PM}:${PORTSDIR}/mail/cyrus-imapd22
+FUNCLIB_PL= funclib.cyrus
+.elif defined(WITH_CYRUS_IMAPD_21)
+RUN_DEPENDS+= ${CYRUS_IMAP_PM}:${PORTSDIR}/mail/cyrus-imapd2
FUNCLIB_PL= funclib.cyrus
.else
+RUN_DEPENDS+= ${SITE_PERL}/IMAP/Admin.pm:${PORTSDIR}/mail/p5-IMAP-Admin \
+ ${SITE_PERL}/IMAP/Sieve.pm:${PORTSDIR}/mail/p5-IMAP-Sieve
FUNCLIB_PL= funclib.pl
.endif
+SUB_FILES= pkg-message
+
+USE_PERL5_RUN= yes
+
+NO_BUILD= yes
+
post-configure:
@${REINPLACE_CMD} -e "s,require[ ]*'\./\([^']*\)',require '${PREFIX}/etc/websieve/\1'," \
${WRKSRC}/websieve.pl
do-install:
- @${INSTALL_SCRIPT} ${WRKSRC}/websieve.pl ${PREFIX}/www/cgi-bin
+ @${MKDIR} ${WWWDIR}
+ @${INSTALL_SCRIPT} ${WRKSRC}/websieve.pl ${WWWDIR}/websieve.pl
@${MKDIR} ${PREFIX}/etc/websieve
@${INSTALL_DATA} ${WRKSRC}/websieve.conf ${PREFIX}/etc/websieve/websieve.conf.sample
@${INSTALL_DATA} ${WRKSRC}/${FUNCLIB_PL} ${PREFIX}/etc/websieve/funclib.pl
- @${SED} 's,%%PREFIX%%,${PREFIX},g' ${.CURDIR}/pkg-message > ${PKGMESSAGE}
post-install:
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/mail/websieve/files/patch-websieve.pl b/mail/websieve/files/patch-websieve.pl
new file mode 100644
index 000000000000..4a8b3babc3c7
--- /dev/null
+++ b/mail/websieve/files/patch-websieve.pl
@@ -0,0 +1,11 @@
+--- websieve.pl.orig Tue Jul 6 21:20:09 2004
++++ websieve.pl Sat Sep 29 16:02:22 2007
+@@ -640,7 +640,7 @@
+ #creates global variables $mode,@rules,@mailboxes,@quota and %vacation;
+ # get quota
+ @quota=&getquota("INBOX") if ($havequota || !$useprocmail);
+- if ($IMAPERROR =~ /no errors/i && !$ismanager && $IMAPERROR) {
++ if ($IMAPERROR !~ /no errors/i && !$ismanager && $IMAPERROR) {
+ $error=$IMAPERROR;
+ &closeimap;
+ &closesieve;
diff --git a/mail/websieve/files/pkg-message.in b/mail/websieve/files/pkg-message.in
new file mode 100644
index 000000000000..d2d4cb816023
--- /dev/null
+++ b/mail/websieve/files/pkg-message.in
@@ -0,0 +1,19 @@
+Websieve has been installed in %%WWWDIR%%
+
+However, before you can use the program, you should copy the file
+"websieve.conf.sample" in %%PREFIX%%/etc/websieve to "websieve.conf"
+edit it to suit your needs. Use "openssl rand -base64 39" to create
+a new secret key. You will need to add a section like the following to
+your Apache configuration:
+
+ ScriptAlias /websieve "%%WWWDIR%%/"
+
+ <Directory "%%WWWDIR%%">
+ Options ExecCGI
+ AllowOverride none
+
+ Order Deny,Allow
+ Deny from all
+ Allow from 127.0.0.1 .example.com
+ </Directory>
+
diff --git a/mail/websieve/options b/mail/websieve/options
deleted file mode 100644
index 289f7f9cf9f5..000000000000
--- a/mail/websieve/options
+++ /dev/null
@@ -1,17 +0,0 @@
-# $FreeBSD$
-#
-
-#WITH_CYRUS_IMAPD_VER= none, 22, 21, 20
-# Use the Cyrus IMAP and Sieve perl modules.
-# The Cyrus perl modules do not support SSL, but better
-# authentication mechanisms than cleartext PLAIN.
-
-
-## AUTOMATICALLY GENERATED FILE - DO NOT CHANGE ANYTHING BELOW THIS LINE ##
-# use `make config' to edit the local configuration
-# use `make makeconfig' to edit the defaults (MAINTAINER only)
-
-_OPTIONSNG_READ?=default
-.ifndef WITH_CYRUS_IMAPD_VER
-WITHOUT_CYRUS_IMAPD_VER?=yes
-.endif
diff --git a/mail/websieve/pkg-message b/mail/websieve/pkg-message
deleted file mode 100644
index 738f92c70493..000000000000
--- a/mail/websieve/pkg-message
+++ /dev/null
@@ -1,6 +0,0 @@
-Websieve has been installed at <http://localhost/cgi-bin/websieve.pl>
-
-However, before you can use the program, you should copy the file
-"websieve.conf.sample" in %%PREFIX%%/etc/websieve to "websieve.conf"
-edit it to suit your needs. Use "openssl rand -base64 39" to create
-a new secret key.
diff --git a/mail/websieve/pkg-plist b/mail/websieve/pkg-plist
index 322c9a7d4df4..dfb15b2fa874 100644
--- a/mail/websieve/pkg-plist
+++ b/mail/websieve/pkg-plist
@@ -1,4 +1,5 @@
-www/cgi-bin/websieve.pl
+%%WWWDIR%%/websieve.pl
etc/websieve/websieve.conf.sample
etc/websieve/funclib.pl
-@dirrm etc/websieve
+@dirrmtry etc/websieve
+@dirrm %%WWWDIR%%