Subject: [alpine-aports] [PATCH] testing/rethinkdb: change licenst to Apache 2.0

From: Valery Kartel <[email-masked]>
Date: Tue, 7 Feb 2017 01:14:10 +0200

--
cleanups in apkbuild
*.sample config moved to -doc subpackage
---
 testing/rethinkdb/APKBUILD | 35 +++++++++++++++--------------------
 1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/testing/rethinkdb/APKBUILD b/testing/rethinkdb/APKBUILD
index f11db589e5..9696e83fd3 100644
--- a/testing/rethinkdb/APKBUILD
+++ b/testing/rethinkdb/APKBUILD
@@ -2,11 +2,11 @@
 # Maintainer: Daniel Treadwell <[email-masked]>
 pkgname=rethinkdb
 pkgver=2.3.5
-pkgrel=3
+pkgrel=4
 pkgdesc="Distributed powerful and scalable NoSQL database"
 url="http://www.rethinkdb.com"
 arch="x86_64"
-license="AGPL"
+license="ASL 2.0"
 depends=""
 makedepends="bash python2 linux-headers bsd-compat-headers m4 paxmark
 	protobuf-dev icu-dev libressl-dev curl-dev boost-dev libexecinfo-dev"
@@ -14,23 +14,13 @@ install=""
 pkgusers=rethinkdb
 pkggroups=rethinkdb
 subpackages="$pkgname-doc"
-source="http://download.rethinkdb.com/dist/rethinkdb-$pkgver.tgz
+source="http://download.rethinkdb.com/dist/$pkgname-$pkgver.tgz
 	libressl.patch
 	rethinkdb.initd"
-
-_builddir="$srcdir"/rethinkdb-$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
-}
+builddir="$srcdir/rethinkdb-$pkgver"
 
 build() {
-	cd "$_builddir"
+	cd "$builddir"
 	./configure \
 		--prefix=/usr \
 		--sysconfdir=/etc \
@@ -53,21 +43,26 @@ build() {
 }
 
 package() {
-	cd "$_builddir"
+	cd "$builddir"
 	make DESTDIR="$pkgdir" install || return 1
-	install -Dm 644 "$pkgdir"/etc/rethinkdb/default.conf.sample \
-		"$pkgdir"/etc/rethinkdb/default.conf || return 1
+	install -Dm 644 "$pkgdir"/etc/$pkgname/default.conf.sample \
+		"$pkgdir"/etc/$pkgname/default.conf || return 1
 	sed -e 's|# directory=/var/lib/rethinkdb|directory=/var/lib/rethinkdb|' \
 		-e 's|# pid-file=/var/run/rethinkdb/rethinkdb.pid|pid-file=/var/run/rethinkdb.pid|' \
 		-e 's|# runuser=rethinkdb|runuser=rethinkdb|' \
 		-e 's|# rungroup=rethinkdb|rungroup=rethinkdb|' \
-		-i "$pkgdir"/etc/rethinkdb/default.conf || return 1
-	install -d -o $pkgname -g $pkgname "$pkgdir"/var/lib/rethinkdb || return 1
+		-i "$pkgdir"/etc/$pkgname/default.conf || return 1
+	install -d -o $pkgname -g $pkgname "$pkgdir"/var/lib/$pkgname || return 1
 	install -Dm755 "$srcdir"/$pkgname.initd \
 		"$pkgdir"/etc/init.d/$pkgname || return 1
 	paxmark -m "$pkgdir"/usr/bin/rethinkdb || return 1
 }
 
+doc() {
+	default_doc || return 1
+	mv "$pkgdir"/etc/$pkgname/*.sample "$subpkgdir"/usr/share/doc/$pkgname
+}
+
 md5sums="89614869d931f8c6e7473e66887089ca  rethinkdb-2.3.5.tgz
 cc978791a4e4545190d0063b46aa3dd0  libressl.patch
 bb1cde2ba1d6a71ed79c31161b1bf64b  rethinkdb.initd"
-- 
2.11.0

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