summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Mracek2020-02-05 11:02:44 -0500
committerLee Mracek2020-02-05 11:02:44 -0500
commitc7842da41bb6bda77796e25f43eb43198ea5f235 (patch)
tree6243cc7dc2f026467cb429391fa3430ccc9a43ca
parent61a10099e0952296141901ca16d85fe0f4db3594 (diff)
downloadaur-c7842da41bb6bda77796e25f43eb43198ea5f235.tar.gz
Update build to match community/flatbuffers
-rw-r--r--PKGBUILD66
1 files changed, 43 insertions, 23 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9e8bf8cb0cd4..65ef89dd218e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,42 +1,62 @@
-# Maintainer: Jameson Pugh <imntreal@gmail.com>
+# Maintainer: Lee Mracek <lee@leemracek.com>
+# Contributor: Jameson Pugh <imntreal@gmail.com>
-pkgname=flatbuffers-git
-pkgver=r794.a69b19f
+pkgbase=flatbuffers
+pkgname=(flatbuffers-git python-flatbuffers-git)
+pkgver=1856
pkgrel=1
-pkgdesc='An efficient cross platform serialization library for C++, with support for Java, C# and Go (git)'
-arch=('i686' 'x86_64')
-url='http://google.github.io/flatbuffers/'
-license=('GPL')
-makedepends=('cmake' 'git')
-optdepends=('go' 'java-environment' 'mono')
-conflicts=(flatbuffers)
-provides=(flatbuffers)
-source=("git+https://github.com/google/flatbuffers.git")
+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 python-setuptools)
+source=(git+https://github.com/google/flatbuffers)
sha256sums=('SKIP')
pkgver() {
- cd flatbuffers
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd ${srcdir}/${pkgbase}
+ git rev-list --count HEAD
}
prepare() {
- mkdir -p build
+ sed -i 's/-Werror=/-W/g;s/-Werror//g' $pkgbase/CMakeLists.txt
}
-build() {
- cd build
- cmake ../flatbuffers \
+build() {
+ cd $pkgbase
+ cmake . \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DFLATBUFFERS_BUILD_FLATLIB=OFF \
+ -DFLATBUFFERS_BUILD_SHAREDLIB=ON
make
+
+# Python bindings
+ cd ../$pkgbase/python
+ VERSION=$pkgver python setup.py build
}
check() {
- cd build
- make test
+ cd $pkgbase
+ make test
+ ./tests/PythonTest.sh
}
-package() {
- cd build
+package_flatbuffers-git() {
+ conflicts=('flatbuffers')
+ provides=('flatbuffers')
+ cd $pkgbase
make DESTDIR="$pkgdir" install
+ install -Dm755 flatc -t "$pkgdir"/usr/bin
+}
+
+package_python-flatbuffers-git() {
+ pkgdesc='An efficient cross platform serialization library for Python'
+ conflicts=('python-flatbuffers')
+ depends=(python)
+ provides=('python-flatbuffers')
+
+ cd $pkgbase/python
+ VERSION=$pkgver python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}