svn commit: r356025 - in head/www/lifetype: . files
John Marino
marino at FreeBSD.org
Sat May 31 22:57:58 UTC 2014
Author: marino
Date: Sat May 31 22:57:57 2014
New Revision: 356025
URL: http://svnweb.freebsd.org/changeset/ports/356025
QAT: https://qat.redports.org/buildarchive/r356025/
Log:
www/lifetype: stage support and a lot of cleanup
I can tell lifetype is a really old port. In addition to staging, I
took the liberty to:
* convert roll-your-own pkg-message to SUB_FILES/SUB_LIST
* convert roll-your-own PLIST to TMPPLIST
* Remove leading article from comment
* Fix double-extraction bug (templates and plugins extracted twice in
two different places) by using EXTRACT_ONLY
* Add a license (GPLv2)
* Use ".zip" instead of EXTRACT_SUFX for aesthetic reasons, the variable
didn't help since the rest of the file name was hardcoded
* Rewrite package list autogen and move it from pre-install target to
post-install target. It's needed because templates, plugins change all
the time and even without it's 4000 line plist (200kb+)
* Remove imagick option, it doesn't seem to be a php extension anymore
as far as I can tell. It was missing USE_PHP+= imagick in any case
* Remove references to imagick option, rewrite pre-patch warning
* Add USE_PHP+= gd to gd option to fix it
* Use TAR instead of EXTRACT_CMD or UNZIP_CMD to extract the templates and
plugins (unzip still used for main distfile). UNZIP_CMD current refers
to infozip which isn't a dependency. To avoid using EXTRACT_CMD and
adding a new dependency on infozip, TAR was deemed the best choice since
it clearly works fine.
This work was done independently of PR: ports/190214
Added:
head/www/lifetype/files/
head/www/lifetype/files/pkg-message.in (contents, props changed)
Deleted:
head/www/lifetype/pkg-message
Modified:
head/www/lifetype/Makefile
head/www/lifetype/pkg-descr
Modified: head/www/lifetype/Makefile
==============================================================================
--- head/www/lifetype/Makefile Sat May 31 21:43:21 2014 (r356024)
+++ head/www/lifetype/Makefile Sat May 31 22:57:57 2014 (r356025)
@@ -5,75 +5,69 @@ PORTNAME= lifetype
PORTVERSION= 1.2.11
CATEGORIES= www
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
- ${CONTRIBE_VERSION}__all_plugins${EXTRACT_SUFX} \
- ${CONTRIBE_VERSION}__all_templates${EXTRACT_SUFX}
+DISTFILES= ${DISTNAME}.zip \
+ ${CONTRIBE_VERSION}__all_plugins.zip \
+ ${CONTRIBE_VERSION}__all_templates.zip
+EXTRACT_ONLY= ${DISTNAME}.zip
MAINTAINER= clsung at FreeBSD.org
-COMMENT= A PHP and MySQL based blogging platform
+COMMENT= PHP and MySQL based blogging platform
-IGNOREFILES= ${CONTRIBE_VERSION}__all_plugins${EXTRACT_SUFX} \
- ${CONTRIBE_VERSION}__all_templates${EXTRACT_SUFX}
+LICENSE= GPLv2
+
+IGNOREFILES= ${CONTRIBE_VERSION}__all_plugins.zip \
+ ${CONTRIBE_VERSION}__all_templates.zip
CONTRIBE_VERSION=1.2
NO_BUILD= YES
-PKGMESSAGE= ${WRKDIR}/pkg-message
-PLIST= ${WRKDIR}/pkg-plist
+NO_MTREE= YES
PLOGDIR?= ${WWWDOCROOT}/${PLOGURL}
PLOGURL?= lifetype
USE_PHP= ctype mysql pcre session xml tokenizer
USES= zip
WANT_PHP_WEB= YES
WWWDOCROOT?= www
+SUB_FILES= pkg-message
+SUB_LIST= PLOGURL=${PLOGURL}
-OPTIONS_DEFINE= BIG5 GD IMAGEMAGICK
-OPTIONS_DEFAULT= GD
+OPTIONS_DEFINE= GD BIG5
+OPTIONS_DEFAULT=GD
BIG5_DESC= Big5 chinese template fix
-#
-NO_STAGE= yes
+
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGD}
+USE_PHP+= gd
RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/gd.so:${PORTSDIR}/${gd_DEPENDS}
.endif
-.if ${PORT_OPTIONS:MIMAGEMAGICK}
-RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:${PORTSDIR}/${imagick_DEPENDS}
-.endif
-
-.if ! ${PORT_OPTIONS:MGD} && ! ${PORT_OPTIONS:MIMAGEMAGICK}
+.if ! ${PORT_OPTIONS:MGD}
pre-patch:
- @${ECHO_CMD} "Without GD or ImageMagick support. No thumbnails will be generated at all."
+ @${ECHO_CMD} "Without GD support, no thumbnails will be generated."
.endif
post-extract:
.for x in plugins templates
- cd ${WRKSRC}/${x} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${CONTRIBE_VERSION}__all_${x}${EXTRACT_SUFX}
+ cd ${WRKSRC}/${x} && ${TAR} -xf ${DISTDIR}/${CONTRIBE_VERSION}__all_${x}.zip
.endfor
.if ${PORT_OPTIONS:MBIG5}
-
post-patch:
${FIND} ${WRKSRC}/templates -name "*.template" | \
${XARGS} ${REINPLACE_CMD} -e 's/|capitalize//g' -e 's/%b/%B/g'
${FIND} ${WRKSRC}/templates -name "*.template.bak" -delete
.endif
-pre-install:
- @${RM} -f ${PLIST}
- @cd ${WRKSRC} && ${FIND} -s . -type f | \
- ${SED} -e 's|^./||;s|^|${PLOGDIR}/|' > ${PLIST} \
- && ${ECHO_CMD} "@unexec ${RM} -fr %D/${PLOGDIR}/tmp/* 2>/dev/null || ${TRUE}" >> ${PLIST} \
- && ${FIND} -d * -type d | \
- ${SED} -e 's|^|@dirrm ${PLOGDIR}/|' >> ${PLIST} \
- && ${ECHO_CMD} @dirrm ${PLOGDIR} >> ${PLIST}
do-install:
- @${MKDIR} ${PREFIX}/${PLOGDIR}
- @${CP} -R ${WRKSRC}/ ${PREFIX}/${PLOGDIR}
- @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${PLOGDIR}
+ @${MKDIR} ${STAGEDIR}${PREFIX}/${PLOGDIR}
+ @${CP} -R ${WRKSRC}/ ${STAGEDIR}${PREFIX}/${PLOGDIR}
+ @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}${PREFIX}/${PLOGDIR}
post-install:
- @${SED} -e 's|%%PLOGURL%%|${PLOGURL}|' pkg-message > ${PKGMESSAGE}
- @${CAT} ${PKGMESSAGE}
+ @cd ${STAGEDIR}${PREFIX}; ${FIND} * \( -type f -or -type l \) | \
+ ${SORT} >> ${TMPPLIST}
+ @cd ${STAGEDIR}${PREFIX}; ${FIND} * -type d | ${AWK} '/\//' | ${SORT} -r | \
+ ${SED} -e '/share\/doc$$/d' -e '/share\/examples$$/d' \
+ -e 's/^/@dirrm /g' >> ${TMPPLIST}
.include <bsd.port.mk>
Added: head/www/lifetype/files/pkg-message.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/lifetype/files/pkg-message.in Sat May 31 22:57:57 2014 (r356025)
@@ -0,0 +1,12 @@
+======================================================================
+ **** NOTE ****
+For first use of LifeType, remember to point your browser to
+
+http://your.lifetype.host/%%PLOGURL%%/wizard.php
+
+and, remember to load your templates at
+
+http://your.lifetype.host/%%PLOGURL%%/admin.php?op=adminSettings
+
+and then click 'scanTemplates'
+======================================================================
Modified: head/www/lifetype/pkg-descr
==============================================================================
--- head/www/lifetype/pkg-descr Sat May 31 21:43:21 2014 (r356024)
+++ head/www/lifetype/pkg-descr Sat May 31 22:57:57 2014 (r356025)
@@ -5,4 +5,4 @@ makes the platform highly customizable a
customize the templates, since the presentation code is isolated from
the PHP code.
-WWW: http://www.lifetype.net/
+WWW: http://www.lifetype.net
More information about the svn-ports-all
mailing list