summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoryhfudev2015-06-09 12:37:20 -0400
committeryhfudev2015-06-09 12:37:20 -0400
commitdc1c207cd32030274ea390af57dcccafc8c071e6 (patch)
treef36427c5c9476772ef550d07761f2b1d77956094
downloadaur-dc1c207cd32030274ea390af57dcccafc8c071e6.tar.gz
Initial import
-rw-r--r--.SRCINFO38
-rw-r--r--PKGBUILD94
2 files changed, 132 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b03518983c8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,38 @@
+pkgbase = protobuf3-git
+ pkgdesc = Protocol Buffers - Google's data interchange format
+ pkgver = 802e184
+ pkgrel = 1
+ url = https://developers.google.com/protocol-buffers/
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = unzip
+ makedepends = python-setuptools
+ makedepends = python2-setuptools
+ depends = gcc-libs
+ depends = zlib
+ source = protobuf3-git::git+https://github.com/google/protobuf.git
+ md5sums = SKIP
+
+pkgname = protobuf3-git
+ provides = protobuf
+ provides = protobuf-cpp
+ conflicts = protobuf
+ conflicts = protobuf-cpp
+ conflicts = protobuf3
+ replaces = protobuf-cpp
+
+pkgname = python2-protobuf3-git
+ pkgdesc = Python 2 bindings for Google Protocol Buffers
+ depends = python2
+ depends = protobuf3=802e184
+ provides = python2-protobuf-git
+ conflicts = python2-protobuf
+
+pkgname = python-protobuf3-git
+ pkgdesc = Python 3 bindings for Google Protocol Buffers
+ depends = python
+ depends = protobuf3=802e184
+ provides = python-protobuf-git
+ conflicts = python-protobuf
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..013e5182020
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,94 @@
+# Maintainer: Yunhui Fu <yhfudev@gmail.com>
+# 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="protobuf3-git"
+pkgname=('protobuf3-git' 'python2-protobuf3-git' 'python-protobuf3-git')
+pkgver=802e184
+pkgrel=1
+pkgdesc="Protocol Buffers - Google's data interchange format"
+arch=('i686' 'x86_64')
+url='https://developers.google.com/protocol-buffers/'
+license=('BSD')
+depends=('gcc-libs' 'zlib')
+makedepends=('unzip' 'python-setuptools' 'python2-setuptools')
+#conflicts=('protobuf' 'python2-protobuf' 'python-protobuf' 'protobuf3' 'python2-protobuf3' 'python-protobuf3')
+
+source=("${_pkgbase}::git+https://github.com/google/protobuf.git")
+md5sums=('SKIP')
+
+pkgver_git() {
+ cd "${srcdir}/${_pkgbase}"
+ local ver="$(git show | grep commit | awk '{print $2}' )"
+ #printf "r%s" "${ver//[[:alpha:]]}"
+ echo ${ver:0:7}
+}
+
+pkgver_svn() {
+ cd "${srcdir}/${_pkgbase}"
+ local ver="$(svn info | grep Revision | awk '{print $2}' )"
+ #printf "r%s" "${ver//[[:alpha:]]}"
+ echo ${ver:0:7}
+}
+
+pkgver() {
+ pkgver_git
+}
+
+build() {
+ cd "${srcdir}/${_pkgbase}"
+ ./autogen.sh
+ ./configure --prefix=/usr
+ make $MAKEFLAGS
+
+ rm -rf python3
+ cp -r python python3
+ find python3 -name '*.py' -exec 2to3 --write --nobackups '{}' '+'
+}
+
+check() {
+ make -C "${srcdir}/${_pkgbase}" check
+}
+
+package_protobuf3-git() {
+ conflicts=('protobuf' 'protobuf-cpp' 'protobuf3')
+ provides=('protobuf' 'protobuf-cpp')
+ replaces=('protobuf-cpp')
+
+ cd "${srcdir}/${_pkgbase}"
+ 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-protobuf3-git() {
+ pkgdesc='Python 2 bindings for Google Protocol Buffers'
+ depends=('python2' "protobuf3=${pkgver}")
+ conflicts=('python2-protobuf')
+ provides=('python2-protobuf-git')
+
+ cd "${srcdir}/${_pkgbase}/python"
+ python2 setup.py install --prefix=/usr --root="$pkgdir"
+
+ install -d "$pkgdir"/usr/share/licenses/$pkgname
+ ln -s /usr/share/licenses/$_pkgbase/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/
+}
+
+package_python-protobuf3-git() {
+ pkgdesc='Python 3 bindings for Google Protocol Buffers'
+ depends=('python' "protobuf3=${pkgver}")
+ conflicts=('python-protobuf')
+ provides=('python-protobuf-git')
+
+ cd "${srcdir}/${_pkgbase}/python3"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+
+ install -d "$pkgdir"/usr/share/licenses/$pkgname
+ ln -s /usr/share/licenses/$_pkgbase/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/
+}