ports/116493: mail/websieve -- unbreak with appache22, etc.
Matthew Seaman
m.seaman at infracaninophile.co.uk
Thu Sep 20 21:31:09 UTC 2007
>Number: 116493
>Category: ports
>Synopsis: mail/websieve -- unbreak with appache22, etc.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Sep 20 21:31:08 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Matthew Seaman
>Release: FreeBSD 6.2-RELEASE-p7 i386
>Organization:
Infracaninophile
>Environment:
System: FreeBSD indignant.thebunker.net 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #3: Wed Aug 8 08:20:09 BST 2007 root at indignant.thebunker.net:/usr/obj/usr/src/sys/INDIGNANT i386
>Description:
Drive-by cleanup and fix of an unmaintained port.
* Add support for Cyrus IMAPd 2.3.x
* Remove explicit dependence on Apache
* Install into ${PREFIX}/www/websieve
* Use the generic OPTIONS mechanism rather than some strange
precursor to it.
Notes for committer:
Files moved: websive/pkg-message to websieve/files/pkg-message.in
Files removed: websieve/options
>How-To-Repeat:
>Fix:
--- websieve.diff begins here ---
diff -Nur /usr/ports/mail/websieve/Makefile websieve/Makefile
--- /usr/ports/mail/websieve/Makefile Wed May 10 23:37:04 2006
+++ websieve/Makefile Thu Sep 20 21:48:42 2007
@@ -16,49 +16,52 @@
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
+# 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
+
+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
+
+.include <bsd.port.pre.mk>
+
+CYRUS_IMAP_PM= ${SITE_PERL}/${PERL_ARCH}/Cyrus/IMAP/Admin.pm
+
+.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
-.elif ${WITH_CYRUS_IMAPD_VER} == 21
+FUNCLIB_PL= funclib.cyrus
+.elif defined(WITH_CYRUS_IMAPD_21)
RUN_DEPENDS= ${CYRUS_IMAP_PM}:${PORTSDIR}/mail/cyrus-imapd2
-.else
-IGNORE= Cannot install: WITH_CYRUS_IMAPD_VER must be 22 or 21
-.endif
+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
-RUN_DEPENDS+= ${LOCALBASE}/www/cgi-bin:${PORTSDIR}/${APACHE_PORT}
-PKGMESSAGE= ${WRKDIR}/pkg-message
+SUB_FILES= pkg-message
USE_PERL5_RUN= yes
NO_BUILD= yes
-CYRUS_IMAP_PM= ${SITE_PERL}/${PERL_ARCH}/Cyrus/IMAP/Admin.pm
-
-.if defined(WITH_CYRUS_IMAPD_VER)
-FUNCLIB_PL= funclib.cyrus
-.else
-FUNCLIB_PL= funclib.pl
-.endif
-
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 -Nur /usr/ports/mail/websieve/files/pkg-message.in websieve/files/pkg-message.in
--- /usr/ports/mail/websieve/files/pkg-message.in Thu Jan 1 01:00:00 1970
+++ websieve/files/pkg-message.in Thu Sep 20 21:42:41 2007
@@ -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 -Nur /usr/ports/mail/websieve/options websieve/options
--- /usr/ports/mail/websieve/options Mon Jul 19 08:25:55 2004
+++ websieve/options Thu Jan 1 01:00:00 1970
@@ -1,17 +0,0 @@
-# $FreeBSD: ports/mail/websieve/options,v 1.1 2004/07/19 07:25:55 eik Exp $
-#
-
-#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 -Nur /usr/ports/mail/websieve/pkg-message websieve/pkg-message
--- /usr/ports/mail/websieve/pkg-message Sat Apr 26 22:50:25 2003
+++ websieve/pkg-message Thu Jan 1 01:00:00 1970
@@ -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 -Nur /usr/ports/mail/websieve/pkg-plist websieve/pkg-plist
--- /usr/ports/mail/websieve/pkg-plist Sat Apr 26 22:50:25 2003
+++ websieve/pkg-plist Thu Sep 20 21:50:43 2007
@@ -1,4 +1,5 @@
-www/cgi-bin/websieve.pl
+%%WWWDIR%%/websieve.pl
etc/websieve/websieve.conf.sample
etc/websieve/funclib.pl
- at dirrm etc/websieve
+ at dirrmtry etc/websieve
+ at dirrm %%WWWDIR%%
--- websieve.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list