aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2014-04-20 00:58:13 +0800
committercrees <crees@FreeBSD.org>2014-04-20 00:58:13 +0800
commite5e263ccbe7599419ea0d64f5dbf93449001140f (patch)
tree1c9ecca12ce4dfcd8956bb6c297e56360a40aa11 /mail
parentc6bc28814aee58e008f9db9f0b678d29d2f289f2 (diff)
downloadfreebsd-ports-gnome-e5e263ccbe7599419ea0d64f5dbf93449001140f.tar.gz
freebsd-ports-gnome-e5e263ccbe7599419ea0d64f5dbf93449001140f.tar.zst
freebsd-ports-gnome-e5e263ccbe7599419ea0d64f5dbf93449001140f.zip
pkg-messageify pkg-message rather than using pkg-install
Suggested by: mat
Diffstat (limited to 'mail')
-rw-r--r--mail/sympa/Makefile7
-rw-r--r--mail/sympa/files/pkg-install.in55
-rw-r--r--mail/sympa/files/pkg-message.in26
3 files changed, 37 insertions, 51 deletions
diff --git a/mail/sympa/Makefile b/mail/sympa/Makefile
index c581bab241e1..a9abaf9da679 100644
--- a/mail/sympa/Makefile
+++ b/mail/sympa/Makefile
@@ -61,8 +61,8 @@ CONFIGURE_ARGS+=--bindir=${PREFIX}/libexec/${PORTNAME} \
--with-spooldir=/var/spool/${PORTNAME}
CONFIGURE_ENV+= lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN}
MAKE_ENV?= PERL_EXTUTILS_AUTOINSTALL=--skip
-SUB_FILES= pkg-install
-SUB_LIST= DB_TYPE=${DB_TYPE:L} WITH_FASTCGI=${PORT_OPTIONS:MFASTCGI}
+SUB_FILES= pkg-install pkg-message
+SUB_LIST= DB_TYPE=${DB_TYPE:L}
PORTEXAMPLES= *
USE_RC_SUBR= sympa
@@ -98,10 +98,13 @@ PLIST_SUB+= NLS="@comment "
.if ${PORT_OPTIONS:MFASTCGI}
RUN_DEPENDS+= p5-FCGI>=0:${PORTSDIR}/www/p5-FCGI
+SUB_LIST+= FCGI=""
. if ${PORT_OPTIONS:MAPACHE}
USE_APACHE_RUN= 22+
RUN_DEPENDS+= ${LOCALBASE}/${APACHEMODDIR}/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi
. endif
+.else
+SUB_LIST+= FCGI="@comment "
.endif
.if ${PORT_OPTIONS:MORACLE}
diff --git a/mail/sympa/files/pkg-install.in b/mail/sympa/files/pkg-install.in
index dbc28bfe62f2..87b81bb78d47 100644
--- a/mail/sympa/files/pkg-install.in
+++ b/mail/sympa/files/pkg-install.in
@@ -2,55 +2,12 @@
# $FreeBSD$
#
-DB_TYPE=%%DB_TYPE%%
-WITH_FASTCGI=%%WITH_FASTCGI%%
+[ "$2" = "POST_INSTALL" ] || exit 0
-case $2 in
-POST-INSTALL)
- echo "======================================================"
- if [ -n "${DB_TYPE}" ]; then
- echo "If this is your first installation of sympa, please load"
- echo "this file with your ${DB_TYPE} database client:"
- echo " %%PREFIX%%/libexec/sympa/create_db.${DB_TYPE}"
- echo ""
- fi
- echo "To configure sympa interactively, please run:"
- echo " perl %%PREFIX%%/libexec/sympa/sympa_wizard.pl"
- echo ""
-
- for conf in sympa.conf wwsympa.conf
- do [ ! -f ${PKG_PREFIX}/etc/${conf} ] \
- && cp -p ${PKG_PREFIX}/etc/${conf}.sample ${PKG_PREFIX}/etc/${conf} \
- && chmod u+w ${PKG_PREFIX}/etc/${conf}
- done
-
- echo "You may also manually edit the two configuration files:"
- echo " ${PKG_PREFIX}/etc/sympa.conf"
- echo " ${PKG_PREFIX}/etc/wwsympa.conf"
- echo "======================================================"
- echo "To set up the wwsympa server, add something like this to"
- echo "your Apache configuration file:"
- echo ""
- echo " DocumentRoot \"%%DATADIR%%\""
- echo " AddDefaultCharset UTF-8"
- echo " DirectoryIndex wws"
- echo " Options +Indexes"
- if [ -n "${WITH_FASTCGI}" ]; then
- echo " LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so"
- echo " <Location /wws>"
- echo " SetHandler fastcgi-script"
- echo " </Location>"
- fi
- echo " <Directory \"%%DATADIR%%\">"
- echo " Allow from all"
- echo " </Directory>"
- echo " ScriptAlias /wws %%PREFIX%%/libexec/sympa/wwsympa-wrapper"
- echo "======================================================"
- exit 0
- ;;
-PRE-INSTALL)
- exit 0
- ;;
-esac
+for conf in sympa.conf wwsympa.conf
+do [ ! -f ${PKG_PREFIX}/etc/${conf} ] && \
+ cp -p ${PKG_PREFIX}/etc/${conf}.sample ${PKG_PREFIX}/etc/${conf} && \
+ chmod u+w ${PKG_PREFIX}/etc/${conf}
+done
exit 0
diff --git a/mail/sympa/files/pkg-message.in b/mail/sympa/files/pkg-message.in
new file mode 100644
index 000000000000..1c7506a2f790
--- /dev/null
+++ b/mail/sympa/files/pkg-message.in
@@ -0,0 +1,26 @@
+If this is your first installation of sympa, please load
+this file with your %%DB_TYPE%% database client:
+ %%PREFIX%%/libexec/sympa/create_db.%%DB_TYPE%%
+
+To configure sympa interactively, please run:
+ perl %%PREFIX%%/libexec/sympa/sympa_wizard.pl
+
+You may also manually edit the two configuration files:
+ %%PREFIX%%/etc/sympa.conf
+ %%PREFIX%%/etc/wwsympa.conf
+
+To set up the wwsympa server, add something like this to
+your Apache configuration file:
+
+ DocumentRoot "%%DATADIR%%"
+ AddDefaultCharset UTF-8
+ DirectoryIndex wws
+ Options +Indexes
+%%FCGI%% LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so
+%%FCGI%% <Location /wws>
+%%FCGI%% SetHandler fastcgi-script
+%%FCGI%% </Location>
+ <Directory \"%%DATADIR%%\">
+ Allow from all
+ </Directory>
+ ScriptAlias /wws %%PREFIX%%/libexec/sympa/wwsympa-wrapper