diff options
Diffstat (limited to 'unmaintained/tarantool/APKBUILD')
-rw-r--r-- | unmaintained/tarantool/APKBUILD | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/unmaintained/tarantool/APKBUILD b/unmaintained/tarantool/APKBUILD new file mode 100644 index 0000000000..177b7cec63 --- /dev/null +++ b/unmaintained/tarantool/APKBUILD | |||
@@ -0,0 +1,102 @@ | |||
1 | # Contributor: Carlo Landmeter <clandmeter@gmail.com> | ||
2 | # Contributor: Jakub Jirutka <jakub@jirutka.cz> | ||
3 | # Maintainer: | ||
4 | pkgname=tarantool | ||
5 | pkgver=1.7.4.335 | ||
6 | _series=${pkgver%.*}; _series=${_series%.*} # x.y | ||
7 | pkgrel=8 | ||
8 | pkgdesc="Lua application server integrated with a database management system" | ||
9 | url="https://tarantool.org" | ||
10 | # x86, aarch64: fails to build | ||
11 | # armhf: zstd not available (fails to build) | ||
12 | # ppc64le: not supported by LuaJIT w/o patches | ||
13 | # s390x: not supported by LuaJIT | ||
14 | arch="" | ||
15 | license="BSD-2-Clause MIT Public-Domain" | ||
16 | pkgusers="$pkgname" | ||
17 | pkggroups="$pkgname" | ||
18 | install="$pkgname.pre-install" | ||
19 | checkdepends="python2-dev py2-argparse py2-gevent py2-msgpack py2-six py2-yaml" | ||
20 | makedepends="cmake curl-dev luajit-dev libcoro-dev openssl-dev msgpuck-dev | ||
21 | perl python2 readline-dev yaml-dev zstd-dev" | ||
22 | subpackages="$pkgname-dev $pkgname-doc" | ||
23 | source="http://download.tarantool.org/tarantool/$_series/src/$pkgname-$pkgver.tar.gz | ||
24 | $pkgname.initd | ||
25 | unbundle-dependencies.patch | ||
26 | tests-musl-compat.patch | ||
27 | tests-libressl-compat.patch | ||
28 | fix-compilation-with-libcurl-7.62.0.patch | ||
29 | " | ||
30 | builddir="$srcdir/$pkgname-$pkgver" | ||
31 | |||
32 | prepare() { | ||
33 | default_prepare | ||
34 | cd "$builddir" | ||
35 | |||
36 | # XXX: This test doesn't work, probably due to fakeroot. | ||
37 | rm test/xlog-py/misc.test.py | ||
38 | |||
39 | # msgpuck.h is in /usr/include, not /usr/include/msgpuck. | ||
40 | find . -name '*.c' -o -name '*.cc' \ | ||
41 | | xargs -n 1 sed -Ei 's|#include\s*["<]msgpuck/msgpuck\.h[">]|#include <msgpuck.h>|' | ||
42 | |||
43 | # Remove bundled libraries. | ||
44 | rm -r src/lib/msgpuck | ||
45 | cd third_party | ||
46 | rm -r coro libyaml zstd | ||
47 | } | ||
48 | |||
49 | build() { | ||
50 | cd "$builddir" | ||
51 | |||
52 | # Bundled libraries: | ||
53 | # - libgopt (Public Domain): probably patched, it does not correspond | ||
54 | # to 8.1 as stated in header | ||
55 | # - luajit (MIT): tarantool requires non-exported symbols, so cannot link | ||
56 | # dynamically; linking with system static libluajit doesn't work too | ||
57 | cmake \ | ||
58 | -DCMAKE_BUILD_TYPE=None \ | ||
59 | -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ | ||
60 | -DCMAKE_C_FLAGS="$CFLAGS" \ | ||
61 | -DCMAKE_INSTALL_PREFIX=/usr \ | ||
62 | -DCMAKE_INSTALL_LIBDIR=lib \ | ||
63 | -DCMAKE_INSTALL_SYSCONFDIR=/etc \ | ||
64 | -DCMAKE_SKIP_RPATH=ON \ | ||
65 | -DCMAKE_VERBOSE_MAKEFILE=ON \ | ||
66 | -DENABLE_BUNDLED_LIBCORO=OFF \ | ||
67 | -DENABLE_BUNDLED_LIBGOPT=ON \ | ||
68 | -DENABLE_BUNDLED_LIBYAML=OFF \ | ||
69 | -DENABLE_BUNDLED_LUAJIT=ON \ | ||
70 | -DENABLE_BUNDLED_MSGPUCK=OFF \ | ||
71 | -DENABLE_BUNDLED_ZSTD=OFF \ | ||
72 | -DENABLE_DIST=ON \ | ||
73 | -DWITH_SYSVINIT=OFF \ | ||
74 | -DWITH_SYSTEMD=OFF | ||
75 | make VERBOSE=1 -j2 # there's some problem with parallel build | ||
76 | } | ||
77 | |||
78 | check() { | ||
79 | cd "$builddir"/test | ||
80 | |||
81 | ../src/tarantool --help > /dev/null | ||
82 | |||
83 | # TODO: Some tests are broken, fix it! | ||
84 | # --force means that it will not stop after first error. | ||
85 | #python2 test-run.py --force | ||
86 | } | ||
87 | |||
88 | package() { | ||
89 | cd "$builddir" | ||
90 | |||
91 | make DESTDIR="$pkgdir" install | ||
92 | rm -R "$pkgdir"/etc/default | ||
93 | |||
94 | install -Dm755 "$srcdir"/tarantool.initd "$pkgdir"/etc/init.d/tarantool | ||
95 | } | ||
96 | |||
97 | sha512sums="c95a6900d9e9b9963bb038f28f3e47d0f8fd66159efef99b98b792cd08748481043d9a2a39c1c455094725e1ac213df731280587b93746ecb7bea2431deb7bf3 tarantool-1.7.4.335.tar.gz | ||
98 | fe463c4b6ab8708ea6ec17bb6a887677ae131a489d2ce299ce951790b7c134ff356bc1a4d4745878beec3600ec702944c2329a3f02645f8ab0a0eb24edb6215a tarantool.initd | ||
99 | b48eefdf71e20db22c4366e4573441a0d4e5f6e727fc23b2b41534e8d5cc7dc9cc08baf2bf1cf1950c7b0e211920abb4254c2d1e972ec884db25800820824f2c unbundle-dependencies.patch | ||
100 | f6fec037780f830eb353b184d190b5dc8b481164c9cd06991f921d70be8cababb5dba43e5af96abe6fb87fda44c5573d706f7b032bc996d33debb7811b84addb tests-musl-compat.patch | ||
101 | 146744f2e7265de2644c03d7beb6ce1657b63a99db9c4527cb603c915082dc1184a90e92ba39bfb946f2f8f7a2b866cc8343c7e865d4245fe704447a59cc4846 tests-libressl-compat.patch | ||
102 | db687fee5cc6cc975d560f17abf51a6a258a964ab1322ee5d209a153d98c80263fc36f0ae8e78d480dc9f0fb68d4de1e01174d111eb21e794c89d38934b85b01 fix-compilation-with-libcurl-7.62.0.patch" | ||