summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Settle2015-08-05 10:04:03 -0400
committerJustin Settle2015-08-05 10:04:03 -0400
commit3d42b6ac3854fea820a00f2c61a24f17b05719a0 (patch)
treea93c5621ab41c468cce0d5c7a6b650e953cfe9b4
downloadaur-3d42b6ac3854fea820a00f2c61a24f17b05719a0.tar.gz
AUR4; Move to 1.3.2
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD69
-rw-r--r--pwrstatd.service8
3 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ad9574677c9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = powerpanel
+ pkgdesc = CyberPower UPS daemon
+ pkgver = 1.3.2
+ pkgrel = 1
+ url = http://www.cyberpowersystems.com
+ arch = x86_64
+ arch = i686
+ license = custom:CyberPower
+ depends = libusb
+ backup = etc/powerpanel/pwrstatd-powerfail.sh
+ backup = etc/powerpanel/pwrstatd-lowbatt.sh
+ backup = etc/powerpanel/pwrstatd-email.sh
+ backup = etc/pwrstatd.conf
+
+pkgname = powerpanel
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..64fdb1389bd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,69 @@
+# Maintainer: Justin Settle <jus10 [at] partlycloudy.org>
+# Contributor: Kyle Keen <keenerd [at] gmail.com>, das-ich <das-ich [at] yandex.ru>
+pkgname=powerpanel
+pkgver=1.3.2
+pkgrel=1
+pkgdesc="CyberPower UPS daemon"
+arch=("x86_64" "i686")
+url="http://www.cyberpowersystems.com"
+license=("custom:CyberPower")
+depends=('libusb')
+backup=(etc/powerpanel/pwrstatd-{powerfail,lowbatt,email}.sh
+ etc/pwrstatd.conf)
+
+if [[ $CARCH = 'x86_64' ]]; then
+ source=(http://www.cyberpowersystems.com/software/powerpanel-$pkgver-$CARCH.tar.gz pwrstatd.service)
+ md5sums=('d69233e117f92611931cb820bad141df'
+ 'b945ff7c15ef206022c8df29a96338c8')
+fi
+
+if [[ $CARCH = 'i686' ]]; then
+ source=(http://www.cyberpowersystems.com/software/powerpanel-$pkgver-i386.tar.gz pwrstatd.service)
+ md5sums=('833f35179a8b0ca303698de08f048c8b'
+ 'b945ff7c15ef206022c8df29a96338c8')
+fi
+
+package() {
+ cd ${srcdir}/$pkgname-$pkgver
+#
+# copy files
+#
+
+# PowerPanel for Linux client program
+install -Dm755 bin/pwrstat ${pkgdir}/usr/bin/pwrstat
+
+# PowerPanel for Linux daemon program
+install -Dm755 bin/pwrstatd ${pkgdir}/usr/bin/pwrstatd
+
+# PowerPanel for Linux daemon configuration
+install -Dm600 conf/pwrstatd.conf ${pkgdir}/etc/pwrstatd.conf
+sed -e 's#/etc#/etc/powerpanel#' -i ${pkgdir}/etc/pwrstatd.conf
+
+# Script command for event of power failure
+install -Dm755 script/pwrstatd-powerfail.sh ${pkgdir}/etc/powerpanel/pwrstatd-powerfail.sh
+
+# Script command for event of battery low
+install -Dm755 script/pwrstatd-lowbatt.sh ${pkgdir}/etc/powerpanel/pwrstatd-lowbatt.sh
+
+# Script command for e-mail notification
+install -Dm755 script/pwrstatd-email.sh ${pkgdir}/etc/powerpanel/pwrstatd-email.sh
+
+# Systemd unit
+install -Dm644 ../pwrstatd.service ${pkgdir}/usr/lib/systemd/system/pwrstatd.service
+
+# PowerPanel for Linux client man-page
+install -Dm644 doc/pwrstat.8 ${pkgdir}/usr/share/man/man8/pwrstat.8
+
+# PowerPanel for Linux daemon man-page
+install -Dm644 doc/pwrstatd.8 ${pkgdir}/usr/share/man/man8/pwrstatd.8
+
+#
+# compress the man page file
+#
+gzip -9 ${pkgdir}/usr/share/man/man8/pwrstat.8
+gzip -9 ${pkgdir}/usr/share/man/man8/pwrstatd.8
+
+# Install License
+install -D -m644 doc/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+}
diff --git a/pwrstatd.service b/pwrstatd.service
new file mode 100644
index 00000000000..9a1160ca5a5
--- /dev/null
+++ b/pwrstatd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=PowerPanel for Linux software can be used with most CyberPower UPS products.
+
+[Service]
+ExecStart=/usr/bin/pwrstatd
+
+[Install]
+WantedBy=multi-user.target