Index: head/net-mgmt/rackmonkey/pkg-deinstall =================================================================== --- head/net-mgmt/rackmonkey/pkg-deinstall (revision 421502) +++ head/net-mgmt/rackmonkey/pkg-deinstall (nonexistent) @@ -1,16 +0,0 @@ -#!/bin/sh -# - -# Check for an sqlite file and print a message if there is one. -if [ $2 = "POST-DEINSTALL" ]; then - if [ -e ${WWWDIR}/rackmonkey.db ]; then - echo; echo; echo; - echo " ******************************" - echo " * NOTICE *" - echo " ******************************" - echo "If you no longer need it, you may delete " - echo "${WWWDIR}/rackmonkey.db" - echo "and it's parent directory, ${WWWDIR}" - echo; echo; echo; - fi -fi Property changes on: head/net-mgmt/rackmonkey/pkg-deinstall ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net-mgmt/rackmonkey/Makefile =================================================================== --- head/net-mgmt/rackmonkey/Makefile (revision 421502) +++ head/net-mgmt/rackmonkey/Makefile (revision 421503) @@ -1,97 +1,84 @@ # Created by: Eric F Crist # $FreeBSD$ 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}/ \ ftp://ftp2.secure-computing.net/pub/FreeBSD/ports/${PORTNAME}/ MAINTAINER= ecrist@secure-computing.net COMMENT= Web-based tool for managing racks of equipment RUN_DEPENDS= p5-DBI>=0:databases/p5-DBI \ p5-HTML-Template>=0:www/p5-HTML-Template \ p5-Spreadsheet-WriteExcel>=0:textproc/p5-Spreadsheet-WriteExcel \ p5-Net-DNS>=0:dns/p5-Net-DNS \ p5-HTML-Parser>=0:www/p5-HTML-Parser 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) +NO_ARCH= yes NO_BUILD= YES USES= perl5 USE_PERL5= run SUB_FILES= pkg-message .include .if ${PORT_OPTIONS:MSQLITE} USES+= sqlite RUN_DEPENDS+= p5-DBD-SQLite>=0:databases/p5-DBD-SQLite .endif .if ${PORT_OPTIONS:MMYSQL} USE_MYSQL= yes RUN_DEPENDS+= p5-DBD-mysql>=0:databases/p5-DBD-mysql .endif .if ${PORT_OPTIONS:MPGSQL} USES+= pgsql RUN_DEPENDS+= p5-DBD-Pg>=0:databases/p5-DBD-Pg .endif .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}/ .include Index: head/net-mgmt/rackmonkey/pkg-plist =================================================================== --- head/net-mgmt/rackmonkey/pkg-plist (revision 421502) +++ head/net-mgmt/rackmonkey/pkg-plist (revision 421503) @@ -1,149 +1,133 @@ @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 %%WWWDIR%%/graphics/help/app-single.png %%WWWDIR%%/graphics/help/config.png %%WWWDIR%%/graphics/help/device-single.png %%WWWDIR%%/graphics/help/devices.png %%WWWDIR%%/graphics/help/navbar.png %%WWWDIR%%/graphics/help/racks-physical.png %%WWWDIR%%/graphics/help/racks.png %%WWWDIR%%/graphics/icons/add.png %%WWWDIR%%/graphics/icons/delete.png %%WWWDIR%%/graphics/icons/information.png %%WWWDIR%%/graphics/icons/pencil.png %%WWWDIR%%/graphics/logo.png %%WWWDIR%%/javascript/racklib.js %%WWWDIR%%/styles/form.css %%WWWDIR%%/styles/help.css %%WWWDIR%%/styles/itemtable.css %%WWWDIR%%/styles/main.css %%WWWDIR%%/styles/print.css %%WWWDIR%%/styles/rackphysical.css %%WWWDIR%%/styles/report.css %%WWWDIR%%/styles/tabs.css %%WWWDIR%%/tmpl/app-edit.ssi %%WWWDIR%%/tmpl/app_create.tmpl %%WWWDIR%%/tmpl/app_default.tmpl %%WWWDIR%%/tmpl/app_edit.tmpl %%WWWDIR%%/tmpl/app_single.tmpl %%WWWDIR%%/tmpl/building-edit.ssi %%WWWDIR%%/tmpl/building_create.tmpl %%WWWDIR%%/tmpl/building_default.tmpl %%WWWDIR%%/tmpl/building_edit.tmpl %%WWWDIR%%/tmpl/building_single.tmpl %%WWWDIR%%/tmpl/config_default.tmpl %%WWWDIR%%/tmpl/device-edit.ssi %%WWWDIR%%/tmpl/device_create.tmpl %%WWWDIR%%/tmpl/device_default.tmpl %%WWWDIR%%/tmpl/device_default_asset.tmpl %%WWWDIR%%/tmpl/device_default_extended.tmpl %%WWWDIR%%/tmpl/device_edit.tmpl %%WWWDIR%%/tmpl/device_default_search.tmpl %%WWWDIR%%/tmpl/device_default_unracked.tmpl %%WWWDIR%%/tmpl/device_single.tmpl %%WWWDIR%%/tmpl/deviceApp_create.tmpl %%WWWDIR%%/tmpl/domain-edit.ssi %%WWWDIR%%/tmpl/domain_create.tmpl %%WWWDIR%%/tmpl/domain_default.tmpl %%WWWDIR%%/tmpl/domain_edit.tmpl %%WWWDIR%%/tmpl/domain_single.tmpl %%WWWDIR%%/tmpl/footer.ssi %%WWWDIR%%/tmpl/hardware-edit.ssi %%WWWDIR%%/tmpl/hardware_create.tmpl %%WWWDIR%%/tmpl/hardware_default.tmpl %%WWWDIR%%/tmpl/hardware_edit.tmpl %%WWWDIR%%/tmpl/hardware_single.tmpl %%WWWDIR%%/tmpl/help_admin.tmpl %%WWWDIR%%/tmpl/help_default.tmpl %%WWWDIR%%/tmpl/help_errors.tmpl %%WWWDIR%%/tmpl/help_getting_support.tmpl %%WWWDIR%%/tmpl/help_legal.tmpl %%WWWDIR%%/tmpl/help_user.tmpl %%WWWDIR%%/tmpl/nav-app.ssi %%WWWDIR%%/tmpl/nav-config.ssi %%WWWDIR%%/tmpl/nav-device.ssi %%WWWDIR%%/tmpl/nav-help.ssi %%WWWDIR%%/tmpl/nav-rack.ssi %%WWWDIR%%/tmpl/nav-report.ssi %%WWWDIR%%/tmpl/org-edit.ssi %%WWWDIR%%/tmpl/org_create.tmpl %%WWWDIR%%/tmpl/org_default.tmpl %%WWWDIR%%/tmpl/org_edit.tmpl %%WWWDIR%%/tmpl/org_single.tmpl %%WWWDIR%%/tmpl/os-edit.ssi %%WWWDIR%%/tmpl/os_create.tmpl %%WWWDIR%%/tmpl/os_default.tmpl %%WWWDIR%%/tmpl/os_edit.tmpl %%WWWDIR%%/tmpl/os_single.tmpl %%WWWDIR%%/tmpl/rack-edit.ssi %%WWWDIR%%/tmpl/rack_create.tmpl %%WWWDIR%%/tmpl/rack_default.tmpl %%WWWDIR%%/tmpl/rack_edit.tmpl %%WWWDIR%%/tmpl/rack_physical.tmpl %%WWWDIR%%/tmpl/rack_physical_extended.tmpl %%WWWDIR%%/tmpl/rack_single.tmpl %%WWWDIR%%/tmpl/report_counts.tmpl %%WWWDIR%%/tmpl/report_default.tmpl %%WWWDIR%%/tmpl/report_duplicates.tmpl %%WWWDIR%%/tmpl/role-edit.ssi %%WWWDIR%%/tmpl/role_create.tmpl %%WWWDIR%%/tmpl/role_default.tmpl %%WWWDIR%%/tmpl/role_edit.tmpl %%WWWDIR%%/tmpl/role_single.tmpl %%WWWDIR%%/tmpl/room-edit.ssi %%WWWDIR%%/tmpl/room_create.tmpl %%WWWDIR%%/tmpl/room_default.tmpl %%WWWDIR%%/tmpl/room_edit.tmpl %%WWWDIR%%/tmpl/room_single.tmpl %%WWWDIR%%/tmpl/service-edit.ssi %%WWWDIR%%/tmpl/service_create.tmpl %%WWWDIR%%/tmpl/service_default.tmpl %%WWWDIR%%/tmpl/service_edit.tmpl %%WWWDIR%%/tmpl/service_single.tmpl %%WWWDIR%%/RackMonkey/CGI.pm %%WWWDIR%%/RackMonkey/Conf.pm %%WWWDIR%%/RackMonkey/Engine.pm %%WWWDIR%%/RackMonkey/Error.pm %%WWWDIR%%/sql/data/default_data.sql %%WWWDIR%%/sql/data/sample_data.sql %%WWWDIR%%/sql/migration/3/migration.mysql.sql %%WWWDIR%%/sql/migration/3/migration.postgres.sql %%WWWDIR%%/sql/migration/3/migration.sqlite.sql %%WWWDIR%%/sql/migration/4/migration.mysql.sql %%WWWDIR%%/sql/migration/4/migration.postgres.sql %%WWWDIR%%/sql/migration/4/migration.sqlite.sql %%WWWDIR%%/sql/schema/schema.mysql.sql %%WWWDIR%%/sql/schema/schema.postgres.sql %%WWWDIR%%/sql/schema/schema.sqlite.sql %%WWWDIR%%/doc/changes.txt %%WWWDIR%%/doc/devguide.txt %%WWWDIR%%/doc/install-debian-ubuntu.txt %%WWWDIR%%/doc/install-redhat.txt %%WWWDIR%%/doc/install.txt %%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