ports/190313: [patch] Add staging support to www/pebble

Joseph Benden joe at thrallingpenguin.com
Tue May 27 15:30:00 UTC 2014


>Number:         190313
>Category:       ports
>Synopsis:       [patch] Add staging support to www/pebble
>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:   Tue May 27 15:30: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 at lucy:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Adds staging support to www/pebble.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/www/pebble/Makefile b/www/pebble/Makefile
index 065563b..3eb76a9 100644
--- a/www/pebble/Makefile
+++ b/www/pebble/Makefile
@@ -37,21 +37,20 @@ PORTDOCS=	configuration.html credits.html images index.html \
 PLIST_FILES=	${WEBAPP_SUBDIR}/${PORTNAME}.war
 PEBBLE_CONTEXT=	WEB-INF/applicationContext-pebble.xml
 
-NO_STAGE=	yes
 do-patch:
 	cd ${WRKSRC} && ${UNZIP_CMD} -o pebble.war "${PEBBLE_CONTEXT}"
 	${SED} -i.bak 's,/WEB-INF/pebble\.properties,file:${PEBBLE_PROPERTIES},' "${WRKSRC}/${PEBBLE_CONTEXT}"
 	cd ${WRKSRC} && ${LOCALBASE}/bin/zip -u pebble.war ${PEBBLE_CONTEXT}
 
 do-install:
-	${MKDIR} "${PEBBLE_HOME}"
-	${CHOWN} "www:www" "${PEBBLE_HOME}"
-	${INSTALL_DATA} ${WRKDIR}/pebble.properties ${PEBBLE_PROPERTIES}.sample
-	if [ ! -f ${PEBBLE_PROPERTIES} ]; then ${INSTALL_DATA} ${WRKDIR}/pebble.properties ${PEBBLE_PROPERTIES} ; fi
-	${INSTALL_DATA} ${WRKSRC}/pebble.war ${WEBAPP_DIR}/${PORTNAME}.war
+	${MKDIR} "${STAGEDIR}${PEBBLE_HOME}"
+	${CHOWN} "www:www" "${STAGEDIR}${PEBBLE_HOME}"
+	${INSTALL_DATA} ${WRKDIR}/pebble.properties ${STAGEDIR}${PEBBLE_PROPERTIES}.sample
+	${MKDIR} ${STAGEDIR}${WEBAPP_DIR}
+	${INSTALL_DATA} ${WRKSRC}/pebble.war ${STAGEDIR}${WEBAPP_DIR}/${PORTNAME}.war
 .if !defined(NOPORTDOCS)
-	cd ${WRKSRC}/docs && ${FIND} ${PORTDOCS} -type d -exec ${MKDIR} ${DOCSDIR}/{} \;
-	cd ${WRKSRC}/docs && ${FIND} ${PORTDOCS} -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
+	cd ${WRKSRC}/docs && ${FIND} ${PORTDOCS} -type d -exec ${MKDIR} ${STAGEDIR}${DOCSDIR}/{} \;
+	cd ${WRKSRC}/docs && ${FIND} ${PORTDOCS} -type f -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/{} \;
 .endif
 
 post-install:
diff --git a/www/pebble/pkg-plist b/www/pebble/pkg-plist
index 6547158..b57a142 100644
--- a/www/pebble/pkg-plist
+++ b/www/pebble/pkg-plist
@@ -1,3 +1,6 @@
 @exec mkdir -p %%PEBBLE_HOME%%
 @unexec if cmp -s %D/etc/pebble.properties.sample %D/etc/pebble.properties; then rm -f %D/etc/pebble.properties; fi
 etc/pebble.properties.sample
+ at exec cp -n %D/%F %B/pebble.properties
+ at unexec rmdir "/var/lib/pebble" >/dev/null 2>&1 || :
+ at unexec rmdir "/var/lib" >/dev/null 2>&1 || :


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list