summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD80
2 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..299688ca57e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = protobuf-git
+ pkgdesc = Google's data interchange format
+ pkgver = 3.12.3.r112.g36d39a026
+ pkgrel = 1
+ url = https://developers.google.com/protocol-buffers/
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ makedepends = python-setuptools
+ makedepends = unzip
+ source = git+https://github.com/protocolbuffers/protobuf.git
+ sha256sums = SKIP
+
+pkgname = protobuf-git
+ depends = gcc-libs
+ depends = zlib
+ provides = protobuf
+ provides = libprotoc.so
+ provides = libprotobuf.so
+ provides = libprotobuf-lite.so
+ conflicts = protobuf
+ options = staticlibs
+
+pkgname = python-protobuf-git
+ pkgdesc = Python 3 bindings for Google Protocol Buffers
+ depends = protobuf-git
+ depends = python
+ depends = python-six
+ provides = python-protobuf
+ conflicts = python-protobuf
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f866079ca19
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
+
+pkgbase=protobuf-git
+pkgname=('protobuf-git' 'python-protobuf-git')
+pkgver=3.12.3.r112.g36d39a026
+pkgrel=1
+pkgdesc="Google's data interchange format"
+arch=('i686' 'x86_64')
+url="https://developers.google.com/protocol-buffers/"
+license=('BSD')
+makedepends=('git' 'python-setuptools' 'unzip')
+source=("git+https://github.com/protocolbuffers/protobuf.git")
+sha256sums=('SKIP')
+
+
+prepare() {
+ cd "protobuf"
+
+ git submodule update --init --recursive
+}
+
+pkgver() {
+ cd "protobuf"
+
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "protobuf"
+
+ autoreconf -fi
+ ./configure \
+ --prefix="/usr"
+ make
+
+ cd "python"
+ python "setup.py" build \
+ --cpp_implementation
+}
+
+check() {
+ cd "protobuf"
+
+ #make check
+
+ cd "python"
+ #python "setup.py" test
+}
+
+package_protobuf-git() {
+ depends=('gcc-libs' 'zlib')
+ provides=('protobuf' 'libprotoc.so' 'libprotobuf.so' 'libprotobuf-lite.so')
+ conflicts=('protobuf')
+ options=('staticlibs')
+
+ cd "protobuf"
+
+ make DESTDIR="$pkgdir" install
+ install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/protobuf"
+ install -Dm644 "editors/protobuf-mode.el" -t "$pkgdir/usr/share/emacs/site-lisp"
+ install -Dm644 "editors/proto.vim" -t "$pkgdir/usr/share/vim/vimfiles/syntax"
+}
+
+package_python-protobuf-git() {
+ pkgdesc="Python 3 bindings for Google Protocol Buffers"
+ depends=('protobuf-git' 'python' 'python-six')
+ provides=('python-protobuf')
+ conflicts=('python-protobuf')
+
+ cd "protobuf"
+
+ install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/python-protobuf"
+
+ cd "python"
+ python "setup.py" install \
+ --optimize 1 \
+ --skip-build \
+ --root "$pkgdir" \
+ --cpp_implementation
+}