aboutsummaryrefslogtreecommitdiff
path: root/mail/squirrelmail/bsd.squirrelmail.mk
diff options
context:
space:
mode:
authorThomas Abthorpe <tabthorpe@FreeBSD.org>2008-06-03 13:41:29 +0000
committerThomas Abthorpe <tabthorpe@FreeBSD.org>2008-06-03 13:41:29 +0000
commitb396a1698f1473f44b56dc63a5b82791c2e76e67 (patch)
tree8e1d9f9e1ec42fbb2e5a77d05513edada2fe5379 /mail/squirrelmail/bsd.squirrelmail.mk
parent1b23215da886be7c5e707e16dc709d278893f389 (diff)
downloadports-b396a1698f1473f44b56dc63a5b82791c2e76e67.tar.gz
ports-b396a1698f1473f44b56dc63a5b82791c2e76e67.zip
Notes
Diffstat (limited to 'mail/squirrelmail/bsd.squirrelmail.mk')
-rw-r--r--mail/squirrelmail/bsd.squirrelmail.mk78
1 files changed, 78 insertions, 0 deletions
diff --git a/mail/squirrelmail/bsd.squirrelmail.mk b/mail/squirrelmail/bsd.squirrelmail.mk
new file mode 100644
index 000000000000..bab670354c68
--- /dev/null
+++ b/mail/squirrelmail/bsd.squirrelmail.mk
@@ -0,0 +1,78 @@
+# $FreeBSD$
+#
+# $GKHeader: squirrelmail/bsd.squirrelmail.mk,v 1.14 2008/05/29 13:00:54 tabthorpe Exp $
+#
+# Common code for squirrelmail plugins.
+#
+# Created & tested by
+# Thomas Abthorpe <tabthorpe@FreeBSD.org>
+# Philippe Audeoud <jadawin@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
+
+NO_BUILD= yes
+NO_WRKSUBDIR= yes
+USE_PERL5_BUILD= yes
+USE_PHP= yes
+WANT_PHP_WEB= yes
+
+SQUIRREL_PLUGIN_NAME= ${PORTNAME}
+
+.ifdef SQUIRRELDIR
+PLIST_SUB+= SQUIRRELDIR=${SQUIRRELDIR}
+SUB_LIST+= SQUIRRELDIR=${SQUIRRELDIR}
+.else
+.ifndef WITHOUT_WWWDIR
+SQUIRRELDIR= ${PREFIX}/www/squirrelmail
+PLIST_SUB+= SQUIRRELDIR=www/squirrelmail
+SUB_LIST+= SQUIRRELDIR=www/squirrelmail
+.else
+SQUIRRELDIR= ${PREFIX}/squirrelmail
+PLIST_SUB+= SQUIRRELDIR=squirrelmail
+SUB_LIST+= SQUIRRELDIR=squirrelmail
+.endif
+.endif
+PLIST_SUB+= SQUIRREL_PLUGIN_NAME=${SQUIRREL_PLUGIN_NAME}
+
+pre-everything::
+ @${ECHO_CMD} ""
+.ifndef WITHOUT_ACTIVATE
+ @${ECHO_CMD} "Activating plug-in in SquirrelMail after installation."
+ @${ECHO_CMD} "If you don't want to automatically activate the plug-in set"
+ @${ECHO_CMD} "WITHOUT_ACTIVATE=yes"
+.else
+ @${ECHO_CMD} "NOT Activating plug-in in SquirrelMail after installation."
+ @${ECHO_CMD} "If you want to automatically activate the plug-in unset"
+ @${ECHO_CMD} "WITHOUT_ACTIVATE"
+.endif
+ @${ECHO_CMD} ""
+
+_SMSRCDIR?= ${SQUIRREL_PLUGIN_NAME}
+
+do-install:
+ ${CP} -R ${WRKSRC}/${_SMSRCDIR} ${SQUIRRELDIR}/plugins/${SQUIRREL_PLUGIN_NAME}
+ ${FIND} ${SQUIRRELDIR}/plugins/${SQUIRREL_PLUGIN_NAME} \
+ -type d -exec chmod 755 {} \;
+ ${FIND} ${SQUIRRELDIR}/plugins/${SQUIRREL_PLUGIN_NAME} \
+ -type f -exec chmod 644 {} \;
+
+post-install:
+.ifndef WITHOUT_ACTIVATE
+.if exists( ${SQUIRRELDIR}/config/conf.pl )
+ @${ECHO_CMD} "Activating plug-in in SquirrelMail"
+ ${SQUIRRELDIR}/config/conf.pl --install-plugin ${SQUIRREL_PLUGIN_NAME}
+.endif
+.else
+ @${ECHO_CMD} "To activate the plug-in in SquirrelMail use"
+ @${ECHO_CMD} "${SQUIRRELDIR}/config/conf.pl --install-plugin ${SQUIRREL_PLUGIN_NAME}"
+.endif
+ @${ECHO_CMD} ""
+
+.if exists(${FILESDIR}/pkg-message.in)
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO_CMD} ""
+.endif