From owner-svn-ports-all@freebsd.org Wed Sep 7 14:52:24 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 275E2BCF8A8; Wed, 7 Sep 2016 14:52:24 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFB9BD5C; Wed, 7 Sep 2016 14:52:23 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u87EqNq0031529; Wed, 7 Sep 2016 14:52:23 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u87EqN6f031527; Wed, 7 Sep 2016 14:52:23 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201609071452.u87EqN6f031527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Wed, 7 Sep 2016 14:52:23 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r421503 - head/net-mgmt/rackmonkey X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2016 14:52:24 -0000 Author: tijl Date: Wed Sep 7 14:52:22 2016 New Revision: 421503 URL: https://svnweb.freebsd.org/changeset/ports/421503 Log: - Actually install configuration file and use @sample. - Use @sample for the sample database. - Set NO_ARCH. Deleted: head/net-mgmt/rackmonkey/pkg-deinstall Modified: head/net-mgmt/rackmonkey/Makefile head/net-mgmt/rackmonkey/pkg-plist Modified: head/net-mgmt/rackmonkey/Makefile ============================================================================== --- head/net-mgmt/rackmonkey/Makefile Wed Sep 7 13:46:58 2016 (r421502) +++ head/net-mgmt/rackmonkey/Makefile Wed Sep 7 14:52:22 2016 (r421503) @@ -4,7 +4,7 @@ PORTNAME= rackmonkey PORTVERSION= 1.2.5 DISTVERSIONSUFFIX= -1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net-mgmt www MASTER_SITES= SF \ ftp://ftp.secure-computing.net/pub/FreeBSD/ports/${PORTNAME}/ \ @@ -24,6 +24,7 @@ OPTIONS_DEFAULT= SQLITE INIT_DB SAMPLE INIT_DB_DESC= Initialize DB at installation (SQLite Only) SAMPLE_DESC= Install sample data (SQLite Only) +NO_ARCH= yes NO_BUILD= YES USES= perl5 @@ -48,49 +49,35 @@ RUN_DEPENDS+= p5-DBD-Pg>=0:databases/p5- .if ${PORT_OPTIONS:MINIT_DB} PLIST_SUB+= INIT_DB="" -INIT_DB= yes .else PLIST_SUB+= INIT_DB="@comment " .endif -.if ${PORT_OPTIONS:MSAMPLE} -SAMPLE= yes -.endif - do-install: ${MKDIR} ${STAGEDIR}${WWWDIR}/ - ${INSTALL} ${WRKSRC}/perl/rackmonkey.pl ${WRKSRC}/perl/rack2xls.pl ${WRKSRC}/perl/rackdns.pl ${STAGEDIR}${WWWDIR}/ + ${INSTALL_SCRIPT} ${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 [ "${USES:Msqlite}" ]; 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 "${STAGEDIR}${WWWDIR}/rackmonkey.db" ]; then \ - ${ECHO} "Database exists, skipping initalization..."; \ - else \ - ${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 ${STAGEDIR}${WWWDIR}/rackmonkey.db < ${WRKSRC}/sql/data/sample_data.sql; \ - fi \ - fi \ - fi \ - elif [ "${USE_MYSQL}" -o "${USES:MPGSQL}" ]; then \ - ${INSTALL} ${WRKSRC}/conf/rackmonkey.conf-default ${STAGEDIR}${WWWDIR}/; \ - fi - if [ -e "${WWWDIR}/rackmonkey.conf" ]; then \ - ${MV} ${WWWDIR}/rackmonkey.conf ${STAGEDIR}${WWWDIR}/rackmonkey.conf.old; \ - fi + ${MKDIR} ${WRKDIR}/build_conf + ${CP} ${WRKSRC}/conf/rackmonkey.conf-default ${WRKDIR}/build_conf/rackmonkey.conf +.if ${PORT_OPTIONS:MSQLITE} + ${SED} -i '' -e 's%dbconnect =%dbconnect = dbi:SQLite:dbname=${WWWDIR}/rackmonkey.db%' ${WRKDIR}/build_conf/rackmonkey.conf +.if ${PORT_OPTIONS:MINIT_DB} + ${LOCALBASE}/bin/sqlite3 ${STAGEDIR}${WWWDIR}/rackmonkey.db.sample < ${WRKSRC}/sql/schema/schema.sqlite.sql + ${LOCALBASE}/bin/sqlite3 ${STAGEDIR}${WWWDIR}/rackmonkey.db.sample < ${WRKSRC}/sql/data/default_data.sql +.if ${PORT_OPTIONS:MSAMPLE} + ${LOCALBASE}/bin/sqlite3 ${STAGEDIR}${WWWDIR}/rackmonkey.db.sample < ${WRKSRC}/sql/data/sample_data.sql +.endif +.endif +.endif ${SED} -i '' \ -e 's/#plugin_xls/plugin_xls/' \ -e 's/#plugin_dns/plugin_dns/' \ -e 's%tmplpath =%tmplpath = ${WWWDIR}/tmpl%' \ -e 's%wwwpath =%wwwpath = /rackmonkey%' \ ${WRKDIR}/build_conf/rackmonkey.conf + ${INSTALL_DATA} ${WRKDIR}/build_conf/rackmonkey.conf ${STAGEDIR}${WWWDIR}/rackmonkey.conf.sample cd ${WRKSRC} && ${COPYTREE_SHARE} sql ${STAGEDIR}${WWWDIR}/ cd ${WRKSRC} && ${COPYTREE_SHARE} doc ${STAGEDIR}${WWWDIR}/ Modified: head/net-mgmt/rackmonkey/pkg-plist ============================================================================== --- head/net-mgmt/rackmonkey/pkg-plist Wed Sep 7 13:46:58 2016 (r421502) +++ head/net-mgmt/rackmonkey/pkg-plist Wed Sep 7 14:52:22 2016 (r421503) @@ -1,7 +1,8 @@ @owner www @group www +@sample %%WWWDIR%%/rackmonkey.conf.sample +%%INIT_DB%%@sample %%WWWDIR%%/rackmonkey.db.sample %%WWWDIR%%/rackmonkey.pl -%%INIT_DB%%%%WWWDIR%%/rackmonkey.db %%WWWDIR%%/rack2xls.pl %%WWWDIR%%/rackdns.pl %%WWWDIR%%/graphics/favicon.ico @@ -128,22 +129,5 @@ %%WWWDIR%%/doc/licence.txt %%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 -@exec if [ ! -f %D/%%WWWDIR%%/rackmonkey.conf ] ; then cp -p %D/%F %B/%%WWWDIR%%/rackmonkey.conf; fi -@dir %%WWWDIR%%/graphics/help -@dir %%WWWDIR%%/graphics/icons -@dir %%WWWDIR%%/graphics -@dir %%WWWDIR%%/javascript -@dir %%WWWDIR%%/styles -@dir %%WWWDIR%%/tmpl -@dir %%WWWDIR%%/RackMonkey -@dir %%WWWDIR%%/sql/data -@dir %%WWWDIR%%/sql/migration/3 -@dir %%WWWDIR%%/sql/migration/4 -@dir %%WWWDIR%%/sql/migration -@dir %%WWWDIR%%/sql/schema -@dir %%WWWDIR%%/sql -@dir %%WWWDIR%%/doc -@dir %%WWWDIR%%/ @owner @group