[arch-commits] Commit in flatbuffers/repos (2 files)

Felix Yan felixonmars at archlinux.org
Fri Oct 25 20:08:42 UTC 2019


    Date: Friday, October 25, 2019 @ 20:08:41
  Author: felixonmars
Revision: 519753

archrelease: copy trunk to community-staging-x86_64

Added:
  flatbuffers/repos/community-staging-x86_64/
  flatbuffers/repos/community-staging-x86_64/PKGBUILD
    (from rev 519751, flatbuffers/trunk/PKGBUILD)

----------+
 PKGBUILD |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

Copied: flatbuffers/repos/community-staging-x86_64/PKGBUILD (from rev 519751, flatbuffers/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2019-10-25 20:08:41 UTC (rev 519753)
@@ -0,0 +1,53 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Daichi Shinozaki <dsdseg at gmail.com>
+
+pkgbase=flatbuffers
+pkgname=(flatbuffers python-flatbuffers)
+pkgver=1.11.0
+pkgrel=3
+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=($pkgbase-$pkgver.tar.gz::https://github.com/google/$pkgbase/archive/v$pkgver.tar.gz)
+sha256sums=('3f4a286642094f45b1b77228656fbd7ea123964f19502f9ecfd29933fd23a50b')
+
+prepare() {
+  sed -i 's/-Werror=/-W/g;s/-Werror//g' $pkgname-$pkgver/CMakeLists.txt
+}
+
+build() {
+  cd $pkgbase-$pkgver
+  cmake . \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib \
+    -DFLATBUFFERS_BUILD_FLATLIB=OFF \
+    -DFLATBUFFERS_BUILD_SHAREDLIB=ON
+  make
+
+# Python bindings
+  cd ../$pkgbase-$pkgver/python
+  VERSION=$pkgver python setup.py build
+}
+
+check() {
+  cd $pkgbase-$pkgver
+  make test
+  ./tests/PythonTest.sh
+}
+
+package_flatbuffers() {
+  cd $pkgbase-$pkgver
+  make DESTDIR="$pkgdir" install
+  install -Dm755 flatc -t "$pkgdir"/usr/bin
+}
+
+package_python-flatbuffers() {
+  pkgdesc='An efficient cross platform serialization library for Python'
+  depends=(python)
+
+  cd $pkgbase-$pkgver/python
+  VERSION=$pkgver python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+}



More information about the arch-commits mailing list