Date: Wed, 28 May 2014 21:36:19 GMT From: Joseph Benden <joe@thrallingpenguin.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/190353: [patch] Add staging support to www/piwigo Message-ID: <201405282136.s4SLaJx8047289@cgiserv.freebsd.org> Resent-Message-ID: <201405282140.s4SLe01N006101@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 190353 >Category: ports >Synopsis: [patch] Add staging support to www/piwigo >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed May 28 21:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Joseph Benden >Release: FreeBSD 11 >Organization: >Environment: FreeBSD lucy 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r264887: Thu Apr 24 12:43:46 MST 2014 root@lucy:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Adds staging support to www/piwigo. This has leftovers in Poudriere, I gave up. >How-To-Repeat: >Fix: Patch attached with submission follows: diff --git a/www/piwigo/Makefile b/www/piwigo/Makefile index a63681c..bc9601d 100644 --- a/www/piwigo/Makefile +++ b/www/piwigo/Makefile @@ -18,7 +18,7 @@ USES= zip WANT_PHP_WEB= yes WRKSRC= ${WRKDIR}/${PORTNAME} -SUB_FILES= pkg-install pkg-deinstall pkg-message +SUB_FILES= pkg-deinstall pkg-message SUB_LIST+= CP="${CP}" \ MKDIR="${MKDIR}" \ CHOWN="${CHOWN}" \ @@ -36,7 +36,6 @@ PLIST_SUB+= WWWOWN="${WWWOWN}" \ WWWGRP="${WWWGRP}" \ CHOWN="${CHOWN}" -NO_STAGE= yes .include <bsd.port.pre.mk> .if ${PORT_OPTIONS:MIMAGICK} @@ -52,20 +51,23 @@ post-extract: do-install: .if ${PORT_OPTIONS:MDOCS} - @${INSTALL} -d ${DOCSDIR}/ - @cd ${WRKSRC}/doc/ && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/ + @${INSTALL} -d ${STAGEDIR}${DOCSDIR}/ + @cd ${WRKSRC}/doc/ && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/ .endif .if ${PORT_OPTIONS:MEXAMPLES} - @${INSTALL} -d ${EXAMPLESDIR}/ - @cd ${WRKSRC}/tools/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR}/ + @${INSTALL} -d ${STAGEDIR}${EXAMPLESDIR}/ + @cd ${WRKSRC}/tools/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/ .endif @${RM} -fr ${WRKSRC}/doc/ ${WRKSRC}/tools/ ${WRKSRC}/_data/ ${WRKSRC}/upload/ @${MV} ${WRKSRC}/local/ ${WRKSRC}/local.sample/ - @cd ${WRKSRC}/ && ${COPYTREE_INSTALL} . ${WWWDIR} + @cd ${WRKSRC}/ && ${COPYTREE_INSTALL} . ${STAGEDIR}${WWWDIR} + @${MKDIR} ${STAGEDIR}${WWWDIR}/upload \ + ${STAGEDIR}${WWWDIR}/plugins \ + ${STAGEDIR}${WWWDIR}/galleries \ + ${STAGEDIR}${WWWDIR}/_data post-install: - @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} # Own version with our owners and we also have to protect if diff --git a/www/piwigo/files/pkg-deinstall.in b/www/piwigo/files/pkg-deinstall.in old mode 100644 new mode 100755 index ca60490..c3533e2 --- a/www/piwigo/files/pkg-deinstall.in +++ b/www/piwigo/files/pkg-deinstall.in @@ -6,15 +6,17 @@ WEBAPP_DIR="%%WWWDIR%%" ECHO_CMD="echo" post-deinstall() { - ${ECHO_CMD} "WARNING: If you intend *NOT* use this package anymore," - ${ECHO_CMD} " you may need to remove the following directory manually:" - ${ECHO_CMD} " ${WEBAPP_DIR}" - ${ECHO_CMD} " and delete the application database." - ${ECHO_CMD} + ${ECHO_CMD} "WARNING: If you intend *NOT* use this package anymore," + ${ECHO_CMD} " you may need to remove the following directory manually:" + ${ECHO_CMD} " ${WEBAPP_DIR}" + ${ECHO_CMD} " and delete the application database." + ${ECHO_CMD} } case $2 in - POST-DEINSTALL) - post-deinstall - ;; + POST-DEINSTALL) + post-deinstall + ;; esac + +exit 0 diff --git a/www/piwigo/files/pkg-install.in b/www/piwigo/files/pkg-install.in deleted file mode 100644 index 3be19ba..0000000 --- a/www/piwigo/files/pkg-install.in +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/sh - -PATH=/bin:/usr/sbin:/usr/bin:/usr/sbin - -WWWDIR="%%WWWDIR%%" - -CP="%%CP%%" -MKDIR="%%MKDIR%%" -CHOWN="%%CHOWN%%" -TOUCH="%%TOUCH%%" - -WWWOWN="%%WWWOWN%%" -WWWGRP="%%WWWGRP%%" - -post-install() { - if [ ! -e ${WWWDIR}/local ]; then - ${CP} -a ${WWWDIR}/local.sample ${WWWDIR}/local - fi - if [ ! -e ${WWWDIR}/_data ]; then - ${MKDIR} -m 777 ${WWWDIR}/_data - ${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/_data - ${TOUCH} ${WWWDIR}/_data/dummy.txt - fi - ${CHOWN} -fR ${WWWOWN}:${WWWGRP} ${WWWDIR}/plugins - if [ ! -e ${WWWDIR}/upload ]; then - ${MKDIR} -m 750 ${WWWDIR}/upload - ${CHOWN} -fR ${WWWOWN}:${WWWGRP} ${WWWDIR}/upload - ${TOUCH} ${WWWDIR}/upload/.keepme - fi -} - -case $2 in - POST-INSTALL) - post-install - ;; -esac diff --git a/www/piwigo/pkg-plist b/www/piwigo/pkg-plist index c711525..2c2a0d2 100644 --- a/www/piwigo/pkg-plist +++ b/www/piwigo/pkg-plist @@ -18,7 +18,6 @@ %%PORTEXAMPLES%%%%EXAMPLESDIR%%/ws.htm @exec mkdir -m 0750 -p %D/_data @exec %%CHOWN%% %%WWWOWN%%:%%WWWGRP%% %D/_data -%%WWWDIR%%/_data/dummy.txt %%WWWDIR%%/about.php %%WWWDIR%%/action.php %%WWWDIR%%/admin.php @@ -1554,10 +1553,6 @@ %%WWWDIR%%/local.sample/css/index.php %%WWWDIR%%/local.sample/index.php %%WWWDIR%%/local.sample/language/index.php -%%WWWDIR%%/local/config/index.php -%%WWWDIR%%/local/css/index.php -%%WWWDIR%%/local/index.php -%%WWWDIR%%/local/language/index.php %%WWWDIR%%/nbm.php %%WWWDIR%%/notification.php %%WWWDIR%%/password.php @@ -2439,8 +2434,8 @@ %%WWWDIR%%/upgrade_feed.php @exec mkdir -m 0750 -p %D/upload @exec %%CHOWN%% %%WWWOWN%%:%%WWWGRP%% %D/upload -%%WWWDIR%%/upload/.keepme %%WWWDIR%%/ws.php +@dirrmtry %%WWWDIR%%/_data @dirrmtry %%WWWDIR%%/upload @dirrm %%WWWDIR%%/themes/smartpocket/template @dirrm %%WWWDIR%%/themes/smartpocket/js @@ -2671,10 +2666,6 @@ @dirrm %%WWWDIR%%/plugins/LocalFilesEditor/codemirror @dirrm %%WWWDIR%%/plugins/LocalFilesEditor @dirrmtry %%WWWDIR%%/plugins -@dirrm %%WWWDIR%%/local/language -@dirrm %%WWWDIR%%/local/config -@dirrm %%WWWDIR%%/local/css -@dirrm %%WWWDIR%%/local @dirrmtry %%WWWDIR%%/local.sample/language @dirrmtry %%WWWDIR%%/local.sample/css @dirrmtry %%WWWDIR%%/local.sample/config @@ -2802,7 +2793,6 @@ @dirrm %%WWWDIR%%/admin/include/uploadify @dirrm %%WWWDIR%%/admin/include @dirrm %%WWWDIR%%/admin -@dirrm %%WWWDIR%%/_data @dirrmtry %%WWWDIR%% %%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/language %%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405282136.s4SLaJx8047289>