From e091b983da2c83f9e3d631933ebae9f191c0eb77 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 24 Jan 2014 23:54:30 +0100 Subject: add apcupsd-cli Signed-off-by: Florian Pritz --- apcupsd-cli/PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ apcupsd-cli/service | 6 ++++++ 2 files changed, 54 insertions(+) create mode 100644 apcupsd-cli/PKGBUILD create mode 100644 apcupsd-cli/service 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 +# Maintainer: Todd Musall + +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 + -- cgit v1.2.3-24-g4f1b