1 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
2 # Contributor: David Runge <dvzrv@archlinux.org>
3 # Contributor: Aleksey Filippov <sarum9in@gmail.com>
4 # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
5 # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
6 # Contributor: Thomas S Hatch <thatch45@gmail.com>
7 # Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
8 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
11 pkgname=('protobuf' 'python-protobuf')
14 pkgdesc="Protocol Buffers - Google's data interchange format"
16 url='https://developers.google.com/protocol-buffers/'
18 depends=('gcc-libs' 'glibc' 'zlib')
19 makedepends=('unzip' 'python-setuptools')
20 source=("https://github.com/protocolbuffers/$pkgname/releases/download/v$pkgver/$pkgname-all-$pkgver.tar.gz")
21 sha512sums=('4a5e2ba080310492eb4fd8f6d89d46591254544f4fc1ef1b6a3a285aa12089e3124ff41994455b4b77e79eb1e993c68ec9c54e13a78052b9fb29b8cbf1dc67e1')
27 # Don't fail tests on deprecation warnings
28 sed -e "/DeprecationWarning/d" -i python/google/protobuf/internal/*test.py
33 ./configure --prefix=/usr
36 python setup.py build --cpp_implementation
48 replaces=('protobuf-cpp')
49 provides=('libprotoc.so' 'libprotobuf.so' 'libprotobuf-lite.so')
52 make DESTDIR="$pkgdir" install
54 install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
55 install -vDm 644 editors/protobuf-mode.el \
56 -t "$pkgdir/usr/share/emacs/site-lisp/"
57 install -vDm 644 editors/proto.vim \
58 -t "${pkgdir}/usr/share/vim/vimfiles/syntax"
61 package_python-protobuf() {
62 pkgdesc='Python 3 bindings for Google Protocol Buffers'
63 depends=('python' 'python-six' "protobuf=$pkgver")
65 local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
69 PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}:PYTHONPATH" \
70 python setup.py install --skip-build \
71 --cpp_implementation \
75 install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"