aboutsummaryrefslogtreecommitdiffstats
path: root/mail/squirrelmail
diff options
context:
space:
mode:
authoritetcu <itetcu@FreeBSD.org>2009-02-12 02:51:14 +0800
committeritetcu <itetcu@FreeBSD.org>2009-02-12 02:51:14 +0800
commitd615aa218df69fcfe61532a1716200f42b7742ff (patch)
treee6b5e484831826f8c03eb31be09c5d246d38b7d3 /mail/squirrelmail
parentc5e9b5ede670cae467072de38ea87f658f21cd95 (diff)
downloadfreebsd-ports-gnome-d615aa218df69fcfe61532a1716200f42b7742ff.tar.gz
freebsd-ports-gnome-d615aa218df69fcfe61532a1716200f42b7742ff.tar.zst
freebsd-ports-gnome-d615aa218df69fcfe61532a1716200f42b7742ff.zip
Enhance bsd.squirrelmail.mk:
- default SQUIRREL_PLUGIN_NAME to PORTNAME only if not already deifned - provide default values for: CATEGORIES, MASTER_SITES, PKGNAMEPREFIX, PKGNAMESUFFIX - if ${FILESDIR}/pkg-message.in exists, add it to SUB_FILES and set SQUIRREL_PLUGIN_NAME to the right value in SUB_LIST - introduce USE_SM_COMPAT; if defined, RUN_DEPEND on mail/squirrelmail-compatibility-plugin for the old (v1) compat plugin you still need to depends by hand (since it's expected to go away shortly) - bug-fix: install in the right place even if the install dir exists. Approved by: maintainer (on IRC)
Diffstat (limited to 'mail/squirrelmail')
-rw-r--r--mail/squirrelmail/bsd.squirrelmail.mk25
1 files changed, 21 insertions, 4 deletions
diff --git a/mail/squirrelmail/bsd.squirrelmail.mk b/mail/squirrelmail/bsd.squirrelmail.mk
index 07e28dcaf453..509037309275 100644
--- a/mail/squirrelmail/bsd.squirrelmail.mk
+++ b/mail/squirrelmail/bsd.squirrelmail.mk
@@ -7,12 +7,23 @@
# Created & tested by
# Thomas Abthorpe <tabthorpe@FreeBSD.org>
# Philippe Audeoud <jadawin@FreeBSD.org>
+# Some enhancements by
+# Ion-Mihai "IOnut" Tetcu <itetcu@FreeBSD.org>
#
# This code is still a work in progress, and will likely need further
# tweaking. Feedback is always welcome.
#
-RUN_DEPENDS+= ${SQUIRRELDIR}/index.php:${PORTSDIR}/mail/squirrelmail
+CATEGORIES?= mail www
+MASTER_SITES?= http://www.squirrelmail.org/plugins/
+PKGNAMEPREFIX?= squirrelmail-
+PKGNAMESUFFIX?= -plugin
+
+RUN_DEPENDS+= ${SQUIRRELDIR}/index.php:${PORTSDIR}/mail/squirrelmail
+
+.ifdef USE_SM_COMPAT
+RUN_DEPENDS+= ${SQUIRRELDIR}/plugins/compatibility:${PORTSDIR}/mail/squirrelmail-compatibility-plugin
+.endif
NO_BUILD= yes
NO_WRKSUBDIR= yes
@@ -20,7 +31,7 @@ USE_PERL5_BUILD= yes
USE_PHP= yes
WANT_PHP_WEB= yes
-SQUIRREL_PLUGIN_NAME= ${PORTNAME}
+SQUIRREL_PLUGIN_NAME?= ${PORTNAME}
.ifdef SQUIRRELDIR
PLIST_SUB+= SQUIRRELDIR=${SQUIRRELDIR}
@@ -38,6 +49,11 @@ SUB_LIST+= SQUIRRELDIR=squirrelmail
.endif
PLIST_SUB+= SQUIRREL_PLUGIN_NAME=${SQUIRREL_PLUGIN_NAME}
+.if exists(${FILESDIR}/pkg-message.in)
+SUB_LIST+= SQUIRREL_PLUGIN_NAME=${SQUIRREL_PLUGIN_NAME}
+SUB_FILES= pkg-message
+.endif
+
pre-everything::
@${ECHO_CMD} ""
.ifndef WITHOUT_ACTIVATE
@@ -54,9 +70,10 @@ pre-everything::
_SMSRCDIR?= ${SQUIRREL_PLUGIN_NAME}
do-install:
- ${CP} -R ${WRKSRC}/${_SMSRCDIR} ${SQUIRRELDIR}/plugins/${SQUIRREL_PLUGIN_NAME}
+ cd ${WRKSRC}/${_SMSRCDIR} && ${FIND} -d . | \
+ ${CPIO} -dump ${SQUIRRELDIR}/plugins/${SQUIRREL_PLUGIN_NAME} >/dev/null 2>&1 && \
${FIND} ${SQUIRRELDIR}/plugins/${SQUIRREL_PLUGIN_NAME} \
- -type d -exec chmod 755 {} \;
+ -type d -exec chmod 755 {} \; && \
${FIND} ${SQUIRRELDIR}/plugins/${SQUIRREL_PLUGIN_NAME} \
-type f -exec chmod 644 {} \;