summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-03-08 16:17:37 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-03-08 16:17:37 (GMT)
commitb40a8579e17e841f738d7b7771cb4d59f5b7baf1 (patch)
treeb50515f0539f9ba058b338d8eebf81a3494b8fb0 /abs
parent1c98c988dec23250e4302a051eda5b3a176e52c6 (diff)
downloadlinhes_pkgbuild-b40a8579e17e841f738d7b7771cb4d59f5b7baf1.zip
linhes_pkgbuild-b40a8579e17e841f738d7b7771cb4d59f5b7baf1.tar.gz
linhes_pkgbuild-b40a8579e17e841f738d7b7771cb4d59f5b7baf1.tar.bz2
protobuf: dep of qt5-webchannel
Diffstat (limited to 'abs')
-rw-r--r--abs/extra/protobuf/PKGBUILD96
1 files changed, 96 insertions, 0 deletions
diff --git a/abs/extra/protobuf/PKGBUILD b/abs/extra/protobuf/PKGBUILD
new file mode 100644
index 0000000..c2c786b
--- /dev/null
+++ b/abs/extra/protobuf/PKGBUILD
@@ -0,0 +1,96 @@
+# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
+# Contributor: Aleksey Filippov <sarum9in@gmail.com>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Thomas S Hatch <thatch45@gmail.com>
+# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgbase='protobuf'
+pkgname=('protobuf' 'python2-protobuf' 'python-protobuf')
+pkgver=3.5.1.1
+_gtestver=1.8.0
+pkgrel=1
+pkgdesc="Protocol Buffers - Google's data interchange format"
+arch=('x86_64')
+url='https://developers.google.com/protocol-buffers/'
+license=('BSD')
+depends=('gcc-libs' 'zlib')
+makedepends=('unzip' 'python-setuptools' 'python2-setuptools' 'clang')
+source=("$pkgbase-$pkgver.tgz::https://github.com/google/${pkgbase}/archive/v${pkgver}.tar.gz"
+ "gtest-${_gtestver}.tar.gz::https://github.com/google/googletest/archive/release-${_gtestver}.tar.gz")
+md5sums=('5005003ae6b94773c4bbca87a644b131'
+ '16877098823401d1bf2ed7891d7dce36')
+
+prepare() {
+ cd "$pkgbase-$pkgver"
+
+ rm -rf gmock && cp -r "$srcdir/googletest-release-${_gtestver}/googlemock" gmock
+ rm -rf googletest && cp -r "$srcdir/googletest-release-${_gtestver}/googletest" googletest
+ ln -sf ../googletest gmock/gtest
+
+ sed -r 's|/usr/bin/env python|/usr/bin/env python2|' -i googletest/scripts/*.py
+}
+
+build() {
+ # GCC is stuck on src/google/protobuf/util/internal/protostream_objectsource_test.cc
+ # and src/google/protobuf/util/internal/protostream_objectwriter_test.cc.
+ export CC=/usr/bin/clang CXX=/usr/bin/clang++
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ ./autogen.sh
+
+ cd "$srcdir/$pkgbase-$pkgver/googletest"
+ ./configure
+ make
+
+ cd "$srcdir/$pkgbase-$pkgver/gmock"
+ ./configure
+ make
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ make -C "$srcdir/$pkgbase-$pkgver" check
+}
+
+package_protobuf() {
+ conflicts=('protobuf' 'protobuf-cpp')
+ provides=('protobuf' 'protobuf-cpp')
+ replaces=('protobuf-cpp')
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 editors/protobuf-mode.el "$pkgdir"/usr/share/emacs/site-lisp/protobuf-mode.el
+}
+
+package_python2-protobuf() {
+ pkgdesc='Python 2 bindings for Google Protocol Buffers'
+ depends=('python2' 'python2-six' "protobuf=$pkgver")
+ conflicts=('python2-protobuf')
+ provides=('python2-protobuf')
+
+ cd "$srcdir/$pkgbase-$pkgver/python"
+ python2 setup.py install --root="$pkgdir"
+
+ install -d "$pkgdir/usr/share/licenses/$pkgname"
+ ln -s "/usr/share/licenses/$pkgbase/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
+}
+
+package_python-protobuf() {
+ pkgdesc='Python 3 bindings for Google Protocol Buffers'
+ depends=('python' 'python-six' "protobuf=$pkgver")
+ conflicts=('python-protobuf')
+ provides=('python-protobuf')
+
+ cd "$srcdir/$pkgbase-$pkgver/python"
+ python3 setup.py install --root="$pkgdir"
+
+ install -d "$pkgdir/usr/share/licenses/$pkgname"
+ ln -s "/usr/share/licenses/$pkgbase/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
+}