diff options
author | adamw <adamw@FreeBSD.org> | 2013-12-09 02:59:35 +0800 |
---|---|---|
committer | adamw <adamw@FreeBSD.org> | 2013-12-09 02:59:35 +0800 |
commit | efae09a75e40b7650cf41636fa0e8699ef9ae31d (patch) | |
tree | bc716771127abae434b8aff46551e491a89f926c /mail/squirrelmail | |
parent | 5a9f52b808240fff65ed9a1897f73b4291434bad (diff) | |
download | freebsd-ports-gnome-efae09a75e40b7650cf41636fa0e8699ef9ae31d.tar.gz freebsd-ports-gnome-efae09a75e40b7650cf41636fa0e8699ef9ae31d.tar.zst freebsd-ports-gnome-efae09a75e40b7650cf41636fa0e8699ef9ae31d.zip |
Create a generic PKGMESSAGE, and use it where appropriate.
Make sure that bsd.port.pre.mk is included before bsd.squirrelmail.mk.
For ports with maintainers, I haven't switched you to the new
PKGMESSAGE, but I have corrected paths in pkg-message.in where
necessary. I also got a little over-zealous in cleaning redundant
definitions from the headers. Apologies in advance if this rubs
you the wrong way.
Diffstat (limited to 'mail/squirrelmail')
-rw-r--r-- | mail/squirrelmail/bsd.squirrelmail.mk | 36 | ||||
-rw-r--r-- | mail/squirrelmail/files/plugin-pkg-message.in | 7 |
2 files changed, 39 insertions, 4 deletions
diff --git a/mail/squirrelmail/bsd.squirrelmail.mk b/mail/squirrelmail/bsd.squirrelmail.mk index e8c566ee875f..27a3b2555049 100644 --- a/mail/squirrelmail/bsd.squirrelmail.mk +++ b/mail/squirrelmail/bsd.squirrelmail.mk @@ -2,7 +2,20 @@ # # $LastChangedDate: 2010-02-01 22:21:34 -0500 (Mon, 01 Feb 2010) $ # -# Common code for squirrelmail plugins. +# To create a plugin, put the following at the bottom of your makefile: +# +# .include <bsd.port.pre.mk> +# .include "${.CURDIR}/../squirrelmail/bsd.squirrelmail.mk" +# .include <bsd.port.post.mk> +# +# Variables you can set: +# USE_SM_COMPAT = creates a dependency on mail/squirrelmail-compatibility-plugin +# USE_GENERIC_PKGMESSAGE = to use a default message about editing config.php +# *****NOTE this clobbers FILESDIR, so you cannot use this if you have any files/patch-* +# SQUIRREL_PLUGIN_NAME = defaults to PORTNAME +# SQUIRREL_PLUGIN_CONFIG = the config file name (for the PKGMESSAGE) +# _SMSRCDIR = WRKSRC=${WRKDIR}/${_SMSRCDIR} +# # # Created & tested by # Thomas Abthorpe <tabthorpe@FreeBSD.org> @@ -19,6 +32,7 @@ CATEGORIES?= mail www MASTER_SITES?= http://www.squirrelmail.org/plugins/ PKGNAMEPREFIX?= squirrelmail- PKGNAMESUFFIX?= -plugin +DIST_SUBDIR?= squirrelmail RUN_DEPENDS+= ${SQUIRRELDIR}/index.php:${PORTSDIR}/mail/squirrelmail @@ -26,6 +40,11 @@ RUN_DEPENDS+= ${SQUIRRELDIR}/index.php:${PORTSDIR}/mail/squirrelmail RUN_DEPENDS+= ${SQUIRRELDIR}/plugins/compatibility:${PORTSDIR}/mail/squirrelmail-compatibility-plugin .endif +.ifndef WITHOUT_ACTIVATE +USES+= perl5 +USE_PERL5+= install +.endif + NO_BUILD= yes NO_WRKSUBDIR= yes USE_PHP?= yes @@ -41,8 +60,17 @@ SQUIRRELDIR?= ${PREFIX}/www/squirrelmail PLIST_SUB+= SQUIRRELDIR=${SQUIRRELDIR:S,${PREFIX}/,,} SUB_LIST+= SQUIRRELDIR=${SQUIRRELDIR} -.if exists(${FILESDIR}/pkg-message.in) -SUB_FILES= pkg-message +SQUIRREL_PLUGIN_CONFIG?= config.php +PLIST_SUB+= SQUIRREL_PLUGIN_CONFIG=${SQUIRREL_PLUGIN_CONFIG} +SUB_LIST+= SQUIRREL_PLUGIN_CONFIG=${SQUIRREL_PLUGIN_CONFIG} + +.if defined(USE_GENERIC_PKGMESSAGE) +# NOTE: we have to change FILESDIR to make this work... +FILESDIR= ${.CURDIR}/../squirrelmail/files +SUB_FILES+= plugin-pkg-message +PKGMESSAGE= ${WRKDIR}/plugin-pkg-message +.elif exists(${FILESDIR}/pkg-message.in) +SUB_FILES+= pkg-message .endif .if !target(pre-everything) @@ -85,7 +113,7 @@ post-install: .endif @${ECHO_CMD} "" -.if exists(${FILESDIR}/pkg-message.in) +.if exists(${FILESDIR}/pkg-message.in) || exists(${FILESDIR}/plugin-pkg-message.in) @${CAT} ${PKGMESSAGE} @${ECHO_CMD} "" .endif diff --git a/mail/squirrelmail/files/plugin-pkg-message.in b/mail/squirrelmail/files/plugin-pkg-message.in new file mode 100644 index 000000000000..68806702dae8 --- /dev/null +++ b/mail/squirrelmail/files/plugin-pkg-message.in @@ -0,0 +1,7 @@ +============================================================= +Before using the %%SQUIRREL_PLUGIN_NAME%% plugin, you must copy the file +%%SQUIRRELDIR%%/plugins/%%SQUIRREL_PLUGIN_NAME%%/%%SQUIRREL_PLUGIN_CONFIG%%.sample +to +%%SQUIRRELDIR%%/plugins/%%SQUIRREL_PLUGIN_NAME%%/%%SQUIRREL_PLUGIN_CONFIG%% +and edit the configuration to meet your needs. +============================================================= |