aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/rackmonkey
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-02-12 19:27:38 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-02-12 19:27:38 +0000
commit82a7ae01b27071d42b9a03c077f96692e5cf2e41 (patch)
tree409a73c419e28787c62f424236b044768f788f73 /net-mgmt/rackmonkey
parentc9fa3470640d11aefe6f94e2fe859701f01f9d42 (diff)
downloadports-82a7ae01b27071d42b9a03c077f96692e5cf2e41.tar.gz
ports-82a7ae01b27071d42b9a03c077f96692e5cf2e41.zip
RackMonkey is a web-based tool for managing racks of equipment
such as web servers, video encoders, routers and storage devices. Using a simple interface you can keep track of what's where, which OS it runs, when it was purchased, who it belongs and what it's used for. WWW: http://flux.org.uk/projects/rackmonkey/ PR: ports/143750 Submitted by: Eric F Crist <ecrist at secure-computing.net>
Notes
Notes: svn path=/head/; revision=249718
Diffstat (limited to 'net-mgmt/rackmonkey')
-rw-r--r--net-mgmt/rackmonkey/Makefile90
-rw-r--r--net-mgmt/rackmonkey/distinfo3
-rw-r--r--net-mgmt/rackmonkey/files/pkg-message.in28
-rw-r--r--net-mgmt/rackmonkey/pkg-deinstall16
-rw-r--r--net-mgmt/rackmonkey/pkg-descr7
-rw-r--r--net-mgmt/rackmonkey/pkg-plist145
6 files changed, 289 insertions, 0 deletions
diff --git a/net-mgmt/rackmonkey/Makefile b/net-mgmt/rackmonkey/Makefile
new file mode 100644
index 000000000000..b117e4337f07
--- /dev/null
+++ b/net-mgmt/rackmonkey/Makefile
@@ -0,0 +1,90 @@
+# Ports collection makefile for: RackMonkey
+# Date created: February 10, 2010
+# Whom: Eric F Crist <ecrist@secure-computing.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= rackmonkey
+PORTVERSION= 1.2.5
+CATEGORIES= net-mgmt www
+MASTER_SITES= SF
+DISTNAME= ${PORTNAME}-${PORTVERSION}-1
+
+MAINTAINER= ecrist@secure-computing.net
+COMMENT= A 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 \
+ p5-Spreadsheet-WriteExcel>=0:${PORTSDIR}/textproc/p5-Spreadsheet-WriteExcel \
+ p5-Net-DNS>=0:${PORTSDIR}/dns/p5-Net-DNS
+
+OPTIONS= \
+ SQLITE "Use SQLite Backend" on \
+ MYSQL "Use MySQL Backend" off \
+ POSTGRES "Use Posgres Backend" off \
+ INIT_DB "Initialize DB at installation (SQLite Only)" on \
+ SAMPLE "Install sample data (SQLite Only)" on
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-1
+NO_BUILD= YES
+
+USE_PERL5_RUN= YES
+
+SUB_FILES= pkg-message
+
+.include <bsd.port.options.mk>
+.if defined(WITH_SQLITE)
+USE_SQLITE= yes
+RUN_DEPENDS+= p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite
+.endif
+.if defined(WITH_MYSQL)
+USE_MYSQL= yes
+.endif
+.if defined(WITH_POSTGRES)
+USE_PGSQL= 83
+RUN_DEPENDS+= pf-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg
+.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}/
+ if [ "${WITH_SQLITE}" ]; then \
+ ${ECHO} "Building with SQLite............."; \
+ ${MKDIR} ${WRKDIR}/build_conf; \
+ ${CP} ${WRKSRC}/conf/rackmonkey.conf-default ${WRKDIR}/build_conf/rackmonkey.conf; \
+ ${SED} -i '' -e 's%dbconnect =%dbconnect = dbi:SQLite:dbname=${WWWDIR}/rackmonkey.db%' ${WRKDIR}/build_conf/rackmonkey.conf; \
+ if [ "${WITH_INIT_DB}" ]; then \
+ if [ -e "${WWWDIR}/rackmonkey.db" ]; then \
+ ${ECHO} "Database exists, skipping initalization..."; \
+ else \
+ /usr/local/bin/sqlite3 ${WWWDIR}/rackmonkey.db < ${WRKSRC}/sql/schema/schema.sqlite.sql; \
+ /usr/local/bin/sqlite3 ${WWWDIR}/rackmonkey.db < ${WRKSRC}/sql/data/default_data.sql; \
+ if [ "${WITH_SAMPLE}" ]; then \
+ /usr/local/bin/sqlite3 ${WWWDIR}/rackmonkey.db < ${WRKSRC}/sql/data/sample_data.sql; \
+ fi \
+ fi \
+ fi \
+ elif [ "${WITH_MYSQL}" -o "${WITH_POSTGRES}" ]; then \
+ ${INSTALL} ${WRKSRC}/conf/rackmonkey.conf-default ${WWWDIR}/; \
+ fi
+ if [ -e "${WWWDIR}/rackmonkey.conf" ]; then \
+ ${MV} ${WWWDIR}/rackmonkey.conf ${WWWDIR}/rackmonkey.conf.old; \
+ fi
+ ${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} ${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}
+ ${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/rackmonkey/distinfo b/net-mgmt/rackmonkey/distinfo
new file mode 100644
index 000000000000..f2844bb63930
--- /dev/null
+++ b/net-mgmt/rackmonkey/distinfo
@@ -0,0 +1,3 @@
+MD5 (rackmonkey-1.2.5-1.tar.gz) = 0927228096964c08407b90cf5aaaf7ee
+SHA256 (rackmonkey-1.2.5-1.tar.gz) = 67b3f31f6a05e936ba9441e7a2141decb9b9b28b1882f4c1ee8225b6e80a1c1f
+SIZE (rackmonkey-1.2.5-1.tar.gz) = 225053
diff --git a/net-mgmt/rackmonkey/files/pkg-message.in b/net-mgmt/rackmonkey/files/pkg-message.in
new file mode 100644
index 000000000000..8a887e2459b8
--- /dev/null
+++ b/net-mgmt/rackmonkey/files/pkg-message.in
@@ -0,0 +1,28 @@
+
+*********************************************************************
+* Please Read *
+*********************************************************************
+
+DATABASE SETUP:
+If you have selected PostgreSQL or MySQL databases, you will need to
+read the documentation on how to edit the config file, as well as how
+to initialize the database. IF YOU SELECTED SQLITE, THIS CAN BE DONE
+AUTOMATICALLY BY THIS PORT.
+
+DOCUMENTATION URL:
+http://flux.org.uk/projects/rackmonkey/doc/1.2.5/install
+
+
+WEBSERVER SETUP:
+If using the Apache web server, simply add the following
+to the appropriate place in your config files:
+
+<Location /rackmonkey>
+ Options ExecCGI FollowSymLinks Includes
+ AddHandler cgi-script .pl
+ AddType text/html .shtml
+ AddHandler server-parsed .shtml
+ DirectoryIndex rackmonkey.pl index.shtml index.html
+ SetEnv RACKMONKEY_CONF /usr/local/www/rackmonkey/rackmonkey.conf
+</Location>
+
diff --git a/net-mgmt/rackmonkey/pkg-deinstall b/net-mgmt/rackmonkey/pkg-deinstall
new file mode 100644
index 000000000000..377f93dbbe99
--- /dev/null
+++ b/net-mgmt/rackmonkey/pkg-deinstall
@@ -0,0 +1,16 @@
+#!/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
diff --git a/net-mgmt/rackmonkey/pkg-descr b/net-mgmt/rackmonkey/pkg-descr
new file mode 100644
index 000000000000..f241edab74f4
--- /dev/null
+++ b/net-mgmt/rackmonkey/pkg-descr
@@ -0,0 +1,7 @@
+RackMonkey is a web-based tool for managing racks of equipment
+such as web servers, video encoders, routers and storage devices.
+Using a simple interface you can keep track of what's where,
+which OS it runs, when it was purchased, who it belongs and what
+it's used for.
+
+WWW: http://flux.org.uk/projects/rackmonkey/
diff --git a/net-mgmt/rackmonkey/pkg-plist b/net-mgmt/rackmonkey/pkg-plist
new file mode 100644
index 000000000000..442ee1f5a88d
--- /dev/null
+++ b/net-mgmt/rackmonkey/pkg-plist
@@ -0,0 +1,145 @@
+%%WWWDIR%%/rackmonkey.pl
+%%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
+%%WWWDIR%%/rackmonkey.conf-default
+@dirrmtry %%WWWDIR%%/graphics/help
+@dirrmtry %%WWWDIR%%/graphics/icons
+@dirrmtry %%WWWDIR%%/graphics
+@dirrmtry %%WWWDIR%%/javascript
+@dirrmtry %%WWWDIR%%/styles
+@dirrmtry %%WWWDIR%%/tmpl
+@dirrmtry %%WWWDIR%%/RackMonkey
+@dirrmtry %%WWWDIR%%/sql/data
+@dirrmtry %%WWWDIR%%/sql/migration/3
+@dirrmtry %%WWWDIR%%/sql/migration/4
+@dirrmtry %%WWWDIR%%/sql/migration
+@dirrmtry %%WWWDIR%%/sql/schema
+@dirrmtry %%WWWDIR%%/sql
+@dirrmtry %%WWWDIR%%/doc
+@dirrmtry %%WWWDIR%%/