Subject: [alpine-devel] new aport apcupsd

From: Leonardo Arena <[email-masked]>
Date: Wed, 21 Jan 2009 11:53:24 +0100

Please review attached patch

Leo
From ee396a72b1ba215bb7acaf279088a164ac1b8adf Mon Sep 17 00:00:00 2001
From: Leonardo Arena <[email-masked]>
Date: Wed, 21 Jan 2009 10:49:02 +0000
Subject: [PATCH] extra/apcupsd: new aport

---
 extra/apcupsd/APKBUILD |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 extra/apcupsd/APKBUILD

diff --git a/extra/apcupsd/APKBUILD b/extra/apcupsd/APKBUILD
new file mode 100644
index 0000000..aab6780
--- /dev/null
+++ b/extra/apcupsd/APKBUILD
@@ -0,0 +1,22 @@
+pkgname=apcupsd
+pkgver=3.14.5
+pkgrel=0
+pkgdesc="A Daemon to control APC UPSes"
+subpackages="$pkgname-doc"
+url="http://www.apcupsd.org"
+license='GPL2'
+depends="uclibc util-linux-ng"
+makedepends="g++"
+source="http://surfnet.dl.sourceforge.net/sourceforge/apcupsd/apcupsd-3.14.5.tar.gz"
+
+build() {
+	cd "$srcdir/$pkgname-$pkgver"
+
+	./configure --prefix=/usr \
+	--mandir=/usr/share/man
+	--enable-usb
+	make || return 1
+	make DESTDIR=$pkgdir install
+}
+
+md5sums="4ac73ec91d8ab56f3fac894e172567c4  apcupsd-3.14.5.tar.gz"
-- 
1.6.1

---

From: Natanael Copa <[email-masked]>
Date: Wed, 21 Jan 2009 14:09:21 +0100

> Please review attached patch

Thanks!

...

> +source="http://surfnet.dl.sourceforge.net/sourceforge/apcupsd/apcupsd-3.14.5.tar.gz"

please use download.sourceforge.net rather than a specific sf mirror.
Also, if you use $pkgver in the source url, then you only need to change
the version number in pkgver when upgrading the package.

source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"

> +md5sums="4ac73ec91d8ab56f3fac894e172567c4  apcupsd-3.14.5.tar.gz"

Otherwise looks good. It needs an init.d script i suppose and we need to
check up if we can use busybox halt rather than depend on util-linux-ng
shutdown.

Hm... it looks like it needs 'wall'. Maybe just keep that util-linux-ng
there.

I alos copied the init.d script from gentoo.

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Leonardo Arena <[email-masked]>
Date: Wed, 21 Jan 2009 14:13:38 +0100

On Wed, Jan 21, 2009 at 2:09 PM, Natanael Copa <[email-masked]>wrote:

> > +source="
> http://surfnet.dl.sourceforge.net/sourceforge/apcupsd/apcupsd-3.14.5.tar.gz
> "
>

ok, right