blob: 808c68b73fc416227cf8c1851d8ea3a4ff08b30c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=rethinkdb
pkgver=2.0.3
pkgrel=0
pkgdesc="Distributed powerful and scalable NoSQL database"
url="http://www.rethinkdb.com"
arch="all"
license="AGPL"
depends=""
depends_dev="protobuf-dev icu-dev openssl-dev curl-dev boost-dev
libexecinfo-dev"
makedepends="$depends_dev bash python linux-headers bsd-compat-headers m4
paxmark"
install=""
pkgusers=rethinkdb
pkggroups=rethinkdb
subpackages="$pkgname-doc"
source="http://download.rethinkdb.com/dist/rethinkdb-$pkgver.tgz
musl-fixes.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
}
build() {
cd "$_builddir"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--fetch v8 \
--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 || paxmark -m \
build/external/v8_3.30.33.16/build/out/${_arch}.release/mksnapshot
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
install -Dm 644 "$pkgdir"/etc/rethinkdb/default.conf.sample \
"$pkgdir"/etc/rethinkdb/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
install -Dm755 "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname || return 1
paxmark -m "$pkgdir"/usr/bin/rethinkdb || return 1
rm -f "$pkgdir"/usr/lib/*.la
}
md5sums="686759f867a8de3785e6ac8391c559ba rethinkdb-2.0.3.tgz
b34becef5ce6d0b95316159b6b2cf578 musl-fixes.patch
bb1cde2ba1d6a71ed79c31161b1bf64b rethinkdb.initd"
sha256sums="4d0fa17521d88594491a5550d18adc42f14115724af1b45abe13f14959810095 rethinkdb-2.0.3.tgz
db39679ec81a65e047f62d080557b22debe6a53dd49189541d53397ee650b563 musl-fixes.patch
d7294473f30cd2fa7837de6ed4816efd2c8663a15c7396d8c37a0a9f2fc1a787 rethinkdb.initd"
sha512sums="219f07211b5d06278c1fa603c9b204c1a6c510b57d47a22e6082f247755ff2b23febf57dad47aa882acb8efe6bbca0700a5037918dabad44f8281c22f7bc97f4 rethinkdb-2.0.3.tgz
a94b7de3526f37dc73bc39fd4a3a96e97a0336a949bacdc72162736896c91b0b967842928ffb67eff6bac055d3ccd949d944a551b6a915da9219ee50c95b79ce musl-fixes.patch
d9997f453623e4a85e19052464d97738be70277fd14b985e9123414792b85cf5e5b30e8ecb94b48cdab43c4fb39898ca35e7fbc8943e13f95db2a992ba2289a1 rethinkdb.initd"
|