summaryrefslogtreecommitdiffstats
path: root/apcupsd-cli
diff options
context:
space:
mode:
Diffstat (limited to 'apcupsd-cli')
-rw-r--r--apcupsd-cli/PKGBUILD48
-rw-r--r--apcupsd-cli/service6
2 files changed, 54 insertions, 0 deletions
diff --git a/apcupsd-cli/PKGBUILD b/apcupsd-cli/PKGBUILD
new file mode 100644
index 0000000..0efab4d
--- /dev/null
+++ b/apcupsd-cli/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 8842 2010-01-21 22:55:25Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Todd Musall <tmusall@comcast.net>
+
+pkgname=apcupsd-cli
+_orig=apcupsd
+pkgver=3.14.10
+pkgrel=1
+pkgdesc="Apcupsd version without GUI and webinterface"
+arch=(i686 x86_64)
+url="http://www.apcupsd.org"
+license=('GPL')
+depends=('gcc-libs' systemd-sysvcompat)
+makedepends=('pkgconfig')
+conflicts=('apcupsd')
+backup=(etc/apcupsd/apcupsd.conf
+ etc/apcupsd/changeme
+ etc/apcupsd/commfailure
+ etc/apcupsd/commok
+ etc/apcupsd/offbattery
+ etc/apcupsd/onbattery
+ etc/apcupsd/apccontrol)
+source=(http://downloads.sourceforge.net/apcupsd/$_orig-$pkgver.tar.gz
+ service)
+md5sums=('5928822d855c5cf7ac29655e3e0b8c23'
+ 'ccb06b7c2f680c75c2fa3e5c9aa7a234')
+
+build() {
+ cd "$srcdir/$_orig-$pkgver"
+ ./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib/$_orig \
+ --enable-usb --enable-net \
+ --with-upstype=usb --with-upscable=usb \
+ --with-serial-dev=/dev/usb/hid/hiddev[0-9] \
+ --enable-pthreads
+
+ make
+}
+
+package() {
+ cd "$srcdir/$_orig-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ install -D -m755 "$srcdir/service" "$pkgdir/usr/lib/systemd/system/apcupsd.service"
+
+ rm -rf "$pkgdir/usr/share/hal"
+ chmod 755 $pkgdir/usr/sbin/*
+}
diff --git a/apcupsd-cli/service b/apcupsd-cli/service
new file mode 100644
index 0000000..fc2af28
--- /dev/null
+++ b/apcupsd-cli/service
@@ -0,0 +1,6 @@
+[Service]
+ExecStart=/sbin/apcupsd -b -f /etc/apcupsd/apcupsd.conf
+
+[Install]
+WantedBy=multi-user.target
+