1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Update to 5.2.9.

- Support staging.
- Fix the DB option.

PR:		ports/185220
Submitted by:	Takefu <takefu@airport.fm> (maintainer)
This commit is contained in:
Raphael Kubo da Costa 2013-12-29 21:48:08 +00:00
parent 6efb941c7e
commit 40aa950779
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=338047
6 changed files with 51 additions and 46 deletions

View File

@ -7,8 +7,6 @@ DISTNAME= MTOS-${PORTVERSION}-${PKGNAMEPREFIX:S,-,,}
COMMENT= Russian localization of the MovableType publishing system
IGNORE= source file not found
MASTERDIR= ${.CURDIR}/../../www/MT
MT_LANG= ${PKGNAMEPREFIX:S,-,,U}
CONFLICTS= MT-[2-5].* de-MT-[2-5].* fr-MT-[2-5].* ja-MT-[2-5].*
@ -16,5 +14,4 @@ CONFLICTS= MT-[2-5].* de-MT-[2-5].* fr-MT-[2-5].* ja-MT-[2-5].*
MT_DOCS_URL= https://github.com/saahov/movabletype/wiki
MT_UPGRADE_URL= http://movable-type.ru/wiki/%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_Movable_Type
NO_STAGE= yes
.include "${MASTERDIR}/Makefile"

View File

@ -2,11 +2,12 @@
# $FreeBSD$
PORTNAME= MT
PORTVERSION= 5.2.7
PORTVERSION= 5.2.9
PORTEPOCH= 1
CATEGORIES?= www
MASTER_SITES?= http://www.movabletype.org/downloads/stable/\
http://www.movabletype.org/downloads/archives/5.x/
http://www.movabletype.org/downloads/archives/5.x/\
http://www.movabletype.jp/downloads/stable/
DISTNAME?= MTOS-${PORTVERSION}
MAINTAINER?= takefu@airport.fm
@ -18,33 +19,28 @@ RUN_DEPENDS+= p5-DBI>=1.21:${PORTSDIR}/databases/p5-DBI \
p5-Image-Size>=0:${PORTSDIR}/graphics/p5-Image-Size
NO_OPTIONS_SORT= yes
OPTIONS_DEFINE= APACHE MYSQL SSL TLS\
OPTIONAL_MODULES ADDITIONAL_MODULES\
PGSQL ORACLE ODBC SQLITE2 SQLITE PSGI
OPTIONS_DEFINE= APACHE SSL TLS PSGI\
OPTIONAL_MODULES ADDITIONAL_MODULES
OPTIONS_DEFAULT= MYSQL OPTIONAL_MODULES
OPTIONS_SINGLE= DB
OPTIONS_SINGLE_DB= MYSQL PGSQL ORACLE ODBC SQLITE2 SQLITE
OPTIONAL_MODULES_DESC= Optional Perl Modules
ADDITIONAL_MODULES_DESC=Additional Perl modules
PSGI_DESC= Perl Web Server Gateway Interface
DB_DESC= Choose Database
PGSQL_DESC= PostgreSQL database support[obsolete]
SQLITE_DESC= SQLite3 database support[obsolete]
SQLITE2_DESC= SQLite2 database support[obsolete]
NO_STAGE= yes
.include <bsd.port.options.mk>
DATADIR= www/data
CGIDIR= www/cgi-bin/mt
PLIST_SUB+= DATADIR=${DATADIR}\
CGIDIR=${CGIDIR}\
DB_DIR=${DB_DIR}
PLIST_SUB+= DATADIR=${DATADIR} CGIDIR=${CGIDIR} DB_DIR=${DB_DIR}
SUB_FILES+= pkg-install
SUB_LIST+= DATADIR=${DATADIR}\
CGIDIR=${CGIDIR}\
SUB_LIST+= DATADIR=${DATADIR} CGIDIR=${CGIDIR} DB_DIR=${DB_DIR}\
PACKAGENAME=${PKGNAMEPREFIX}${PORTNAME}\
DB_DIR=${DB_DIR}\
WWWOWN=${WWWOWN}\
WWWGRP=${WWWGRP}
WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} STAGEDIR=${STAGEDIR}
USES= perl5
USE_PERL5= run
@ -95,25 +91,25 @@ RUN_DEPENDS+= p5-Crypt-SSLeay>=0:${PORTSDIR}/security/p5-Crypt-SSLeay\
RUN_DEPENDS+= p5-Net-SMTP-TLS>=0:${PORTSDIR}/mail/p5-Net-SMTP-TLS
. endif
.endif
.if ${PORT_OPTIONS:MMYSQL} && empty(PORT_OPTIONS:MPGSQL)
.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= server
DB_DIR?= ${BASEDIR}/var/db/mysql/WEBLOG_DATABASEDIR
RUN_DEPENDS+= p5-DBD-mysql>=2.9005:${PORTSDIR}/databases/p5-DBD-mysql
.endif
.if ${PORT_OPTIONS:MPGSQL} && empty(PORT_OPTIONS:MMYSQL)
.if ${PORT_OPTIONS:MPGSQL}
USE_PGSQL= server
RUN_DEPENDS+= p5-DBD-Pg>=1.32:${PORTSDIR}/databases/p5-DBD-Pg
.endif
.if empty${PORT_OPTIONS:MPGSQL} && empty(PORT_OPTIONS:MMYSQL)
.if empty(PORT_OPTIONS:MPGSQL) && empty(PORT_OPTIONS:MMYSQL)
DB_DIR?= ${PREFIX}/${CGIDIR}/db
. if ${PORT_OPTIONS:MSQLITE} && empty(PORT_OPTIONS:MSQLITE2)
. if ${PORT_OPTIONS:MSQLITE}
USE_SQLITE= yes
RUN_DEPENDS+= p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite
. elif ${PORT_OPTIONS:MSQLITE2} && empty(PORT_OPTIONS:MSQLITE)
. endif
. if ${PORT_OPTIONS:MSQLITE2}
USE_SQLITE= 2
RUN_DEPENDS+= p5-DBD-SQLite2>=0:${PORTSDIR}/databases/p5-DBD-SQLite2
. endif
WITH_DEFAULTDB= yes
.endif
.if ${PORT_OPTIONS:MORACLE}
RUN_DEPENDS+= p5-DBD-Oracle>=0.19:${PORTSDIR}/databases/p5-DBD-Oracle
@ -125,7 +121,14 @@ RUN_DEPENDS+= p5-DBD-ODBC>=1.13:${PORTSDIR}/databases/p5-DBD-ODBC
USE_APACHE_RUN= 22+
SUB_FILES+= MT.conf
SUB_LIST+= APACHEETCDIR=${PREFIX}/${APACHEETCDIR}
PLIST_SUB+= APACHE=""
.include <bsd.port.pre.mk>
. if ${APACHE_VERSION} == 24
PLIST_SUB+= APACHE="" APACHE24=""
SUB_LIST+= APACHE24=""
. else
PLIST_SUB+= APACHE="" APACHE24="\#"
SUB_LIST+= APACHE24="\#"
. endif
.else
PLIST_SUB+= APACHE="@comment "
.endif
@ -159,17 +162,18 @@ pre-everything::
do-install:
@cd ${WRKSRC} && ${FIND} * -name "*.orig" -delete
@${ECHO_MSG} "Installing cgi under ${PREFIX}/${CGIDIR}/"
@${MKDIR} ${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 \
${PREFIX}/${CGIDIR}
${STAGEDIR}${PREFIX}/${CGIDIR}
@${ECHO_MSG} "Installing data under ${PREFIX}/${DATADIR}/"
@${MKDIR} ${PREFIX}/${DATADIR}
@cd ${WRKSRC} && ${CP} -R mt-static ${PREFIX}/${DATADIR}
@${MKDIR} ${STAGEDIR}${PREFIX}/${DATADIR}
@cd ${WRKSRC} && ${CP} -R mt-static ${STAGEDIR}${PREFIX}/${DATADIR}
post-install:
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL ${WITH_DEFAULTDB}
@${SETENV} PKG_PREFIX=${PREFIX} STAGE=${STAGEDIR}\
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL ${DB_DIR}
@${ECHO_MSG} "*****************************************************************"
@${ECHO_CMD} ""
@${ECHO_MSG} "You have just installed the movabletype."
@ -184,9 +188,9 @@ post-install:
@${ECHO_CMD} ""
@${CAT} ${WRKDIR}/MT.conf
@${ECHO_CMD} ""
@${MKDIR} ${PREFIX}/${APACHEETCDIR}/Includes
@${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/Includes
@${INSTALL_DATA} ${WRKDIR}/MT.conf \
${PREFIX}/${APACHEETCDIR}/Includes/MT.conf
${STAGEDIR}${PREFIX}/${APACHEETCDIR}/Includes/MT.conf
.else
@${ECHO_CMD} ""
.endif

View File

@ -1,2 +1,4 @@
SHA256 (MTOS-5.2.7.tar.gz) = 74078416b80aa5314fd6e85c7fa562d1f77a0e236a0137338c50c88b27185653
SIZE (MTOS-5.2.7.tar.gz) = 7965020
SHA256 (MTOS-5.2.9.tar.gz) = 14d0dfeec17c28a77da101d9d69e17e45cb4f1fae322ac7529fb2378f5d76e52
SIZE (MTOS-5.2.9.tar.gz) = 7965907
SHA256 (MTOS-5.2.9-ru.tar.gz) = cd088a6f330292ed37efa8b3f0c2d4d13b22e54f274bf0237932ad6b44533254
SIZE (MTOS-5.2.9-ru.tar.gz) = 8095257

View File

@ -13,6 +13,8 @@
Options None
Order allow,deny
Allow from all
%%APACHE24%% Require all granted
%%APACHE24%% SetHandler cgi-script
</Directory>
<Directory "%%PREFIX%%/%%DATADIR%%/mt-static">
Options None

View File

@ -4,21 +4,21 @@ case $2 in
;;
POST-INSTALL)
if [ -n "$3" ]; then
mkdir -p -m 755 %%DB_DIR%%
chown -R %%WWWOWN%%:%%WWWGRP%% %%DB_DIR%%
if [ "X"$3 != "X" ]; then
mkdir -p -m 755 ${STAGE}%%DB_DIR%%
chown -R %%WWWOWN%%:%%WWWGRP%% ${STAGE}%%DB_DIR%%
fi
chown -R %%WWWOWN%%:%%WWWGRP%%\
%%PREFIX%%/%%CGIDIR%%\
%%PREFIX%%/%%DATADIR%%
${STAGE}%%PREFIX%%/%%CGIDIR%%\
${STAGE}%%PREFIX%%/%%DATADIR%%
;;
*)
;;
esac
mkdir -p -m 755 %%PREFIX%%/%%CGIDIR%%/import\
%%PREFIX%%/%%CGIDIR%%/alt-tmpl\
%%PREFIX%%/%%CGIDIR%%/extlib/MT/L10N\
%%PREFIX%%/%%CGIDIR%%/php/extlib/smarty/demo/templates_c\
%%PREFIX%%/%%CGIDIR%%/php/plugins\
%%PREFIX%%/%%DATADIR%%/mt-static/support
mkdir -p -m 755 ${STAGE}%%PREFIX%%/%%CGIDIR%%/import\
${STAGE}%%PREFIX%%/%%CGIDIR%%/alt-tmpl\
${STAGE}%%PREFIX%%/%%CGIDIR%%/extlib/MT/L10N\
${STAGE}%%PREFIX%%/%%CGIDIR%%/php/extlib/smarty/demo/templates_c\
${STAGE}%%PREFIX%%/%%CGIDIR%%/php/plugins\
${STAGE}%%PREFIX%%/%%DATADIR%%/mt-static/support
exit

View File

@ -3571,7 +3571,7 @@
@dirrm %%CGIDIR%%/php/lib
@dirrm %%CGIDIR%%/php/tmpl
@dirrm %%CGIDIR%%/php
@dirrmtry %%CGIDIR%%/db
@dirrmtry %%DB_DIR%%
@dirrm %%CGIDIR%%
@dirrm %%DATADIR%%/mt-static/js/flash
@dirrm %%DATADIR%%/mt-static/js/editor/editor