Subject: [alpine-aports] [PATCH] testing/suspend-utils: new aport

From: Andrew Hills <[email-masked]>
Date: Mon, 8 Jun 2015 12:36:22 -0400

http://suspend.sourceforge.net
Userspace Software Suspend (µswsusp)
---
 testing/suspend-utils/APKBUILD                | 57 +++++++++++++++++++++++++++
 testing/suspend-utils/define-gnu-source.patch | 30 ++++++++++++++
 2 files changed, 87 insertions(+)
 create mode 100644 testing/suspend-utils/APKBUILD
 create mode 100644 testing/suspend-utils/define-gnu-source.patch

diff --git a/testing/suspend-utils/APKBUILD b/testing/suspend-utils/APKBUILD
new file mode 100644
index 0000000..b6ed147
--- /dev/null
+++ b/testing/suspend-utils/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: Andrew Hills <[email-masked]>
+# Maintainer: Andrew Hills <[email-masked]>
+pkgname=suspend-utils
+pkgver=1.0
+pkgrel=0
+pkgdesc="Userspace Software Suspend (µswsusp)"
+url="http://suspend.sourceforge.net"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev=""
+makedepends="$depends_dev pciutils-dev libx86-dev util-linux-dev linux-headers"
+install=""
+subpackages="$pkgname-doc"
+source="http://sourceforge.net/projects/suspend/files/suspend/suspend-$pkgver/suspend-utils-$pkgver.tar.bz2
+	define-gnu-source.patch"
+
+_builddir="$srcdir"/suspend-utils-$pkgver
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+
+	update_config_sub
+}
+
+build() {
+	cd "$_builddir"
+	export CFLAGS=-std=gnu89
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info \
+		--localstatedir=/var \
+		|| return 1
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+	rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="02f7d4b679bad1bb294a0efe48ce5934  suspend-utils-1.0.tar.bz2
+257194f9de1c5945fb28cbc0b958774c  define-gnu-source.patch"
+sha256sums="0206ba6332860b6da57acc79cc0f8604150ef0835ff9633fd42d59d181a6c85d  suspend-utils-1.0.tar.bz2
+99f6e77021a20b1df769559a501ebbe4b1afd36e19ad1e53a72d8e11f909dc6b  define-gnu-source.patch"
+sha512sums="481f7ab6e6d43b963cf7abf4d16a9911035dbce13d96e11eeadd50bbd2b9671c597eab0e3060536dcb0d6d848e30ac0e7ff534275fc2d66d2064b75066a4adb8  suspend-utils-1.0.tar.bz2
+4acaa74c7466734a7da576e2d0c22a60112cb19d02516328b92ba1943fe280fa1b999be203e6c5fcc3d92d48092a72a6e7f3b2fac614c767f20de2e5c93c8da0  define-gnu-source.patch"
diff --git a/testing/suspend-utils/define-gnu-source.patch b/testing/suspend-utils/define-gnu-source.patch
new file mode 100644
index 0000000..2d289a6
--- /dev/null
+++ b/testing/suspend-utils/define-gnu-source.patch
@@ -0,0 +1,30 @@
+--- suspend-utils-1.0/load.c
++++ suspend-utils-1.0-patch/load.c
+@@ -17,6 +17,7 @@
+ #include <time.h>
+ #include <syscall.h>
+ #include <libgen.h>
++#define _GNU_SOURCE
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <stdio.h>
+--- suspend-utils-1.0/resume.c
++++ suspend-utils-1.0-patch/resume.c
+@@ -18,6 +18,7 @@
+ #include <time.h>
+ #include <syscall.h>
+ #include <libgen.h>
++#define _GNU_SOURCE
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <stdio.h>
+--- suspend-utils-1.0/suspend.c
++++ suspend-utils-1.0-patch/suspend.c
+@@ -24,6 +24,7 @@
+ #include <linux/tiocl.h>
+ #include <syscall.h>
+ #include <libgen.h>
++#define _GNU_SOURCE
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <stdio.h>
-- 
2.4.2

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