Mail archive
alpine-aports

[alpine-aports] [PATCH 9/9] main/s6-linux-init: allow patching, fix broken deps, add doc subpackage

From: Laurent Bercot <ska-devel_at_skarnet.org>
Date: Fri, 4 Nov 2016 19:16:41 +0100

---
 main/s6-linux-init/APKBUILD | 29 ++++++++++++++++++++++-------
 1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/main/s6-linux-init/APKBUILD b/main/s6-linux-init/APKBUILD
index 46c893f..1be58e9 100644
--- a/main/s6-linux-init/APKBUILD
+++ b/main/s6-linux-init/APKBUILD
_at_@ -2,21 +2,30 @@
 # Contributor: Laurent Bercot <ska-devel_at_skarnet.org>
 pkgname=s6-linux-init
 pkgver=0.2.0.0
-pkgrel=0
+pkgrel=1
 pkgdesc="A set of tools to create and run an s6-based init system."
 url="http://skarnet.org/software/$pkgname/"
 arch="all"
 license="ISC"
 depends="skalibs"
-depends_dev="skalibs-dev"
-makedepends="$depends_dev"
+makedepends="skalibs-dev"
 install=""
-subpackages="$pkgname-dev"
+subpackages="$pkgname-doc"
 source="http://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz"
 
-builddir="$srcdir/$pkgname-$pkgver"
+_builddir="$srcdir/$pkgname-$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
+}
+
 build() {
-	cd "$builddir"
+	cd "$_builddir"
 	./configure \
 		--enable-shared \
 		--enable-static \
_at_@ -28,10 +37,16 @@ build() {
 }
 
 package() {
-	cd "$builddir"
+	cd "$_builddir"
 	make DESTDIR="$pkgdir" install || return 1
 }
 
+doc() {
+	default_doc
+	mkdir -p "$subpkgdir/usr/share/doc"
+	cp -a "$_builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
+}
+
 md5sums="24b9b232a5bcbb6be1c592ae1c23eb6d  s6-linux-init-0.2.0.0.tar.gz"
 sha256sums="131484e61eff0e671e112f0436b13e8e7d08752f810d8bec4924a68383eee2b9  s6-linux-init-0.2.0.0.tar.gz"
 sha512sums="16c8c97b65ad533b70ed9dd189827778797dc8d0a70af0880655b5f89a1524cd9d3675cb681b99f4704d43c810a4211c9926bfeb743247d7c29559ec2f77606e  s6-linux-init-0.2.0.0.tar.gz"
-- 
2.8.3
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Nov 04 2016 - 19:16:41 GMT