[arch-commits] Commit in protobuf/repos (3 files)

Lukas Fleischer lfleischer at archlinux.org
Fri May 29 18:29:26 UTC 2020


    Date: Friday, May 29, 2020 @ 18:29:26
  Author: lfleischer
Revision: 387858

db-move: moved protobuf from [staging] to [testing] (x86_64)

Added:
  protobuf/repos/testing-x86_64/
  protobuf/repos/testing-x86_64/PKGBUILD
    (from rev 387857, protobuf/repos/staging-x86_64/PKGBUILD)
Deleted:
  protobuf/repos/staging-x86_64/

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

Copied: protobuf/repos/testing-x86_64/PKGBUILD (from rev 387857, protobuf/repos/staging-x86_64/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2020-05-29 18:29:26 UTC (rev 387858)
@@ -0,0 +1,73 @@
+# Maintainer: Lukas Fleischer <lfleischer at archlinux.org>
+# Contributor: David Runge <dvzrv at archlinux.org>
+# Contributor: Aleksey Filippov <sarum9in at gmail.com>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
+# Contributor: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Contributor: Thomas S Hatch <thatch45 at gmail.com>
+# Contributor: Geoffroy Carrier <geoffroy at archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgbase='protobuf'
+pkgname=('protobuf' 'python-protobuf')
+pkgver=3.12.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' 'glibc' 'zlib')
+makedepends=('unzip' 'python-setuptools')
+source=("https://github.com/protocolbuffers/$pkgname/releases/download/v$pkgver/$pkgname-all-$pkgver.tar.gz")
+sha512sums=('5752329c13a903ef3015b1383632f0eba50521669052c5b3d834e798e3d3d3bca37b175a93d83516d1a9b96960ceb2087fe8577aaa71015decc8f9f4741471a2')
+
+prepare() {
+  cd "$pkgbase-$pkgver"
+  autoreconf -vfi
+}
+
+build() {
+  cd "$pkgbase-$pkgver"
+  ./configure --prefix=/usr
+  make
+  cd python
+  python setup.py build --cpp_implementation
+}
+
+check() {
+  cd "$pkgbase-$pkgver"
+  make check
+
+  cd python
+  python setup.py test
+}
+
+package_protobuf() {
+  replaces=('protobuf-cpp')
+  provides=('libprotoc.so' 'libprotobuf.so' 'libprotobuf-lite.so')
+
+  cd "$pkgbase-$pkgver"
+  make DESTDIR="$pkgdir" install
+
+  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+  install -vDm 644 editors/protobuf-mode.el \
+    -t "$pkgdir/usr/share/emacs/site-lisp/"
+  install -vDm 644 editors/proto.vim \
+    -t "${pkgdir}/usr/share/vim/vimfiles/syntax"
+}
+
+package_python-protobuf() {
+  pkgdesc='Python 3 bindings for Google Protocol Buffers'
+  depends=('python' 'python-six' "protobuf=$pkgver")
+
+  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+  cd "$pkgbase-$pkgver"
+  (
+    cd python
+    PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}:PYTHONPATH" \
+    python setup.py install --skip-build \
+                            --cpp_implementation \
+                            --optimize=1 \
+                            --root="$pkgdir"
+  )
+  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}



More information about the arch-commits mailing list