Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jul 2014 01:21:58 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r361324 - head/net-mgmt/rackmonkey
Message-ID:  <201407090121.s691LwK6038815@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Wed Jul  9 01:21:58 2014
New Revision: 361324
URL: http://svnweb.freebsd.org/changeset/ports/361324
QAT: https://qat.redports.org/buildarchive/r361324/

Log:
  net-mgmt/rackmonkey: stage
  
  PR:		191742 (with slight modifications)
  Submitted by:	ecrist@secure-computing.net (maintainer)

Modified:
  head/net-mgmt/rackmonkey/Makefile
  head/net-mgmt/rackmonkey/pkg-plist

Modified: head/net-mgmt/rackmonkey/Makefile
==============================================================================
--- head/net-mgmt/rackmonkey/Makefile	Wed Jul  9 00:27:06 2014	(r361323)
+++ head/net-mgmt/rackmonkey/Makefile	Wed Jul  9 01:21:58 2014	(r361324)
@@ -11,7 +11,7 @@ MASTER_SITES=	SF \
 DISTNAME=	${PORTNAME}-${PORTVERSION}-1
 
 MAINTAINER=	ecrist@secure-computing.net
-COMMENT=	A web-based tool for managing racks of equipment
+COMMENT=	Web-based tool for managing racks of equipment
 
 RUN_DEPENDS=	p5-DBI>=0:${PORTSDIR}/databases/p5-DBI \
 		p5-HTML-Template>=0:${PORTSDIR}/www/p5-HTML-Template \
@@ -22,7 +22,7 @@ RUN_DEPENDS=	p5-DBI>=0:${PORTSDIR}/datab
 OPTIONS_DEFINE=	SQLITE MYSQL PGSQL INIT_DB SAMPLE
 OPTIONS_DEFAULT=	SQLITE INIT_DB SAMPLE
 INIT_DB_DESC=	Initialize DB at installation (SQLite Only)
-SAMPLE_DESC= 	Install sample data (SQLite Only)
+SAMPLE_DESC=	Install sample data (SQLite Only)
 
 WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}-1
 NO_BUILD=	YES
@@ -32,7 +32,6 @@ USE_PERL5=	run
 
 SUB_FILES=	pkg-message
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MSQLITE}
@@ -60,32 +59,32 @@ SAMPLE=	yes
 .endif
 
 do-install:
-	${MKDIR} ${WWWDIR}/
-	${INSTALL} ${WRKSRC}/perl/rackmonkey.pl ${WRKSRC}/perl/rack2xls.pl ${WRKSRC}/perl/rackdns.pl ${WWWDIR}/
-	cd ${WRKSRC}/www && ${COPYTREE_SHARE} \* ${WWWDIR}/
-	cd ${WRKSRC} && ${COPYTREE_SHARE} tmpl ${WWWDIR}/
-	cd ${WRKSRC}/perl && ${COPYTREE_SHARE} RackMonkey ${WWWDIR}/
+	${MKDIR} ${STAGEDIR}${WWWDIR}/
+	${INSTALL} ${WRKSRC}/perl/rackmonkey.pl ${WRKSRC}/perl/rack2xls.pl ${WRKSRC}/perl/rackdns.pl ${STAGEDIR}${WWWDIR}/
+	cd ${WRKSRC}/www && ${COPYTREE_SHARE} \* ${STAGEDIR}${WWWDIR}/
+	cd ${WRKSRC} && ${COPYTREE_SHARE} tmpl ${STAGEDIR}${WWWDIR}/
+	cd ${WRKSRC}/perl && ${COPYTREE_SHARE} RackMonkey ${STAGEDIR}${WWWDIR}/
 	${MKDIR} ${WRKDIR}/build_conf; \
 	${CP} ${WRKSRC}/conf/rackmonkey.conf-default ${WRKDIR}/build_conf/rackmonkey.conf; \
 	if [ "${USE_SQLITE}" ]; then \
 		${ECHO} "Building with SQLite............."; \
 		${SED} -i '' -e 's%dbconnect =%dbconnect = dbi:SQLite:dbname=${WWWDIR}/rackmonkey.db%' ${WRKDIR}/build_conf/rackmonkey.conf; \
 		if [ "${INIT_DB}" ]; then \
-			if [ -e "${WWWDIR}/rackmonkey.db" ]; then \
+			if [ -e "${STAGEDIR}${WWWDIR}/rackmonkey.db" ]; then \
 				${ECHO} "Database exists, skipping initalization..."; \
 			else \
-				${LOCALBASE}/bin/sqlite3 ${WWWDIR}/rackmonkey.db < ${WRKSRC}/sql/schema/schema.sqlite.sql; \
-				${LOCALBASE}/bin/sqlite3 ${WWWDIR}/rackmonkey.db < ${WRKSRC}/sql/data/default_data.sql; \
+				${LOCALBASE}/bin/sqlite3 ${STAGEDIR}${WWWDIR}/rackmonkey.db < ${WRKSRC}/sql/schema/schema.sqlite.sql; \
+				${LOCALBASE}/bin/sqlite3 ${STAGEDIR}${WWWDIR}/rackmonkey.db < ${WRKSRC}/sql/data/default_data.sql; \
 				if [ "${SAMPLE}" ]; then \
-					${LOCALBASE}/bin/sqlite3 ${WWWDIR}/rackmonkey.db < ${WRKSRC}/sql/data/sample_data.sql; \
+					${LOCALBASE}/bin/sqlite3 ${STAGEDIR}${WWWDIR}/rackmonkey.db < ${WRKSRC}/sql/data/sample_data.sql; \
 				fi \
 			fi \
 		fi \
 	elif [ "${USE_MYSQL}" -o "${USE_PGSQL}" ]; then  \
-		${INSTALL} ${WRKSRC}/conf/rackmonkey.conf-default ${WWWDIR}/; \
+		${INSTALL} ${WRKSRC}/conf/rackmonkey.conf-default ${STAGEDIR}${WWWDIR}/; \
 	fi
 	if [ -e "${WWWDIR}/rackmonkey.conf" ]; then \
-		${MV} ${WWWDIR}/rackmonkey.conf ${WWWDIR}/rackmonkey.conf.old; \
+		${MV} ${WWWDIR}/rackmonkey.conf ${STAGEDIR}${WWWDIR}/rackmonkey.conf.old; \
 	fi
 	${SED} -i '' \
 		-e 's/#plugin_xls/plugin_xls/' \
@@ -93,11 +92,9 @@ do-install:
 		-e 's%tmplpath =%tmplpath = ${WWWDIR}/tmpl%' \
 		-e 's%wwwpath =%wwwpath = /rackmonkey%' \
 		${WRKDIR}/build_conf/rackmonkey.conf
-	${INSTALL} ${WRKDIR}/build_conf/rackmonkey.conf ${WWWDIR}/
-	${INSTALL} ${WRKDIR}/build_conf/rackmonkey.conf ${WWWDIR}/rackmonkey.conf-default
-	cd ${WRKSRC} && ${COPYTREE_SHARE} sql ${WWWDIR}/
-	cd ${WRKSRC} && ${COPYTREE_SHARE} doc ${WWWDIR}/
-	${CHOWN} -R 80:80 ${WWWDIR}
+	cd ${WRKSRC} && ${COPYTREE_SHARE} sql ${STAGEDIR}${WWWDIR}/
+	cd ${WRKSRC} && ${COPYTREE_SHARE} doc ${STAGEDIR}${WWWDIR}/
+	${CHOWN} -R 80:80 ${STAGEDIR}${WWWDIR}
 	${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>

Modified: head/net-mgmt/rackmonkey/pkg-plist
==============================================================================
--- head/net-mgmt/rackmonkey/pkg-plist	Wed Jul  9 00:27:06 2014	(r361323)
+++ head/net-mgmt/rackmonkey/pkg-plist	Wed Jul  9 01:21:58 2014	(r361324)
@@ -127,7 +127,7 @@
 %%WWWDIR%%/doc/troubleshooting.txt
 %%WWWDIR%%/doc/upgrade.txt
 @unexec if cmp -s %D/%%WWWDIR%%/rackmonkey.conf-default %D/%%WWWDIR%%/rackmonkey.conf; then rm -f %D/%%WWWDIR%%/rackmonkey.conf; fi
-%%WWWDIR%%/rackmonkey.conf-default
+@exec if [ ! -f %D/%%WWWDIR%%/rackmonkey.conf ] ; then cp -p %D/%F %B/%%WWWDIR%%/rackmonkey.conf; fi
 @dirrmtry %%WWWDIR%%/graphics/help
 @dirrmtry %%WWWDIR%%/graphics/icons
 @dirrmtry %%WWWDIR%%/graphics



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407090121.s691LwK6038815>