2003-06-16 03:31:18 +00:00
|
|
|
# New ports collection makefile for: MT
|
|
|
|
# Date created: Fri Jun 13 16:39:20 CST 2003
|
|
|
|
# Whom: Foxfair Hu <foxfair@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2004-12-04 16:39:14 +00:00
|
|
|
PORTNAME= MT
|
2004-01-17 15:28:30 +00:00
|
|
|
PORTVERSION= 2.661
|
2004-12-04 16:39:14 +00:00
|
|
|
PORTREVISION= 2
|
|
|
|
CATEGORIES= www
|
2004-11-22 11:15:25 +00:00
|
|
|
.if defined(WITH_OLD_DISTFILE)
|
2004-12-04 16:39:14 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION}-full-lib
|
2004-11-22 11:15:25 +00:00
|
|
|
.endif
|
2003-06-16 03:31:18 +00:00
|
|
|
|
2004-12-04 16:39:14 +00:00
|
|
|
MAINTAINER= arved@FreeBSD.org
|
|
|
|
COMMENT= A web-based personal publishing system for weblogs
|
2003-06-16 03:31:18 +00:00
|
|
|
|
2004-12-04 16:39:14 +00:00
|
|
|
RUN_DEPENDS= ${SITE_PERL}/HTML/Template.pm:${PORTSDIR}/www/p5-HTML-Template \
|
|
|
|
${SITE_PERL}/Image/Size.pm:${PORTSDIR}/graphics/p5-Image-Size \
|
|
|
|
${SITE_PERL}/CGI.pm:${PORTSDIR}/www/p5-CGI.pm
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_OPTIONAL_MODULES)
|
|
|
|
RUN_DEPENDS+= ${SITE_PERL}/LWP/UserAgent.pm:${PORTSDIR}/www/p5-libwww \
|
|
|
|
${SITE_PERL}/SOAP/Lite.pm:${PORTSDIR}/net/p5-SOAP-Lite \
|
|
|
|
${SITE_PERL}/${PERL_ARCH}/Image/Magick.pm:${PORTSDIR}/graphics/ImageMagick
|
|
|
|
.endif
|
|
|
|
|
|
|
|
DATADIR= www/data/mt
|
|
|
|
CGIDIR= www/cgi-bin/mt
|
2003-06-16 03:31:18 +00:00
|
|
|
|
|
|
|
.if defined(WITH_MYSQL)
|
2004-12-04 16:39:14 +00:00
|
|
|
DB_DIR?= /var/db/mysql/blog
|
|
|
|
USE_MYSQL= yes
|
2003-06-16 03:31:18 +00:00
|
|
|
.elif defined(WITH_POSTGRES)
|
2004-12-04 16:39:14 +00:00
|
|
|
DB_DIR?= ${PREFIX}/pgsql/data/blog
|
|
|
|
# Or somewhere defined in $PGDATA
|
|
|
|
|
|
|
|
RUN_DEPENDS+= postgres:${PORTSDIR}/databases/postgresql7
|
|
|
|
.elif defined(WITH_SQLITE)
|
|
|
|
DB_DIR?= ${PREFIX}/${CGIDIR}/db
|
|
|
|
RUN_DEPENDS+=\
|
|
|
|
${SITE_PERL}/${PERL_ARCH}/DBD/SQLite.pm:${PORTSDIR}/databases/p5-DBD-SQLite
|
2003-06-16 03:31:18 +00:00
|
|
|
.else
|
2004-12-04 16:39:14 +00:00
|
|
|
DB_DIR?= ${PREFIX}/${CGIDIR}/db
|
2003-06-16 03:31:18 +00:00
|
|
|
WITH_DEFAULTDB= yes
|
|
|
|
.endif
|
|
|
|
|
2004-12-04 16:39:14 +00:00
|
|
|
PLIST_SUB+= DATADIR=${DATADIR} CGIDIR=${CGIDIR}
|
2003-06-16 03:31:18 +00:00
|
|
|
|
|
|
|
USE_PERL5_RUN= yes
|
2004-12-04 16:39:14 +00:00
|
|
|
NO_BUILD= yes
|
|
|
|
RESTRICTED= License does not permit distribution
|
2003-06-16 03:31:18 +00:00
|
|
|
|
2004-11-22 11:15:25 +00:00
|
|
|
.if defined(WITH_OLD_DISTFILE)
|
2004-12-04 16:39:14 +00:00
|
|
|
PLIST_SUB+= OLD=""
|
2004-11-22 11:15:25 +00:00
|
|
|
.else
|
2004-12-04 16:39:14 +00:00
|
|
|
WRKSRC= ${WRKDIR}/MT-${PORTVERSION}-full-lib
|
|
|
|
PLIST_SUB+= OLD="@comment "
|
2004-11-22 11:15:25 +00:00
|
|
|
.endif
|
|
|
|
|
2003-06-16 03:31:18 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2004-11-27 15:09:54 +00:00
|
|
|
.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
|
2004-12-04 16:39:14 +00:00
|
|
|
IGNORE= \
|
|
|
|
: Because of licensing restrictions, you must fetch the source distribution\
|
|
|
|
manually. Goto http://www.movabletype.org/ register as if you are going\
|
|
|
|
to download 3.x, and then choosing 2.661 from the list after you log on.\
|
|
|
|
Download the file into ${DISTDIR}/, and then run make again
|
|
|
|
ECHO_MSG=${ECHO_CMD}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_OPTIONAL_MODULES)
|
|
|
|
.if ${PERL_LEVEL} < 500800
|
|
|
|
RUN_DEPENDS+= ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.if ${PERL_LEVEL} < 500601
|
|
|
|
RUN_DEPENDS+= ${SITE_PERL}/File/Spec.pm:${PORTSDIR}/devel/p5-File-Spec
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-everything::
|
|
|
|
@${ECHO_CMD} "Available switches:"
|
|
|
|
@${ECHO_CMD} "-------------------"
|
|
|
|
@${ECHO_CMD} "DB_DIR"
|
|
|
|
@${ECHO_CMD} " - Override the default database directory"
|
|
|
|
@${ECHO_CMD} " (${DB_DIR})"
|
|
|
|
.if !defined(WITH_OLD_DISTFILE)
|
|
|
|
@${ECHO_CMD} "WITH_OLD_DISTFILE"
|
|
|
|
@${ECHO_CMD} " - Use the pre 3.x distfile, which was available under"
|
|
|
|
@${ECHO_CMD} " a less restrictive license"
|
|
|
|
.endif
|
|
|
|
.if !defined(WITHOUT_OPTIONAL_MODULES)
|
|
|
|
@${ECHO_CMD} "WITHOUT_OPTIONAL_MODULES"
|
|
|
|
@${ECHO_CMD} " - Don't install optional perl modules, needed for"
|
|
|
|
@${ECHO_CMD} " Trackbacks, XML-RPC and thumbnails"
|
|
|
|
.endif
|
|
|
|
.if !defined(WITH_MYSQL)
|
|
|
|
@${ECHO_CMD} "WITH_MYSQL"
|
|
|
|
@${ECHO_CMD} " - Use MySQL instead of Berkeley DB as database backend"
|
|
|
|
.endif
|
|
|
|
.if !defined(WITH_MYSQL)
|
|
|
|
@${ECHO_CMD} "WITH_POSTGRES"
|
|
|
|
@${ECHO_CMD} " - Use PostgreSQL instead of Berkeley DB as database backend"
|
|
|
|
.endif
|
|
|
|
.if !defined(WITH_SQLITE)
|
|
|
|
@${ECHO_CMD} "WITH_POSTGRES"
|
|
|
|
@${ECHO_CMD} " - Use SQLite instead of Berkeley DB as database backend"
|
2003-07-14 05:29:22 +00:00
|
|
|
.endif
|
|
|
|
|
2003-06-16 03:31:18 +00:00
|
|
|
do-install:
|
|
|
|
@cd ${WRKSRC} && ${FIND} * -name "*.orig" -delete
|
2004-12-04 16:39:14 +00:00
|
|
|
@${ECHO_MSG} "Installing cgi under ${PREFIX}/${CGIDIR}"
|
2003-06-16 03:31:18 +00:00
|
|
|
@${MKDIR} ${PREFIX}/${CGIDIR}
|
2003-11-21 01:57:26 +00:00
|
|
|
@cd ${WRKSRC} && ${CP} -R *.cgi lib extlib plugins search_templates \
|
|
|
|
tmpl ${PREFIX}/${CGIDIR}
|
2003-06-16 03:31:18 +00:00
|
|
|
@${SED} -e 's#WWW.YOUR-SITE.COM/PATH/TO/MT/#${HOST}/cgi-bin/mt/#g' \
|
|
|
|
-e 's/# StaticWebPath/StaticWebPath/g' \
|
|
|
|
-e 's#path/to/static-files#mt#g' \
|
|
|
|
-e 's/# NoHTMLEntities 1/NoHTMLEntities 1/g' \
|
2004-01-03 05:38:28 +00:00
|
|
|
${WRKSRC}/mt.cfg > ${PREFIX}/${CGIDIR}/mt.cfg.dist
|
|
|
|
[ -e ${PREFIX}/${CGIDIR}/mt.cfg ] || ${CP} ${PREFIX}/${CGIDIR}/mt.cfg.dist ${PREFIX}/${CGIDIR}/mt.cfg
|
2003-12-13 13:33:27 +00:00
|
|
|
${SED} -e 's#$$MT_DIR, .schemas.#"${PREFIX}/${DATADIR}/schemas"#' \
|
|
|
|
${WRKSRC}/mt-load.cgi > ${PREFIX}/${CGIDIR}/mt-load.cgi
|
2004-12-04 16:39:14 +00:00
|
|
|
@${ECHO_MSG} "Installing data under ${PREFIX}/${DATADIR}"
|
2003-06-16 03:31:18 +00:00
|
|
|
@${MKDIR} ${PREFIX}/${DATADIR}
|
2004-11-22 11:15:25 +00:00
|
|
|
@cd ${WRKSRC} && ${CP} -R docs images \
|
2003-11-21 01:57:26 +00:00
|
|
|
index.html schemas styles.css \
|
2003-06-16 03:31:18 +00:00
|
|
|
${PREFIX}/${DATADIR}
|
2004-11-22 11:15:25 +00:00
|
|
|
.if defined(WITH_OLD_DISTFILE)
|
|
|
|
@cd ${WRKSRC}; ${INSTALL_DATA} LICENSE LICENSE-COMMERCIAL \
|
|
|
|
${PREFIX}/${DATADIR}
|
|
|
|
.endif
|
2003-06-16 03:31:18 +00:00
|
|
|
.if defined(WITH_DEFAULTDB)
|
|
|
|
@${MKDIR} -m 755 ${DB_DIR}
|
|
|
|
@${CHOWN} -R www:www ${DB_DIR}
|
|
|
|
.endif
|
|
|
|
@${CHOWN} -R www:www ${PREFIX}/${CGIDIR} ${PREFIX}/${DATADIR}
|
|
|
|
|
|
|
|
post-install:
|
2004-12-04 16:39:14 +00:00
|
|
|
@${ECHO_MSG} "Please read the documentation about initializing a blog DB in ${DB_DIR}"
|
2003-06-16 03:31:18 +00:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|