aboutsummaryrefslogtreecommitdiffstats
path: root/community/rethinkdb/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/rethinkdb/APKBUILD')
-rw-r--r--community/rethinkdb/APKBUILD73
1 files changed, 73 insertions, 0 deletions
diff --git a/community/rethinkdb/APKBUILD b/community/rethinkdb/APKBUILD
new file mode 100644
index 0000000000..6f4c72d389
--- /dev/null
+++ b/community/rethinkdb/APKBUILD
@@ -0,0 +1,73 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Daniel Treadwell <daniel@djt.id.au>
+pkgname=rethinkdb
+pkgver=2.3.5
+pkgrel=7
+pkgdesc="Distributed powerful and scalable NoSQL database"
+url="http://www.rethinkdb.com"
+arch="x86_64"
+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"
+install="$pkgname.pre-install"
+pkgusers=rethinkdb
+pkggroups=rethinkdb
+subpackages="$pkgname-doc"
+source="http://download.rethinkdb.com/dist/$pkgname-$pkgver.tgz
+ libressl.patch
+ rethinkdb.initd
+ rethinkdb.confd
+ "
+builddir="$srcdir/rethinkdb-$pkgver"
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --dynamic all \
+ --with-system-malloc \
+ || return 1
+
+ local _arch
+ case $CARCH in
+ x86) _arch=ia32 ;;
+ x86_64) _arch=x64 ;;
+ esac
+
+ export LDFLAGS="$LDFLAGS -lexecinfo"
+ make CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks" \
+ || paxmark -m \
+ build/external/v8_3.30.33.16/build/out/${_arch}.release/mksnapshot
+ make CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks" || return 1
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install || 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/$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
+ install -Dm644 "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.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
+}
+
+sha512sums="ac71656fd2451fd36432fa0f7d2c16c2be53888f748d88f0bfc2fb9ad7cd3c704b56551bc35eda72eb08fffdd799727a3cbe83830337cf71e17c159588d33c94 rethinkdb-2.3.5.tgz
+9ff727feedc7a9f58e7bf8554dc26e32ebca259b2d5d75ff0d064f5aea7a54c9c94fab16b83a3bc4039d4ae6d6d805d7b129ab9d5f762186d0388adeeff6e67c libressl.patch
+c27e21073048bd5e8e2ec91303b43ce873748573e2b44ba28ee57ca1b3080afb67e56880b6a6da7a0abf4f2967dce45aa27fe8d6dd44b70d874d776e876ef132 rethinkdb.initd
+3a07f9c78ef96b2ca37fca508ee14a644d3c08612f662ba5260182fbfcceba064d20253f1261f56dc0a2c28d1a4d5e2320872c3c4e7595cb7ab4e202eb28ad42 rethinkdb.confd"