summaryrefslogtreecommitdiff
path: root/community/rethinkdb/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/rethinkdb/PKGBUILD')
-rw-r--r--community/rethinkdb/PKGBUILD64
1 files changed, 64 insertions, 0 deletions
diff --git a/community/rethinkdb/PKGBUILD b/community/rethinkdb/PKGBUILD
new file mode 100644
index 000000000..9c69e0a37
--- /dev/null
+++ b/community/rethinkdb/PKGBUILD
@@ -0,0 +1,64 @@
+# $Id: PKGBUILD 106066 2014-02-21 22:10:06Z anatolik $
+# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
+# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+# Contributor: Sigmund Lahn <sigmund@lahn.no>
+
+pkgname=rethinkdb
+pkgver=1.11.3
+pkgrel=1
+pkgdesc='An open-source distributed database built with love.'
+arch=(i686 x86_64)
+url='http://www.rethinkdb.com/'
+license=(AGPL)
+depends=(protobuf ncurses gperftools)
+makedepends=(boost python python2 subversion) # subversion is for checking out V8 sources
+backup=(etc/rethinkdb/instances.d/default.conf)
+install=rethinkdb.install
+options=(!emptydirs)
+source=(
+ http://download.rethinkdb.com/dist/rethinkdb-$pkgver.tgz
+ rethinkdb-tmpfile.conf
+ rethinkdb.service
+ build.diff
+)
+sha256sums=('ab59ebe40f4a6a499b27e4ce85818f8ebe88d919d832f22384ba2cdacf0ba267'
+ '656d3a42e75d087e723f71aa320fdd91cbbb82071ef72eb11fd3e4a619b429a4'
+ 'e56bffa2b9ebc3a00ef566ab2be0719a633c89d961a2461dfa2d9ffdb258c1a2'
+ 'd2330ac0d2fd0a8f14daa4993eb49b55b0de544496e15345502fcdea2a6aaf88')
+
+prepare() {
+ cd rethinkdb-$pkgver
+ patch -p1 < "$srcdir/build.diff"
+}
+
+build() {
+ cd rethinkdb-$pkgver
+ ./configure --fetch v8 --disable-drivers --dynamic all --enable-precompiled-web --prefix=/usr --sysconfdir=/etc
+ make
+}
+
+check() {
+ cd rethinkdb-$pkgver
+ make build/release/rethinkdb-unittest
+ # skip some failing tests (should be fixed in 1.12)
+ # https://github.com/rethinkdb/rethinkdb/issues/1059
+ # https://github.com/rethinkdb/rethinkdb/issues/549
+ ./build/release/rethinkdb-unittest --gtest_filter=-TimerTest.TestApproximateWaitTimes:RDBProtocol.OvershardedSindexCreateDrop:RDBProtocol.OvershardedMissingAttr:RDBProtocol.OvershardedOverSizedKeys:RDBBtree.SindexInterruptionViaDrop:RDBBtree.SindexPostConstruct
+}
+
+package() {
+ cd rethinkdb-$pkgver
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 "$srcdir"/rethinkdb-tmpfile.conf "$pkgdir"/usr/lib/tmpfiles.d/rethinkdb.conf
+ install -Dm644 "$srcdir"/rethinkdb.service "$pkgdir"/usr/lib/systemd/system/rethinkdb@.service
+
+ # create 'default' database instance
+ cp "$pkgdir"/etc/rethinkdb/default.conf.sample "$pkgdir"/etc/rethinkdb/instances.d/default.conf
+ 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/default.pid|' \
+ -i "$pkgdir"/etc/rethinkdb/instances.d/default.conf
+
+ # Arch uses systemd, no need for init.d scripts
+ rm -r "$pkgdir"/etc/init.d
+}