blob: 54ab27c15fb848ec8e5acb6cae505115de802e93 (
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
|
# Maintainer: Lee Mracek <lee@leemracek.com>
# Contributor: Jameson Pugh <imntreal@gmail.com>
pkgbase=flatbuffers-git
_gitbase=flatbuffers
pkgname=(flatbuffers-git python-flatbuffers-git)
epoch=1
pkgver=2.0.6.r130.g6e279164
pkgrel=1
pkgdesc='An efficient cross platform serialization library for C++, with support for Java, C# and Go'
arch=(x86_64)
url='https://google.github.io/flatbuffers/'
license=(Apache)
depends=(gcc-libs)
makedepends=(cmake git python-setuptools)
source=(git+https://github.com/google/flatbuffers)
sha256sums=('SKIP')
pkgver() {
cd ${srcdir}/${_gitbase}
git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
sed -i 's/-Werror=/-W/g;s/-Werror//g' $_gitbase/CMakeLists.txt
}
build() {
cd $_gitbase
cmake . \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DFLATBUFFERS_BUILD_FLATLIB=OFF \
-DFLATBUFFERS_BUILD_SHAREDLIB=ON
make
# Python bindings
cd ../$_gitbase/python
VERSION=$pkgver python setup.py build
}
check() {
cd $_gitbase
make test
# python tests currently test multiple interpreters/benchmarks
# and we don't need that
# ./tests/PythonTest.sh
}
package_flatbuffers-git() {
conflicts=('flatbuffers')
provides=("flatbuffers=$pkgver")
cd $_gitbase
make DESTDIR="$pkgdir" install
install -Dm755 flatc -t "$pkgdir"/usr/bin
}
package_python-flatbuffers-git() {
pkgdesc='An efficient cross platform serialization library for Python'
arch=(any)
conflicts=('python-flatbuffers')
depends=(python)
provides=("python-flatbuffers=$pkgver")
cd $_gitbase/python
VERSION=$pkgver python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
|