# Maintainer: Gustavo Alvarez # Contributor: Lukas Fleischer # Contributor: David Runge # Contributor: Aleksey Filippov # Contributor: Bartłomiej Piotrowski # Contributor: Sven-Hendrik Haase # Contributor: Thomas S Hatch # Contributor: Geoffroy Carrier # Contributor: Daniel J Griffiths pkgname=python2-protobuf pkgver=3.17.3 pkgrel=1 pkgdesc='Python 2 bindings for Google Protocol Buffers' arch=('x86_64') url='https://developers.google.com/protocol-buffers/' license=('BSD') depends=('gcc-libs' 'glibc' 'zlib' 'python2-six' "protobuf=${pkgver}" ) makedepends=('unzip' 'python2-setuptools' ) source=("https://github.com/protocolbuffers/protobuf/releases/download/v${pkgver}/protobuf-all-${pkgver}.tar.gz") sha512sums=('4a5e2ba080310492eb4fd8f6d89d46591254544f4fc1ef1b6a3a285aa12089e3124ff41994455b4b77e79eb1e993c68ec9c54e13a78052b9fb29b8cbf1dc67e1') prepare() { cd "protobuf-${pkgver}" autoreconf -vfi } build() { cd "protobuf-${pkgver}" cd python python2 setup.py build --cpp_implementation } check() { cd "protobuf-${pkgver}" cd python python2 setup.py test } package() { local python_version=$(python2 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') cd "protobuf-${pkgver}" ( cd python PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}:PYTHONPATH" \ python2 setup.py install --skip-build \ --cpp_implementation \ --optimize=1 \ --root="${pkgdir}" ) install -vDm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" }