aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2014-06-01 06:57:57 +0800
committermarino <marino@FreeBSD.org>2014-06-01 06:57:57 +0800
commit8b6382a8401ff20b4526416678af46860667b97b (patch)
treecf9aa3293525e68327fc22d35f772baf33ce405f /www
parent02749a7ab592dc0c300e143322c1234e885c7558 (diff)
downloadfreebsd-ports-gnome-8b6382a8401ff20b4526416678af46860667b97b.tar.gz
freebsd-ports-gnome-8b6382a8401ff20b4526416678af46860667b97b.tar.zst
freebsd-ports-gnome-8b6382a8401ff20b4526416678af46860667b97b.zip
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
Diffstat (limited to 'www')
-rw-r--r--www/lifetype/Makefile60
-rw-r--r--www/lifetype/files/pkg-message.in (renamed from www/lifetype/pkg-message)0
-rw-r--r--www/lifetype/pkg-descr2
3 files changed, 28 insertions, 34 deletions
diff --git a/www/lifetype/Makefile b/www/lifetype/Makefile
index 33c5fef61134..feb243d72e97 100644
--- a/www/lifetype/Makefile
+++ b/www/lifetype/Makefile
@@ -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@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>
diff --git a/www/lifetype/pkg-message b/www/lifetype/files/pkg-message.in
index 5384260fa38b..5384260fa38b 100644
--- a/www/lifetype/pkg-message
+++ b/www/lifetype/files/pkg-message.in
diff --git a/www/lifetype/pkg-descr b/www/lifetype/pkg-descr
index cf7d482fa8b8..0d9af29a4f84 100644
--- a/www/lifetype/pkg-descr
+++ b/www/lifetype/pkg-descr
@@ -5,4 +5,4 @@ makes the platform highly customizable and safer to let other people
customize the templates, since the presentation code is isolated from
the PHP code.
-WWW: http://www.lifetype.net/
+WWW: http://www.lifetype.net