updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / powerpanel / PKGBUILD
blob2ebfba0f42790fad518a47279787f8559c83e40a
1 # Contributor: das-ich <das-ich@yandex.ru>
2 pkgname=powerpanel
3 pkgver=1.2
4 pkgrel=1
5 pkgdesc="PowerPanel for Linux software can be used with most CyberPower UPS products."
6 arch=("x86_64" "i686")
7 url="http://www.cyberpowersystems.com"
8 license=("custom:CyberPower")
9 depends=('libusb')
10 source=(http://www.cyberpowersystems.com/software/powerpanel_1.2_x86_64.tar.gz)
11 backup=(etc/pwrstatd-{powerfail,lowbatt,email}.sh
12         etc/pwrstatd.conf)
14 if [ $CARCH = 'x86_64' ]; then
15   md5sums=('170d309c76f5996675a0810ded803841')
18 if [ $CARCH = 'i686' ]; then
19 source=(http://www.cyberpowersystems.com/software/powerpanel_1.2_i386.tar.gz)
20   md5sums=('8ea1fc74f875471ad09dc941e536b4fb')
23 build() {
24         cd $startdir/src/$pkgname-$pkgver-0
26 # copy files
29 # PowerPanel for Linux client program
30 install -Dm755 bin/pwrstat $startdir/pkg/usr/bin/pwrstat
32 # PowerPanel for Linux daemon program
33 install -Dm755 bin/pwrstatd $startdir/pkg/usr/sbin/pwrstatd
35 # PowerPanel for Linux daemon configuration
36 install -Dm600 conf/pwrstatd.conf $startdir/pkg/etc/pwrstatd.conf
37 sed -e 's#/etc#/etc/powerpanel#' -i $startdir/pkg/etc/pwrstatd.conf
39 # Script command for event of power failure
40 install -Dm755 script/pwrstatd-powerfail.sh $startdir/pkg/etc/powerpanel/pwrstatd-powerfail.sh
42 # Script command for event of battery low
43 install -Dm755 script/pwrstatd-lowbatt.sh $startdir/pkg/etc/powerpanel/pwrstatd-lowbatt.sh
45 # Script command for e-mail notification
46 install -Dm755 script/pwrstatd-email.sh $startdir/pkg/etc/powerpanel/pwrstatd-email.sh
48 # Script command for Daemon startup control
49 install -Dm755 script/arch_pwrstatd $startdir/pkg/etc/rc.d/pwrstatd
51 # PowerPanel for Linux client man-page
52 install -Dm644 doc/pwrstat.8 $startdir/pkg/usr/share/man/man8/pwrstat.8
54 # PowerPanel for Linux daemon man-page
55 install -Dm644 doc/pwrstatd.8 $startdir/pkg/usr/share/man/man8/pwrstatd.8
58 # compress the man page file
60 /bin/gzip -9 $startdir/pkg/usr/share/man/man8/pwrstat.8
61 /bin/gzip -9 $startdir/pkg/usr/share/man/man8/pwrstatd.8