summaryrefslogtreecommitdiff
path: root/community/apcupsd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-09-04 00:04:04 +0000
committerroot <root@rshg054.dnsready.net>2012-09-04 00:04:04 +0000
commit8b7b4f2e5a808cb0c1226c23469fa57751eba190 (patch)
treed3b039c682e3991febbfa886b15b31cf09d048b8 /community/apcupsd
parent81de702a6fc79e430129a7d2b708d90f43ae5ba1 (diff)
Tue Sep 4 00:04:04 UTC 2012
Diffstat (limited to 'community/apcupsd')
-rw-r--r--community/apcupsd/PKGBUILD46
-rwxr-xr-xcommunity/apcupsd/apcupsd2
-rw-r--r--community/apcupsd/apcupsd-tmpfiles.conf2
3 files changed, 29 insertions, 21 deletions
diff --git a/community/apcupsd/PKGBUILD b/community/apcupsd/PKGBUILD
index 6a2070b14..26336fecb 100644
--- a/community/apcupsd/PKGBUILD
+++ b/community/apcupsd/PKGBUILD
@@ -1,40 +1,48 @@
-# $Id: PKGBUILD 74550 2012-07-30 13:54:14Z mtorromeo $
+# $Id: PKGBUILD 75815 2012-09-01 11:15:13Z mtorromeo $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Todd Musall <tmusall@comcast.net>
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=apcupsd
pkgver=3.14.10
-pkgrel=2
-pkgdesc="power mangement and controlling most of APC's UPS models"
+pkgrel=3
+pkgdesc="Power mangement and controlling most of APC's UPS models"
arch=(i686 x86_64)
url="http://www.apcupsd.org"
license=('GPL')
depends=('gcc-libs')
optdepends=('gd: for CGI'
- 'gconf: for frontend'
- 'gtk2: for frontend')
+ 'gconf: for frontend'
+ 'gtk2: for frontend')
makedepends=('pkgconfig' 'gd' 'gconf' 'gtk2')
backup=(etc/apcupsd/apcupsd.conf etc/apcupsd/hosts.conf
etc/apcupsd/multimon.conf)
source=(http://downloads.sourceforge.net/apcupsd/$pkgname-$pkgver.tar.gz
- apcupsd
- apcupsd.service)
-md5sums=('5928822d855c5cf7ac29655e3e0b8c23'
- '8bc674da24188c69b0ad5d7fe7510f73'
- '3baf366b2cfabf83a206a1cb0c8f4c26')
+ apcupsd
+ apcupsd.service
+ apcupsd-tmpfiles.conf)
+sha256sums=('0707b5ec9916fbde9e44eb8d18037c8d8f75dfd6aeef51aba5487e189eef2032'
+ 'cae38570847f5d90f38a0634e502f35d6c76a9c928b3a322e3fe1a097fbbc04a'
+ 'fef0b088daa7d652b8c30e6105318cff547ad2504627efabd014083eabc7182d'
+ 'b00cd1a31de70a172698d486583aa79113b99c1bb4b882ab906d0e37504d7f55')
build() {
- cd "$srcdir/$pkgname-$pkgver"
- ./configure --prefix=/usr --libexecdir=/usr/lib/$pkgname \
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --libexecdir=/usr/lib/$pkgname \
--enable-cgi --enable-usb --enable-net \
--with-upstype=usb --with-upscable=usb \
--with-serial-dev=/dev/usb/hid/hiddev[0-9] \
--enable-pthreads --enable-gapcmon
- make
- make DESTDIR="$pkgdir" install
- install -Dm755 "$srcdir/apcupsd" "$pkgdir/etc/rc.d/apcupsd"
- install -Dm644 "$srcdir/apcupsd.service" "$pkgdir/usr/lib/systemd/system/apcupsd.service"
- chmod 755 "$pkgdir"/sbin/*
- install -dm755 "$pkgdir/usr/lib/$pkgname/cgi-bin"
- mv "$pkgdir"/etc/apcupsd/*.cgi "$pkgdir/usr/lib/$pkgname/cgi-bin"
+ make
}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ install -Dm755 "$srcdir/apcupsd" "$pkgdir/etc/rc.d/apcupsd"
+ install -Dm644 "$srcdir/apcupsd.service" "$pkgdir/usr/lib/systemd/system/apcupsd.service"
+ install -Dm644 "$srcdir/apcupsd-tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/apcupsd.conf"
+ chmod 755 "$pkgdir"/sbin/*
+ install -dm755 "$pkgdir/usr/lib/$pkgname/cgi-bin"
+ mv "$pkgdir"/etc/apcupsd/*.cgi "$pkgdir/usr/lib/$pkgname/cgi-bin"
+} \ No newline at end of file
diff --git a/community/apcupsd/apcupsd b/community/apcupsd/apcupsd
index 73ca2b4bf..8a96e9b07 100755
--- a/community/apcupsd/apcupsd
+++ b/community/apcupsd/apcupsd
@@ -7,8 +7,6 @@ PID=`pidof -o %PPID /sbin/apcupsd`
case "$1" in
start)
stat_busy "Starting APCUPSD Daemon"
- rm -f /etc/apcupsd/powerfail
- rm -f /etc/nologin
[ -z "$PID" ] && /sbin/apcupsd -f /etc/apcupsd/apcupsd.conf
if [ $? -gt 0 ]; then
stat_fail
diff --git a/community/apcupsd/apcupsd-tmpfiles.conf b/community/apcupsd/apcupsd-tmpfiles.conf
new file mode 100644
index 000000000..0ceb4106b
--- /dev/null
+++ b/community/apcupsd/apcupsd-tmpfiles.conf
@@ -0,0 +1,2 @@
+r /etc/apcupsd/powerfail
+r /etc/nologin \ No newline at end of file