|
Lines 2-9
Link Here
|
| 2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
| 3 |
|
3 |
|
| 4 |
PORTNAME= MT |
4 |
PORTNAME= MT |
| 5 |
PORTVERSION= 5.2.11 |
5 |
PORTVERSION= 5.2.12 |
| 6 |
#PORTREVISION= 1 |
|
|
| 7 |
PORTEPOCH= 1 |
6 |
PORTEPOCH= 1 |
| 8 |
CATEGORIES?= www |
7 |
CATEGORIES?= www |
| 9 |
MASTER_SITES?= http://www.movabletype.org/downloads/stable/\ |
8 |
MASTER_SITES?= http://www.movabletype.org/downloads/stable/\ |
|
Lines 35-50
Link Here
|
| 35 |
PGSQL_DESC= PostgreSQL database support[obsolete] |
34 |
PGSQL_DESC= PostgreSQL database support[obsolete] |
| 36 |
SQLITE_DESC= SQLite3 database support[obsolete] |
35 |
SQLITE_DESC= SQLite3 database support[obsolete] |
| 37 |
SQLITE2_DESC= SQLite2 database support[obsolete] |
36 |
SQLITE2_DESC= SQLite2 database support[obsolete] |
|
|
37 |
APACHE_USE= APACHE_BUILD=22+ |
| 38 |
|
38 |
|
| 39 |
.include <bsd.port.options.mk> |
|
|
| 40 |
|
39 |
|
| 41 |
DATADIR= www/data |
40 |
DATADIR= www/data |
| 42 |
CGIDIR= www/cgi-bin/mt |
41 |
CGIDIR= www/cgi-bin/mt |
| 43 |
|
42 |
|
| 44 |
SUB_LIST+= CGIDIR=${CGIDIR}\ |
43 |
SUB_LIST+= CGIDIR=${CGIDIR}\ |
| 45 |
PACKAGENAME=${PKGNAMEPREFIX}${PORTNAME} |
44 |
PACKAGENAME=${PKGNAMEPREFIX}${PORTNAME} \ |
|
|
45 |
PKGNAMEPREFIX=${PKGNAMEPREFIX} |
| 46 |
PLIST_SUB+= DATADIR=${DATADIR} CGIDIR=${CGIDIR} DB_DIR=${DB_DIR}\ |
46 |
PLIST_SUB+= DATADIR=${DATADIR} CGIDIR=${CGIDIR} DB_DIR=${DB_DIR}\ |
| 47 |
WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} |
47 |
WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} |
|
|
48 |
SUB_FILES= pm.apache pm.default |
| 49 |
PKGMESSAGE= ${WRKDIR}/pkg-message |
| 48 |
|
50 |
|
| 49 |
USES= perl5 shebangfix |
51 |
USES= perl5 shebangfix |
| 50 |
USE_PERL5= run |
52 |
USE_PERL5= run |
|
Lines 51-57
Link Here
|
| 51 |
SHEBANG_FILES= *.cgi |
53 |
SHEBANG_FILES= *.cgi |
| 52 |
NO_ARCH= yes |
54 |
NO_ARCH= yes |
| 53 |
NO_BUILD= yes |
55 |
NO_BUILD= yes |
| 54 |
MT_DOCS_URL?= http://www.movabletype.org/documentation/ |
|
|
| 55 |
MT_UPGRADE_URL?=http://www.movabletype.org/documentation/installation/upgrade-movable-type.html |
56 |
MT_UPGRADE_URL?=http://www.movabletype.org/documentation/installation/upgrade-movable-type.html |
| 56 |
|
57 |
|
| 57 |
MT_LANG?= EN |
58 |
MT_LANG?= EN |
|
Lines 61-66
Link Here
|
| 61 |
PLIST_SUB+= LANG_RU="@comment " |
62 |
PLIST_SUB+= LANG_RU="@comment " |
| 62 |
.endif |
63 |
.endif |
| 63 |
|
64 |
|
|
|
65 |
.include <bsd.port.options.mk> |
| 66 |
|
| 64 |
.if ${PORT_OPTIONS:MOPTIONAL_MODULES} |
67 |
.if ${PORT_OPTIONS:MOPTIONAL_MODULES} |
| 65 |
RUN_DEPENDS+= p5-HTML-Parser>=0:${PORTSDIR}/www/p5-HTML-Parser\ |
68 |
RUN_DEPENDS+= p5-HTML-Parser>=0:${PORTSDIR}/www/p5-HTML-Parser\ |
| 66 |
p5-libwww>=0:${PORTSDIR}/www/p5-libwww\ |
69 |
p5-libwww>=0:${PORTSDIR}/www/p5-libwww\ |
|
Lines 99-109
Link Here
|
| 99 |
.endif |
102 |
.endif |
| 100 |
.if ${PORT_OPTIONS:MMYSQL} |
103 |
.if ${PORT_OPTIONS:MMYSQL} |
| 101 |
USE_MYSQL= server |
104 |
USE_MYSQL= server |
| 102 |
DB_DIR?= ${BASEDIR}/var/db/mysql/WEBLOG_DATABASEDIR |
105 |
DB_DIR?= /var/db/mysql/WEBLOG_DATABASEDIR |
| 103 |
RUN_DEPENDS+= p5-DBD-mysql>=2.9005:${PORTSDIR}/databases/p5-DBD-mysql |
106 |
RUN_DEPENDS+= p5-DBD-mysql>=2.9005:${PORTSDIR}/databases/p5-DBD-mysql |
| 104 |
.endif |
107 |
.endif |
| 105 |
.if ${PORT_OPTIONS:MPGSQL} |
108 |
.if ${PORT_OPTIONS:MPGSQL} |
| 106 |
USES+= pgsql |
109 |
USES+= pgsql |
| 107 |
WANT_PGSQL= server |
110 |
WANT_PGSQL= server |
| 108 |
RUN_DEPENDS+= p5-DBD-Pg>=1.32:${PORTSDIR}/databases/p5-DBD-Pg |
111 |
RUN_DEPENDS+= p5-DBD-Pg>=1.32:${PORTSDIR}/databases/p5-DBD-Pg |
| 109 |
.endif |
112 |
.endif |
|
Lines 125-144
Link Here
|
| 125 |
RUN_DEPENDS+= p5-DBD-ODBC>=1.13:${PORTSDIR}/databases/p5-DBD-ODBC |
128 |
RUN_DEPENDS+= p5-DBD-ODBC>=1.13:${PORTSDIR}/databases/p5-DBD-ODBC |
| 126 |
.endif |
129 |
.endif |
| 127 |
|
130 |
|
| 128 |
.if ${PORT_OPTIONS:MAPACHE} |
|
|
| 129 |
USE_APACHE_BUILD= 22+ |
| 130 |
SUB_FILES+= MT.conf |
| 131 |
SUB_LIST+= APACHEETCDIR=${PREFIX}/${APACHEETCDIR} |
| 132 |
.endif |
| 133 |
|
| 134 |
.include <bsd.port.pre.mk> |
| 135 |
|
| 136 |
.if ${PORT_OPTIONS:MAPACHE} && (${APACHE_VERSION} <= 22) |
| 137 |
SUB_LIST+= APACHE22="" APACHE24="\#" MODULE=mod_alias.c |
| 138 |
.elif ${PORT_OPTIONS:MAPACHE} && (${APACHE_VERSION} >= 24) |
| 139 |
SUB_LIST+= APACHE22="\#" APACHE24="" MODULE=alias_module |
| 140 |
.endif |
| 141 |
|
| 142 |
.if ${PORT_OPTIONS:MPSGI} |
131 |
.if ${PORT_OPTIONS:MPSGI} |
| 143 |
RUN_DEPENDS+= p5-CGI-PSGI>0:${PORTSDIR}/www/p5-CGI-PSGI\ |
132 |
RUN_DEPENDS+= p5-CGI-PSGI>0:${PORTSDIR}/www/p5-CGI-PSGI\ |
| 144 |
p5-CGI-Emulate-PSGI>=0.06:${PORTSDIR}/www/p5-CGI-Emulate-PSGI\ |
133 |
p5-CGI-Emulate-PSGI>=0.06:${PORTSDIR}/www/p5-CGI-Emulate-PSGI\ |
|
Lines 165-204
Link Here
|
| 165 |
.endif |
154 |
.endif |
| 166 |
|
155 |
|
| 167 |
do-install: |
156 |
do-install: |
| 168 |
@${FIND} ${WRKSRC}/* -name "*.orig" -delete |
157 |
${FIND} ${WRKSRC}/ -name "*.orig" -delete |
| 169 |
@${ECHO_MSG} "Installing cgi under ${PREFIX}/${CGIDIR}/" |
158 |
@${ECHO_MSG} "Installing cgi under ${PREFIX}/${CGIDIR}/" |
| 170 |
@${MKDIR} ${STAGEDIR}${PREFIX}/${CGIDIR} |
159 |
@${MKDIR} ${STAGEDIR}${PREFIX}/${CGIDIR}/alt-tmpl \ |
| 171 |
@cd ${WRKSRC} && ${CP} -R *.cgi mt.psgi mt-config.cgi-original \ |
160 |
${STAGEDIR}${PREFIX}/${CGIDIR}/import \ |
| 172 |
alt-tmpl default_templates extlib import lib php plugins \ |
161 |
${STAGEDIR}${PREFIX}/${DATADIR} |
| 173 |
search_templates themes tmpl tools COPYING index.html readme.html \ |
162 |
${MKDIR} ${STAGEDIR}${DB_DIR} |
| 174 |
${STAGEDIR}${PREFIX}/${CGIDIR} |
163 |
.for tree in tools themes default_templates extlib plugins search_templates \ |
|
|
164 |
lib tmpl php |
| 165 |
(cd ${WRKSRC} && \ |
| 166 |
${COPYTREE_SHARE} ${tree} ${STAGEDIR}${PREFIX}/${CGIDIR}/) |
| 167 |
.endfor |
| 168 |
(cd ${WRKSRC} && \ |
| 169 |
${INSTALL_DATA} *.cgi mt-config.cgi-original mt.psgi COPYING \ |
| 170 |
index.html readme.html ${STAGEDIR}${PREFIX}/${CGIDIR}/) |
| 175 |
@${ECHO_MSG} "Installing data under ${PREFIX}/${DATADIR}/" |
171 |
@${ECHO_MSG} "Installing data under ${PREFIX}/${DATADIR}/" |
| 176 |
@${MKDIR} ${STAGEDIR}${PREFIX}/${DATADIR} |
172 |
(cd ${WRKSRC} && \ |
| 177 |
@cd ${WRKSRC} && ${CP} -R mt-static ${STAGEDIR}${PREFIX}/${DATADIR} |
173 |
${COPYTREE_SHARE} mt-static ${STAGEDIR}${PREFIX}/${DATADIR}) |
| 178 |
@${MKDIR} ${STAGEDIR}${DB_DIR} |
|
|
| 179 |
|
174 |
|
| 180 |
post-install: |
175 |
post-stage: |
| 181 |
@${ECHO_MSG} "*****************************************************************" |
|
|
| 182 |
@${ECHO_CMD} "" |
| 183 |
@${ECHO_MSG} "You have just installed the movabletype." |
| 184 |
@${ECHO_CMD} "" |
| 185 |
.if ${PORT_OPTIONS:MAPACHE} |
176 |
.if ${PORT_OPTIONS:MAPACHE} |
| 186 |
@${ECHO_MSG} "Note that you should restart your Apache web server to ensure that" |
177 |
# APACHE_VERSION hasn't been evaluated yet, so .if can't be used |
| 187 |
@${ECHO_MSG} "the "${PKGNAMEPREFIX}"MT configuration file is loaded." |
178 |
${REINPLACE_CMD} -e 's|%%APACHE${APACHE_VERSION}%%||' \ |
| 188 |
@${ECHO_CMD} "" |
179 |
-e '/^%%APACHE/d' ${WRKDIR}/pm.apache |
| 189 |
@${ECHO_MSG} "Then browse to http://localhost/MTcgi/mt.cgi" |
180 |
${MV} ${WRKDIR}/pm.apache ${WRKDIR}/pkg-message |
| 190 |
@${ECHO_CMD} "" |
|
|
| 191 |
@${ECHO_MSG} "Please add the following to your apache config, and restart." |
| 192 |
@${ECHO_CMD} "" |
| 193 |
@${CAT} ${WRKDIR}/MT.conf |
| 194 |
@${ECHO_CMD} "" |
| 195 |
@${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/Includes |
| 196 |
${INSTALL_DATA} ${WRKDIR}/MT.conf \ |
| 197 |
${STAGEDIR}${PREFIX}/${APACHEETCDIR}/Includes/MT.conf |
| 198 |
.else |
181 |
.else |
| 199 |
@${ECHO_CMD} "" |
182 |
${MV} ${WRKDIR}/pm.default ${WRKDIR}/pkg-message |
| 200 |
.endif |
183 |
.endif |
| 201 |
@${ECHO_MSG} "Please read the documentation: ${MT_DOCS_URL}" |
|
|
| 202 |
@${ECHO_CMD} "" |
| 203 |
|
184 |
|
| 204 |
.include <bsd.port.post.mk> |
185 |
.include <bsd.port.mk> |