summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel2018-10-10 15:30:13 -0400
committerGuillaume Horel2018-10-10 15:30:13 -0400
commit5bfcf8a8c11d47571910965740eaf02ca607360d (patch)
treeb5a653b4078a5e5959f1d66200cfa6b625748aeb
downloadaur-5bfcf8a8c11d47571910965740eaf02ca607360d.tar.gz
initial import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD47
-rw-r--r--no-thirdparty.patch23
3 files changed, 89 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8b2e3b26989c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = protobuf-static
+ pkgdesc = Protocol Buffers - Google's data interchange format
+ pkgver = 3.6.1
+ pkgrel = 1
+ url = https://developers.google.com/protocol-buffers/
+ arch = x86_64
+ license = BSD
+ depends = gcc-libs
+ depends = zlib
+ provides = protobuf
+ conflicts = protobuf
+ options = staticlibs
+ source = protobuf-3.6.1.tgz::https://github.com/google/protobuf/archive/v3.6.1.tar.gz
+ source = no-thirdparty.patch
+ sha256sums = 3d4e589d81b2006ca603c1ab712c9715a76227293032d05b26fca603f90b3f5b
+ sha256sums = 6fc836196e69b872794e821111df64effe69f984d46d83c902a9df8953a868b3
+
+pkgname = protobuf-static
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fc56f96a9104
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
+# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
+# 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>
+
+pkgname='protobuf-static'
+_pkgname='protobuf'
+pkgver=3.6.1
+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' 'zlib')
+makedepends=()
+options=('staticlibs')
+provides=('protobuf')
+conflicts=('protobuf')
+source=("$_pkgname-$pkgver.tgz::https://github.com/google/${_pkgname}/archive/v${pkgver}.tar.gz"
+ "no-thirdparty.patch")
+sha256sums=('3d4e589d81b2006ca603c1ab712c9715a76227293032d05b26fca603f90b3f5b'
+ '6fc836196e69b872794e821111df64effe69f984d46d83c902a9df8953a868b3')
+
+prepare() {
+ cd "$_pkgname-$pkgver"
+ rm -rf third_party
+ patch -p1 < ../no-thirdparty.patch
+}
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ autoreconf -vif
+ ./configure --prefix=/usr
+ make CFLAGS="$CFLAGS -fPIC" CXXFLAGS="$CXXFLAGS -fPIC"
+}
+
+package() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ 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
+}
diff --git a/no-thirdparty.patch b/no-thirdparty.patch
new file mode 100644
index 000000000000..890599425799
--- /dev/null
+++ b/no-thirdparty.patch
@@ -0,0 +1,23 @@
+diff -urN protobuf-3.6.1-orig/configure.ac protobuf-3.6.1/configure.ac
+--- protobuf-3.6.1-orig/configure.ac 2018-10-10 13:28:21.997297353 -0400
++++ protobuf-3.6.1/configure.ac 2018-10-10 13:37:29.392850421 -0400
+@@ -214,7 +214,6 @@
+ # too.
+ export CFLAGS
+ export CXXFLAGS
+-AC_CONFIG_SUBDIRS([third_party/googletest])
+
+ AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
+ AC_OUTPUT
+diff -urN protobuf-3.6.1-orig/Makefile.am protobuf-3.6.1/Makefile.am
+--- protobuf-3.6.1-orig/Makefile.am 2018-10-10 13:28:22.007292353 -0400
++++ protobuf-3.6.1/Makefile.am 2018-10-10 13:37:20.535090420 -0400
+@@ -9,7 +9,7 @@
+ SUBDIRS = . src
+
+ # Always include third_party directories in distributions.
+-DIST_SUBDIRS = src conformance benchmarks third_party/googletest
++DIST_SUBDIRS = src conformance benchmarks
+
+ # Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
+ # because then "make check" would also build and run all of gmock's own tests,