summaryrefslogtreecommitdiffstats
path: root/www/MT
diff options
context:
space:
mode:
authorarved <arved@FreeBSD.org>2004-12-04 16:39:14 +0000
committerarved <arved@FreeBSD.org>2004-12-04 16:39:14 +0000
commitee988a2b9024ab4568efb7ebae6d4b315a437dc5 (patch)
tree07019db334e939038acc7c2ba34725706a4e306b /www/MT
parentfeec3b73db8ddcc55963b0506dc4799f18d2985e (diff)
downloadFreeBSD-ports-ee988a2b9024ab4568efb7ebae6d4b315a437dc5.zip
FreeBSD-ports-ee988a2b9024ab4568efb7ebae6d4b315a437dc5.tar.gz
- Overhaul RUN_DEPENDS:
* Remove pkg-message which pointed to optional and required perl modules * Add required perl modules to RUN_DEPENDS * Add optional perl modules to RUN_DEPENDS unless WITHOUT_OPTIONAL_MODULES defined * Add WITH_SQLITE knob for SQLite Suppport (This is untested) * add pre-everything:: Message to explain knobs * Bump PORTREVISION Initial Suggestion from: krion - Don't mess with ECHO_MSG to print a beautiful IGNORE message. - pkg-descr:reword and whitespace fixes, Add Author: section
Diffstat (limited to 'www/MT')
-rw-r--r--www/MT/Makefile111
-rw-r--r--www/MT/pkg-descr9
-rw-r--r--www/MT/pkg-message20
3 files changed, 86 insertions, 54 deletions
diff --git a/www/MT/Makefile b/www/MT/Makefile
index 6cf4ba6..9bd293c 100644
--- a/www/MT/Makefile
+++ b/www/MT/Makefile
@@ -5,58 +5,112 @@
# $FreeBSD$
#
-PORTNAME= MT
+PORTNAME= MT
PORTVERSION= 2.661
-PORTREVISION= 1
-CATEGORIES= www
+PORTREVISION= 2
+CATEGORIES= www
.if defined(WITH_OLD_DISTFILE)
-DISTNAME= ${PORTNAME}-${PORTVERSION}-full-lib
+DISTNAME= ${PORTNAME}-${PORTVERSION}-full-lib
.endif
-MAINTAINER= arved@FreeBSD.org
-COMMENT= A web-based personal publishing system like weblogs
+MAINTAINER= arved@FreeBSD.org
+COMMENT= A web-based personal publishing system for weblogs
-DATADIR= www/data/mt
-CGIDIR= www/cgi-bin/mt
+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
.if defined(WITH_MYSQL)
-DB_DIR= /var/db/mysql/blog
-USE_MYSQL= yes
+DB_DIR?= /var/db/mysql/blog
+USE_MYSQL= yes
.elif defined(WITH_POSTGRES)
-DB_DIR= ${PREFIX}/pgsql/data/blog # Or somewhere defined in $PGDATA
-RUN_DEPENDS= postgres:${PORTSDIR}/databases/postgresql7
+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
.else
-DB_DIR= ${PREFIX}/${CGIDIR}/db
+DB_DIR?= ${PREFIX}/${CGIDIR}/db
WITH_DEFAULTDB= yes
.endif
-PLIST_SUB+= DATADIR=${DATADIR} CGIDIR=${CGIDIR}
+PLIST_SUB+= DATADIR=${DATADIR} CGIDIR=${CGIDIR}
USE_PERL5_RUN= yes
-NO_BUILD= yes
-RESTRICTED= "License does not permit distribution"
+NO_BUILD= yes
+RESTRICTED= License does not permit distribution
.if defined(WITH_OLD_DISTFILE)
-PLIST_SUB+= OLD=""
+PLIST_SUB+= OLD=""
.else
-WRKSRC= ${WRKDIR}/MT-${PORTVERSION}-full-lib
-PLIST_SUB+= OLD="@comment "
+WRKSRC= ${WRKDIR}/MT-${PORTVERSION}-full-lib
+PLIST_SUB+= OLD="@comment "
.endif
.include <bsd.port.pre.mk>
.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
-ECHO_MSG=/usr/bin/printf
-IGNORE= :\n\
-Because of licensing restrictions, you must fetch the source distribution\n\
-manually. Goto http://www.movabletype.org/ register as if you are going\n\
-to download 3.x, and then choosing 2.661 from the list after you log on.\n\
-Download the file into ${DISTDIR}/, and then run make again.\n
+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"
.endif
do-install:
@cd ${WRKSRC} && ${FIND} * -name "*.orig" -delete
- @${ECHO_MSG} "Installing cgi ${PREFIX}/${CGIDIR}"
+ @${ECHO_MSG} "Installing cgi under ${PREFIX}/${CGIDIR}"
@${MKDIR} ${PREFIX}/${CGIDIR}
@cd ${WRKSRC} && ${CP} -R *.cgi lib extlib plugins search_templates \
tmpl ${PREFIX}/${CGIDIR}
@@ -68,7 +122,7 @@ do-install:
[ -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}"
+ @${ECHO_MSG} "Installing data under ${PREFIX}/${DATADIR}"
@${MKDIR} ${PREFIX}/${DATADIR}
@cd ${WRKSRC} && ${CP} -R docs images \
index.html schemas styles.css \
@@ -84,7 +138,6 @@ do-install:
@${CHOWN} -R www:www ${PREFIX}/${CGIDIR} ${PREFIX}/${DATADIR}
post-install:
- @${CAT} ${PKGMESSAGE}
- @${ECHO_MSG} "Please read the docs to initialize a blog DB in ${DB_DIR}"
+ @${ECHO_MSG} "Please read the documentation about initializing a blog DB in ${DB_DIR}"
.include <bsd.port.post.mk>
diff --git a/www/MT/pkg-descr b/www/MT/pkg-descr
index 80077c0..df7aef9 100644
--- a/www/MT/pkg-descr
+++ b/www/MT/pkg-descr
@@ -1,6 +1,5 @@
-Movable Type is a web-based personal publishing system. It is designed to
-ease maintenance of regularly-updated news or journal sites, like weblogs.
-It contains features common to many other such systems (hosted locally on
-your server, template-driven, highly-configurable, permalinks, etc.).
+Movable Type is a web-based personal publishing system. It is designed to
+ease maintenance of regularly-updated news, journal sites and weblogs.
-WWW: http://www.movabletype.org/
+WWW: http://www.movabletype.org/
+Author: Ben & Mena Trott
diff --git a/www/MT/pkg-message b/www/MT/pkg-message
deleted file mode 100644
index 599a760..0000000
--- a/www/MT/pkg-message
+++ /dev/null
@@ -1,20 +0,0 @@
-Postinstall adjustment is needed at the first time. The following list is
-some PERL modules needed for running MT, you can also install them from
-FreeBSD ports:
-
-HTML::Template is from www/p5-HTML-Template
-Image::Size is from graphics/p5-Image-Size
-File::Spec is from devel/p5-File-Spec
-CGI::Cookie is from www/p5-CGI.pm
-LWP::UserAgent is from www/p5-libwww
-SOAP::Lite is from net/p5-SOAP-Lite
-File::Temp is form devel/p5-File-Temp
-ImageMagick support is from graphics/ImageMagick
-
-DB Modules are depend on your choice.
-
-To upgrade a previous verion of MT: Do NOT do this from FreeBSD ports
-structure! Instead, go to download the 'Upgrade Version' file from this
-link:
-
- http://www.movabletype.org/download.shtml
OpenPOWER on IntegriCloud