aboutsummaryrefslogtreecommitdiffstats
path: root/www/MT
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2004-01-03 13:38:28 +0800
committerkuriyama <kuriyama@FreeBSD.org>2004-01-03 13:38:28 +0800
commit184e2ebec9f623c223296a19518cf6bda5be4a44 (patch)
treed99ee2bc3f4fe6f66d37799d62c86e58f908a2ba /www/MT
parentc4c1012fd3cad3e696cd9a90937a702efa2da68c (diff)
downloadfreebsd-ports-gnome-184e2ebec9f623c223296a19518cf6bda5be4a44.tar.gz
freebsd-ports-gnome-184e2ebec9f623c223296a19518cf6bda5be4a44.tar.zst
freebsd-ports-gnome-184e2ebec9f623c223296a19518cf6bda5be4a44.zip
o Though this port does not support packaging, but fixed pkg-plist
while I'm here. o Install mt.cfg as mt.cfg.dist and not overwrite / deinstall modified mt.cfg file.
Diffstat (limited to 'www/MT')
-rw-r--r--www/MT/Makefile4
-rw-r--r--www/MT/pkg-plist9
2 files changed, 9 insertions, 4 deletions
diff --git a/www/MT/Makefile b/www/MT/Makefile
index 3d8993377cff..c8f4e3a7aaa3 100644
--- a/www/MT/Makefile
+++ b/www/MT/Makefile
@@ -7,6 +7,7 @@
PORTNAME= MT
PORTVERSION= 2.65
+PORTREVISION= 1
CATEGORIES= www
MAINTAINER= ports@FreeBSD.org
@@ -57,7 +58,8 @@ do-install:
-e 's/# StaticWebPath/StaticWebPath/g' \
-e 's#path/to/static-files#mt#g' \
-e 's/# NoHTMLEntities 1/NoHTMLEntities 1/g' \
- ${WRKSRC}/mt.cfg > ${PREFIX}/${CGIDIR}/mt.cfg
+ ${WRKSRC}/mt.cfg > ${PREFIX}/${CGIDIR}/mt.cfg.dist
+ [ -e ${PREFIX}/${CGIDIR}/mt.cfg ] || ${CP} ${PREFIX}/${CGIDIR}/mt.cfg.dist ${PREFIX}/${CGIDIR}/mt.cfg
${SED} -e 's#$$MT_DIR, .schemas.#"${PREFIX}/${DATADIR}/schemas"#' \
${WRKSRC}/mt-load.cgi > ${PREFIX}/${CGIDIR}/mt-load.cgi
@${ECHO_MSG} "Installing data ${PREFIX}/${DATADIR}"
diff --git a/www/MT/pkg-plist b/www/MT/pkg-plist
index 49893d291b1f..9a5a6c58c678 100644
--- a/www/MT/pkg-plist
+++ b/www/MT/pkg-plist
@@ -189,7 +189,9 @@
%%CGIDIR%%/mt-tb.cgi
%%CGIDIR%%/mt-view.cgi
%%CGIDIR%%/mt-xmlrpc.cgi
-%%CGIDIR%%/mt.cfg
+@unexec cmp %D/%%CGIDIR%%/mt.cfg.dist %D/%%CGIDIR%%/mt.cfg && rm %D/%%CGIDIR%%/mt.cfg || true 2>/dev/null
+%%CGIDIR%%/mt.cfg.dist
+@exec [ -e %D/%%CGIDIR%%/mt.cfg ] || cp %D/%%CGIDIR%%/mt.cfg.dist %D/%%CGIDIR%%/mt.cfg
%%CGIDIR%%/mt.cgi
%%CGIDIR%%/search_templates/comments.tmpl
%%CGIDIR%%/search_templates/default.tmpl
@@ -320,6 +322,8 @@
%%DATADIR%%/schemas/postgres.dump
%%DATADIR%%/schemas/sqlite.dump
%%DATADIR%%/styles.css
+@exec mkdir %D/%%CGIDIR%%/plugins
+@exec chown -R www:www %D/%%CGIDIR%% %D/%%DATADIR%%
@dirrm %%CGIDIR%%/extlib/Apache/XMLRPC
@dirrm %%CGIDIR%%/extlib/Apache
@dirrm %%CGIDIR%%/extlib/CGI
@@ -371,7 +375,6 @@
@dirrm %%DATADIR%%/images/lang-en-us
@dirrm %%DATADIR%%/images
@dirrm %%DATADIR%%/schemas
-@unexec rmdir %D/%%CGIDIR%%/mt/db 2>/dev/null || true
-@unexec rmdir %D/%%CGIDIR%%/mt 2>/dev/null || true
+@unexec rmdir %D/%%CGIDIR%%/db 2>/dev/null || true
@unexec rmdir %D/%%CGIDIR%% 2>/dev/null || true
@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true