summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2014-08-16 17:52:35 (GMT)
committerJames Meyer <james.meyer@operamail.com>2014-08-16 17:59:21 (GMT)
commit246d1ee4b7f16459456838d12c8036c7a97823c1 (patch)
tree3cb71e9842cf4e42d85fd05a35a702a6d7172ee2 /abs
parent1a7155936ea17b6f1b1ffd31aaed8a34371a0e9f (diff)
downloadlinhes_pkgbuild-246d1ee4b7f16459456838d12c8036c7a97823c1.zip
linhes_pkgbuild-246d1ee4b7f16459456838d12c8036c7a97823c1.tar.gz
linhes_pkgbuild-246d1ee4b7f16459456838d12c8036c7a97823c1.tar.bz2
network-ups-tools: 2.7.2
refs #961
Diffstat (limited to 'abs')
-rw-r--r--abs/extra/network-ups-tools/PKGBUILD68
-rw-r--r--abs/extra/network-ups-tools/finish.upsd16
-rw-r--r--abs/extra/network-ups-tools/network-ups-tools.tar.gzbin1722 -> 0 bytes
-rw-r--r--abs/extra/network-ups-tools/nut-driver.service.patch14
-rw-r--r--abs/extra/network-ups-tools/run.upsd21
-rw-r--r--abs/extra/network-ups-tools/upsd.init43
6 files changed, 39 insertions, 123 deletions
diff --git a/abs/extra/network-ups-tools/PKGBUILD b/abs/extra/network-ups-tools/PKGBUILD
index 50afbcc..1a422ff 100644
--- a/abs/extra/network-ups-tools/PKGBUILD
+++ b/abs/extra/network-ups-tools/PKGBUILD
@@ -1,57 +1,67 @@
-# Maintainer: Alex Reznichenko <sa5gap@yandex.ru>
+# Maintainer: Florian Bruhin (The Compiler) <archlinux.org@the-compiler.org>
+# Contributor: Alex Reznichenko <sa5gap@yandex.ru>
# Contributor: Roman Kyrylych <roman@archlinux.org>
# Contributor: Giuseppe Lucarelli <luk@rebelsoft.org>
+# Contributor: Dan Ziemba <zman0900@gmail.com>
pkgname=network-ups-tools
-pkgver=2.6.5
-pkgrel=2
+pkgver=2.7.2
+pkgrel=1
pkgdesc="NUT is a collection of programs for monitoring and administering UPS hardware"
arch=('i686' 'x86_64')
url="http://www.networkupstools.org/"
license=('GPL2')
-depends=('openssl' 'libusb-compat')
-makedepends=()
+depends=('openssl' 'libusb-compat' 'libltdl' 'neon' 'net-snmp')
+makedepends=('asciidoc')
backup=(etc/ups/{ups.conf,upsd.conf,upsd.users,upsmon.conf,upssched.conf})
install=nut.install
-source=("http://www.networkupstools.org/source/2.6/nut-$pkgver.tar.gz"
- 'upsd.init' 'nut-driver.service.patch')
+source=("http://www.networkupstools.org/source/2.7/nut-${pkgver}.tar.gz"
+ "http://www.networkupstools.org/source/2.7/nut-${pkgver}.tar.gz.sig")
options=('!emptydirs' '!libtool')
-md5sums=('e6eac4fa04baff0d0a827d64efe81a7e'
- '089ea4a56552253328d17603ff5670cc'
- 'ee3aa25a08caca24f51951ee1f090c44')
+sha256sums=('4d5365359b059d96dfcb77458f361a114d26c84f1297ffcd0c6c166f7200376d'
+ 'SKIP')
build() {
-
- cd $srcdir/nut-$pkgver
+ cd "$srcdir/nut-$pkgver"
./configure \
--without-wrap \
--with-user=ups \
--with-group=nut \
+ --disable-static \
+ --with-serial \
--with-usb \
+ --with-doc=html-single \
+ --without-avahi \
+ --with-snmp \
+ --with-neon \
+ --without-powerman \
+ --without-ipmi \
+ --without-freeipmi \
+ --with-libltdl \
+ --without-cgi \
--prefix=/usr \
--with-udev-dir=/usr/lib/udev \
--with-systemdsystemunitdir=/lib/systemd/system \
--datadir=/usr/share/ups \
- --sysconfdir=/etc/ups || return 1
-
- make || return 1
-
+ --sbindir=/usr/bin \
+ --with-drvpath=/usr/bin \
+ --sysconfdir=/etc/ups \
+ --with-openssl
+ make
}
package() {
+ cd "$srcdir/nut-$pkgver"
+ make DESTDIR="$pkgdir" install
- cd $srcdir/nut-$pkgver
- make DESTDIR=$pkgdir install || return 1
-
- install -D -m755 $startdir/upsd.init $pkgdir/etc/rc.d/upsd || return 1
- install -D -m644 conf/ups.conf.sample $pkgdir/etc/ups/ups.conf
- install -D -m640 conf/upsd.conf.sample $pkgdir/etc/ups/upsd.conf
- install -D -m640 conf/upsd.users.sample $pkgdir/etc/ups/upsd.users
- install -D -m640 conf/upsmon.conf.sample $pkgdir/etc/ups/upsmon.conf
- install -D -m644 conf/upssched.conf.sample $pkgdir/etc/ups/upssched.conf
-
- # Fix systemd's nut-driver.service
- cd $pkgdir
- patch -p1 < ../nut-driver.service.patch
+ install -D -m644 "conf/ups.conf.sample" "$pkgdir/etc/ups/ups.conf"
+ install -D -m640 "conf/upsd.conf.sample" "$pkgdir/etc/ups/upsd.conf"
+ install -D -m640 "conf/upsd.users.sample" "$pkgdir/etc/ups/upsd.users"
+ install -D -m640 "conf/upsmon.conf.sample" "$pkgdir/etc/ups/upsmon.conf"
+ install -D -m644 "conf/upssched.conf.sample" "$pkgdir/etc/ups/upssched.conf"
+ install -d -v -m755 "$pkgdir/usr/share/doc/network-ups-tools/images/cables"
+ install -v -m 644 docs/*.html "$pkgdir/usr/share/doc/network-ups-tools"
+ install -v -m 644 docs/images/*.png "$pkgdir/usr/share/doc/network-ups-tools/images"
+ install -v -m 644 docs/images/cables/*.{png,jpg} "$pkgdir/usr/share/doc/network-ups-tools/images/cables"
}
diff --git a/abs/extra/network-ups-tools/finish.upsd b/abs/extra/network-ups-tools/finish.upsd
deleted file mode 100644
index 8eb335b..0000000
--- a/abs/extra/network-ups-tools/finish.upsd
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PID=`pidof -o %PPID /usr/sbin/upsd`
- stat_runit "Stopping UPSd Daemon"
- /usr/bin/upsdrvctl stop &> /dev/null
- /usr/sbin/upsmon -c stop &> /dev/null
- [ ! -z "$PID" ] && kill $PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon upsd
- stat_done
- fi
diff --git a/abs/extra/network-ups-tools/network-ups-tools.tar.gz b/abs/extra/network-ups-tools/network-ups-tools.tar.gz
deleted file mode 100644
index eeb2ed6..0000000
--- a/abs/extra/network-ups-tools/network-ups-tools.tar.gz
+++ /dev/null
Binary files differ
diff --git a/abs/extra/network-ups-tools/nut-driver.service.patch b/abs/extra/network-ups-tools/nut-driver.service.patch
deleted file mode 100644
index fec8116..0000000
--- a/abs/extra/network-ups-tools/nut-driver.service.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- pkg/usr/lib/systemd/system/nut-driver.service 2012-10-15 21:50:08.216981122 +0400
-+++ pkg/usr/lib/systemd/system/nut-driver.service 2012-10-15 22:08:44.826990389 +0400
-@@ -4,7 +4,9 @@
- StopWhenUnneeded=yes
-
- [Service]
--ExecStart=${exec_prefix}/bin/upsdrvctl start
--ExecStop=${exec_prefix}/bin/upsdrvctl stop
-+ExecStart=/usr/bin/upsdrvctl start
-+ExecStop=/usr/bin/upsdrvctl stop
- Type=forking
-
-+[Install]
-+WantedBy=multi-user.target
diff --git a/abs/extra/network-ups-tools/run.upsd b/abs/extra/network-ups-tools/run.upsd
deleted file mode 100644
index 83be88d..0000000
--- a/abs/extra/network-ups-tools/run.upsd
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PID=`pidof -o %PPID /usr/sbin/upsd`
-
- stat_runit "Starting UPSd Daemon"
- /usr/bin/upsdrvctl start &> /dev/null
- [ -z "$PID" ] && /usr/sbin/upsd &>/dev/null
- /usr/sbin/upsmon &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon upsd
- stat_done
- fi
-
- while [ -n $PID ] ; do
- sleep 60
- done
diff --git a/abs/extra/network-ups-tools/upsd.init b/abs/extra/network-ups-tools/upsd.init
deleted file mode 100644
index acdd115..0000000
--- a/abs/extra/network-ups-tools/upsd.init
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PID=`pidof -o %PPID /usr/sbin/upsd`
-case "$1" in
- start)
- stat_busy "Starting UPSd Daemon"
- /usr/bin/upsdrvctl start &> /dev/null
- [ -z "$PID" ] && /usr/sbin/upsd &>/dev/null
- /usr/sbin/upsmon &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon upsd
- stat_done
- fi
- ;;
-
- stop)
- stat_busy "Stopping UPSd Daemon"
- /usr/sbin/upsmon -c stop &> /dev/null
- /usr/sbin/upsd -c stop &> /dev/null
- /usr/bin/upsdrvctl stop &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon upsd
- stat_done
- fi
- ;;
-
- restart)
- $0 stop
- sleep 3
- $0 start
- ;;
-
- *)
- cho "usage: $0 {start|stop|restart}"
-esac
-exit 0