Index: www/MT/Makefile =================================================================== --- www/MT/Makefile (revision 382648) +++ www/MT/Makefile (working copy) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= MT -PORTVERSION= 5.2.11 -#PORTREVISION= 1 +PORTVERSION= 5.2.12 PORTEPOCH= 1 CATEGORIES?= www MASTER_SITES?= http://www.movabletype.org/downloads/stable/\ @@ -35,16 +34,19 @@ PGSQL_DESC= PostgreSQL database support[obsolete] SQLITE_DESC= SQLite3 database support[obsolete] SQLITE2_DESC= SQLite2 database support[obsolete] +APACHE_USE= APACHE_BUILD=22+ -.include DATADIR= www/data CGIDIR= www/cgi-bin/mt SUB_LIST+= CGIDIR=${CGIDIR}\ - PACKAGENAME=${PKGNAMEPREFIX}${PORTNAME} + PACKAGENAME=${PKGNAMEPREFIX}${PORTNAME} \ + PKGNAMEPREFIX=${PKGNAMEPREFIX} PLIST_SUB+= DATADIR=${DATADIR} CGIDIR=${CGIDIR} DB_DIR=${DB_DIR}\ WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} +SUB_FILES= pm.apache pm.default +PKGMESSAGE= ${WRKDIR}/pkg-message USES= perl5 shebangfix USE_PERL5= run @@ -51,7 +53,6 @@ SHEBANG_FILES= *.cgi NO_ARCH= yes NO_BUILD= yes -MT_DOCS_URL?= http://www.movabletype.org/documentation/ MT_UPGRADE_URL?=http://www.movabletype.org/documentation/installation/upgrade-movable-type.html MT_LANG?= EN @@ -61,6 +62,8 @@ PLIST_SUB+= LANG_RU="@comment " .endif +.include + .if ${PORT_OPTIONS:MOPTIONAL_MODULES} RUN_DEPENDS+= p5-HTML-Parser>=0:${PORTSDIR}/www/p5-HTML-Parser\ p5-libwww>=0:${PORTSDIR}/www/p5-libwww\ @@ -99,11 +102,11 @@ .endif .if ${PORT_OPTIONS:MMYSQL} USE_MYSQL= server -DB_DIR?= ${BASEDIR}/var/db/mysql/WEBLOG_DATABASEDIR +DB_DIR?= /var/db/mysql/WEBLOG_DATABASEDIR RUN_DEPENDS+= p5-DBD-mysql>=2.9005:${PORTSDIR}/databases/p5-DBD-mysql .endif .if ${PORT_OPTIONS:MPGSQL} -USES+= pgsql +USES+= pgsql WANT_PGSQL= server RUN_DEPENDS+= p5-DBD-Pg>=1.32:${PORTSDIR}/databases/p5-DBD-Pg .endif @@ -125,20 +128,6 @@ RUN_DEPENDS+= p5-DBD-ODBC>=1.13:${PORTSDIR}/databases/p5-DBD-ODBC .endif -.if ${PORT_OPTIONS:MAPACHE} -USE_APACHE_BUILD= 22+ -SUB_FILES+= MT.conf -SUB_LIST+= APACHEETCDIR=${PREFIX}/${APACHEETCDIR} -.endif - -.include - -.if ${PORT_OPTIONS:MAPACHE} && (${APACHE_VERSION} <= 22) -SUB_LIST+= APACHE22="" APACHE24="\#" MODULE=mod_alias.c -.elif ${PORT_OPTIONS:MAPACHE} && (${APACHE_VERSION} >= 24) -SUB_LIST+= APACHE22="\#" APACHE24="" MODULE=alias_module -.endif - .if ${PORT_OPTIONS:MPSGI} RUN_DEPENDS+= p5-CGI-PSGI>0:${PORTSDIR}/www/p5-CGI-PSGI\ p5-CGI-Emulate-PSGI>=0.06:${PORTSDIR}/www/p5-CGI-Emulate-PSGI\ @@ -165,40 +154,32 @@ .endif do-install: - @${FIND} ${WRKSRC}/* -name "*.orig" -delete + ${FIND} ${WRKSRC}/ -name "*.orig" -delete @${ECHO_MSG} "Installing cgi under ${PREFIX}/${CGIDIR}/" - @${MKDIR} ${STAGEDIR}${PREFIX}/${CGIDIR} - @cd ${WRKSRC} && ${CP} -R *.cgi mt.psgi mt-config.cgi-original \ - alt-tmpl default_templates extlib import lib php plugins \ - search_templates themes tmpl tools COPYING index.html readme.html \ - ${STAGEDIR}${PREFIX}/${CGIDIR} + @${MKDIR} ${STAGEDIR}${PREFIX}/${CGIDIR}/alt-tmpl \ + ${STAGEDIR}${PREFIX}/${CGIDIR}/import \ + ${STAGEDIR}${PREFIX}/${DATADIR} + ${MKDIR} ${STAGEDIR}${DB_DIR} +.for tree in tools themes default_templates extlib plugins search_templates \ + lib tmpl php + (cd ${WRKSRC} && \ + ${COPYTREE_SHARE} ${tree} ${STAGEDIR}${PREFIX}/${CGIDIR}/) +.endfor + (cd ${WRKSRC} && \ + ${INSTALL_DATA} *.cgi mt-config.cgi-original mt.psgi COPYING \ + index.html readme.html ${STAGEDIR}${PREFIX}/${CGIDIR}/) @${ECHO_MSG} "Installing data under ${PREFIX}/${DATADIR}/" - @${MKDIR} ${STAGEDIR}${PREFIX}/${DATADIR} - @cd ${WRKSRC} && ${CP} -R mt-static ${STAGEDIR}${PREFIX}/${DATADIR} - @${MKDIR} ${STAGEDIR}${DB_DIR} + (cd ${WRKSRC} && \ + ${COPYTREE_SHARE} mt-static ${STAGEDIR}${PREFIX}/${DATADIR}) -post-install: - @${ECHO_MSG} "*****************************************************************" - @${ECHO_CMD} "" - @${ECHO_MSG} "You have just installed the movabletype." - @${ECHO_CMD} "" +post-stage: .if ${PORT_OPTIONS:MAPACHE} - @${ECHO_MSG} "Note that you should restart your Apache web server to ensure that" - @${ECHO_MSG} "the "${PKGNAMEPREFIX}"MT configuration file is loaded." - @${ECHO_CMD} "" - @${ECHO_MSG} "Then browse to http://localhost/MTcgi/mt.cgi" - @${ECHO_CMD} "" - @${ECHO_MSG} "Please add the following to your apache config, and restart." - @${ECHO_CMD} "" - @${CAT} ${WRKDIR}/MT.conf - @${ECHO_CMD} "" - @${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/Includes - ${INSTALL_DATA} ${WRKDIR}/MT.conf \ - ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/Includes/MT.conf + # APACHE_VERSION hasn't been evaluated yet, so .if can't be used + ${REINPLACE_CMD} -e 's|%%APACHE${APACHE_VERSION}%%||' \ + -e '/^%%APACHE/d' ${WRKDIR}/pm.apache + ${MV} ${WRKDIR}/pm.apache ${WRKDIR}/pkg-message .else - @${ECHO_CMD} "" + ${MV} ${WRKDIR}/pm.default ${WRKDIR}/pkg-message .endif - @${ECHO_MSG} "Please read the documentation: ${MT_DOCS_URL}" - @${ECHO_CMD} "" -.include +.include Index: www/MT/distinfo =================================================================== --- www/MT/distinfo (revision 382648) +++ www/MT/distinfo (working copy) @@ -1,4 +1,4 @@ -SHA256 (MTOS-5.2.11.tar.gz) = 561384c0793d0d47b3944ca83985771dc40afbe3111118bc61ba275ead5cc987 -SIZE (MTOS-5.2.11.tar.gz) = 7957340 -SHA256 (MTOS-5.2.11-ru.tar.gz) = 8747acb7799dc15bc201d6a2a39cf797c1597bf4520c954d74935d736c8e519a -SIZE (MTOS-5.2.11-ru.tar.gz) = 8095449 +SHA256 (MTOS-5.2.12.tar.gz) = ee07575399ea42b4b7c05405738bba71e36eb1a5fc8aef37f2a4c8666c7f43a5 +SIZE (MTOS-5.2.12.tar.gz) = 7957668 +SHA256 (MTOS-5.2.12-ru.tar.gz) = bca96d002aea57dc34a05e0ac8b4ad2bc97a79ad41f5cef4af991d0af54c06a0 +SIZE (MTOS-5.2.12-ru.tar.gz) = 8097317 Index: www/MT/files/MT.conf.in =================================================================== --- www/MT/files/MT.conf.in (revision 382648) +++ www/MT/files/MT.conf.in (working copy) @@ -1,24 +0,0 @@ -# -# Directives to allow use of %%PACKAGENAME%% as a CGI -# - - Alias /MT "%%PREFIX%%/%%DATADIR%%/mt-static" - Alias /MTcgi "%%PREFIX%%/%%CGIDIR%%" - - -# -# This is to permit URL access to scripts/files in %%PACKAGENAME%% directory. -# - - Options ExecCGI -%%APACHE22%% Order allow,deny -%%APACHE22%% Allow from all -%%APACHE24%% Require all granted -%%APACHE24%% SetHandler cgi-script - - - Options None -%%APACHE22%% Order allow,deny -%%APACHE22%% Allow from all -%%APACHE24%% Require all granted - Index: www/MT/files/pm.apache.in =================================================================== --- www/MT/files/pm.apache.in (revision 0) +++ www/MT/files/pm.apache.in (working copy) @@ -0,0 +1,37 @@ +************************************************************************** + You have just installed the movabletype. + Please read the documentation: http://www.movabletype.org/documentation/ + + Note that you should restart your Apache web server to ensure that + the %%PKGNAMEPREFIX%%MT configuration file is loaded, and then set + browser to http://localhost/MTcgi/mt.cgi + + Please add the following to your apache config, and restart: + +# +# Directives to allow use of %%PACKAGENAME%% as a CGI +# +%%APACHE22%% +%%APACHE24%% + Alias /MT "%%PREFIX%%/%%DATADIR%%/mt-static" + Alias /MTcgi "%%PREFIX%%/%%CGIDIR%%" + + +# +# This is to permit URL access to scripts/files in %%PACKAGENAME%% directory. +# + + Options ExecCGI +%%APACHE22%% Order allow,deny +%%APACHE22%% Allow from all +%%APACHE24%% Require all granted +%%APACHE24%% SetHandler cgi-script + + + Options None +%%APACHE22%% Order allow,deny +%%APACHE22%% Allow from all +%%APACHE24%% Require all granted + + +************************************************************************** Index: www/MT/files/pm.default.in =================================================================== --- www/MT/files/pm.default.in (revision 0) +++ www/MT/files/pm.default.in (working copy) @@ -0,0 +1,4 @@ +************************************************************************** + You have just installed the movabletype. + Please read the documentation: http://www.movabletype.org/documentation/ +************************************************************************** Index: www/MT/pkg-plist =================================================================== --- www/MT/pkg-plist (revision 382648) +++ www/MT/pkg-plist (working copy) @@ -3317,7 +3317,6 @@ %%LANG_RU%%%%DATADIR%%/mt-static/styles_ru.css @owner @group -%%APACHE%%%%APACHEETCDIR%%/Includes/MT.conf @dir %%CGIDIR%%/alt-tmpl @dir %%CGIDIR%%/extlib/MT/L10N @dir %%CGIDIR%%/import @@ -3325,4 +3324,3 @@ @dir %%CGIDIR%%/php/plugins @dir %%DATADIR%%/mt-static/support %%MYSQL%%@dir(mysql,mysql,) %%DB_DIR%% -%%MYSQL%%@dir(mysql,mysql,) /var/db/mysql