aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2013-02-15 13:51:46 +0000
committerStuart Shelton <stuart@shelton.me>2013-02-15 13:51:46 +0000
commit3199d5a3560f20646418a1a38a01c5e2ac8229cf (patch)
tree64188ec0c6124f29e95e7e4524fe49f6bbda953b /www-apps/heatmiser
parentPortage metadata (diff)
downloadsrcshelton-3199d5a3560f20646418a1a38a01c5e2ac8229cf.tar.gz
srcshelton-3199d5a3560f20646418a1a38a01c5e2ac8229cf.tar.bz2
srcshelton-3199d5a3560f20646418a1a38a01c5e2ac8229cf.zip
Out-of-tree ebuilds
Diffstat (limited to 'www-apps/heatmiser')
-rw-r--r--www-apps/heatmiser/Manifest5
-rw-r--r--www-apps/heatmiser/files/heatmiser.conf10
-rwxr-xr-xwww-apps/heatmiser/files/heatmiser.initd24
-rw-r--r--www-apps/heatmiser/heatmiser-9999.ebuild93
4 files changed, 132 insertions, 0 deletions
diff --git a/www-apps/heatmiser/Manifest b/www-apps/heatmiser/Manifest
new file mode 100644
index 00000000..eb0cd6ff
--- /dev/null
+++ b/www-apps/heatmiser/Manifest
@@ -0,0 +1,5 @@
+AUX heatmiser.conf 231 SHA256 6a884ea715a0f5637e34511bac14e3f6620ddf32b6ff2d49d9ca48273832b4f0 SHA512 381da067386ef56156621e96141bfc74463ebf40c95840e18b1242d1614cf128d6622a3bce21f421c295cc19d17986a20035e413247ccdbc59677c2c88be158e WHIRLPOOL da21d0b0973d470e6f24e2619808607947a6141fd3cff98249ac1f290c66ac82735949250231b54b3e0397b92f959c760fbbb904fb89a398c93c38c6f29ae3f8
+AUX heatmiser.initd 623 SHA256 8d89f36d59e15062059d10197d452797a33a5994fc5be5ffcfedd146bcaa125d SHA512 6093b47b748c234f8ae5e94c43ae1bc8855f911d223297c4f253ced76e5562f0e82b10a3fa3154e5f6819e95e643a98a9cfb5c9f18be6ef693f6441588d0a862 WHIRLPOOL 01e84c643524a5d4b0d03c176ceb508a4e16d12465921a04dea69085d4969d0d7709fa5e5b64d4c24c292f2df7f9aa9d15a793326f20e3c9452f3467b7fdc79d
+DIST Highstock-1.1.5.zip 303571 SHA256 62982a1950b59a7dddeffbe831976063547c52e4b42bcd2b552e7edd30794846 SHA512 97f72d57b328b4791ac9d79c41ce9f309befb7595adc272f2dec56c675219e8e29c73a5faab56f29f16bd71061736e61ee710ca554f064c16744fa0cfb517240 WHIRLPOOL 0cc987d1316a64d11374400e73b3120c0752ae6065d13d4af81ee216be01efc12b68f70ef3e4a79e5582187e37e49155b1d76d8c3d1175cb496a9ea02a51fba4
+DIST jquery-ui.min.js 186173 SHA256 e21e121c209400a165ef1585f49799a7db6753c9663396ede86de434ae84e1e9 SHA512 4bfc6fbf65cee94f3579aa1f5b03454b01c8d557da30524baf727d19423929eabf786390d3ce0fab0645f2daba5494ad332466f27019b3e60fd2031aa6f6d078 WHIRLPOOL 7de212dd7cfa396f92a6bf1dff419f13af6f7e4a64e71d11cce1c42c694801df7749cdfc6e369ced2d172e2e937ac7ef21a30eff1cfd9a3bf0c3c10b412d63ef
+EBUILD heatmiser-9999.ebuild 2291 SHA256 6a71d6ba1d51441932c3a82875c1fbc9234c3fe0c91234952856039223b1a5c8 SHA512 452a871f46f0074548826200513c13c5112a954e6449ae05510662ad148d7b0b8d7d5c5b93001f0ba64844cc46d21de66e0d1787f14cd32f5edc4f7e23cc60f4 WHIRLPOOL 46a76b5eec3f08589f9432d9e644be81ae9d8d4144db80e9e4e75094e6d6b062c89547e2c0b65242b8cb871d65b9cd5cc20b10b4a2a21a30c9dce09d6410dae2
diff --git a/www-apps/heatmiser/files/heatmiser.conf b/www-apps/heatmiser/files/heatmiser.conf
new file mode 100644
index 00000000..52b7371c
--- /dev/null
+++ b/www-apps/heatmiser/files/heatmiser.conf
@@ -0,0 +1,10 @@
+HOST heatmiser1 heatmiser2 heatmiser3
+PIN 1234
+LOGSECONDS 1
+WSERVICE wunderground
+WKEY 0123456789abcdef
+WLOCATION pws:ICAMBSCO1
+DBSOURCE dbi:mysql:heatmiser
+DBUSER heatmiser
+DBPASSWORD heatmiser
+LOGFILE /var/log/heatmiser.log
diff --git a/www-apps/heatmiser/files/heatmiser.initd b/www-apps/heatmiser/files/heatmiser.initd
new file mode 100755
index 00000000..f1d8e6e2
--- /dev/null
+++ b/www-apps/heatmiser/files/heatmiser.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License v2
+
+PERL="$( type -pf perl )"
+NAME=heatmiser_daemon.pl
+DAEMON=/usr/libexec/heatmiser/$NAME
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+
+depend() {
+ need mysql
+}
+
+start() {
+ ebegin "Starting Heatmiser Logger"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PERL -- $DAEMON $DAEMON_ARGS
+ eend $? "Unable to start Logging Daemon"
+}
+
+stop() {
+ ebegin "Stopping Heatmiser Logger"
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --interpreted --exec $PERL $DAEMON
+ eend $? "Unable to stop Logging Daemon"
+}
diff --git a/www-apps/heatmiser/heatmiser-9999.ebuild b/www-apps/heatmiser/heatmiser-9999.ebuild
new file mode 100644
index 00000000..9a66fec1
--- /dev/null
+++ b/www-apps/heatmiser/heatmiser-9999.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit subversion webapp
+
+DESCRIPTION="Perl scripts and web interface for Heatmiser Wi-Fi Thermostats"
+HOMEPAGE="http://code.google.com/p/heatmiser-wifi/"
+SRC_URI="http://code.jquery.com/ui/1.7.2/jquery-ui.min.js \
+http://www.highcharts.com/downloads/zips/Highstock-1.1.5.zip"
+ESVN_REPO_URI="http://heatmiser-wifi.googlecode.com/svn/trunk/"
+RESTRICT="nomirror"
+
+LICENSE="GPL-2"
+SLOT="0"
+WEBAPP_MANUAL_SLOT="yes"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND} \
+ virtual/perl-Time-HiRes \
+ dev-perl/JSON \
+ dev-perl/File-HomeDir \
+ dev-perl/Proc-Daemon \
+ dev-perl/Proc-PID-File"
+
+need_httpd_cgi
+
+src_unpack() {
+ subversion_src_unpack
+
+ for FILE in $A; do
+ case "$( basename "$FILE" | sed 's/^.*\.//' )" in
+ js)
+ if [[ "$FILE" == "jquery-ui.min.js" ]]; then
+ cp "$DISTDIR"/"$FILE" "${WORKDIR}"/jquery-1.7.2.min.js || die "File copy failed for file '$FILE'"
+ else
+ die "File copy failed for unkown file '$FILE'"
+ fi
+ ;;
+ zip)
+ unpack "$FILE" || die "Unpack failed for file '$FILE'"
+ ;;
+ *)
+ die "Unknown file format detected for file '$FILE'"
+ ;;
+ esac
+ done
+}
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc COPYING
+
+ insinto "${MY_HTDOCSDIR}"/
+ doins -r "${WORKDIR}"/jquery-1.7.2.min.js "${WORKDIR}"/js/highstock.js html/index.html
+
+ insinto "${MY_CGIBINDIR}"/"${PN}"/
+ doins bin/heatmiser_config.pm bin/heatmiser_db.pm
+ exeinto "${MY_CGIBINDIR}"/"${PN}"/
+ newexe bin/heatmiser_cgi.pl ajax.pl
+
+ rm bin/heatmiser_cgi.pl 2>/dev/null
+
+ insinto /usr/libexec/"${PN}"/
+ doins bin/*.pm
+ exeinto /usr/libexec/"${PN}"/
+ doexe bin/*.pl
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ #newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ insinto /etc/
+ doins "${FILESDIR}/${PN}.conf"
+
+ keepdir /etc/cron.daily
+ dosym /usr/libexec/"${PN}"/heatmiser_time.pl /etc/cron.daily/heatmiser
+
+ # Without this it'll crash at startup. When merging in ROOT= this
+ # won't be created by default, so we want to make sure we got it!
+ keepdir /var/run
+ fowners root:root /var/run
+ fperms 0755 /var/run
+
+ webapp_src_install
+}
+
+#pkg_postinst() {
+ #elog "The cgi-bin directory for ${PN} is /usr/libexec/${PN}/cgi-bin."
+ #elog "Set up your ScriptAlias or symbolic links accordingly."
+#}