summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSándor Nagy2015-06-20 23:20:52 +0200
committerSándor Nagy2015-06-20 23:20:52 +0200
commita28f38be5c4edea301ae16fccb77c2010589e295 (patch)
tree886d307c9e07026a37291a44f8a6e512d19d58c8
downloadaur-a28f38be5c4edea301ae16fccb77c2010589e295.tar.gz
Initial import
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD31
-rw-r--r--protobuf-java.patch21
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..dcca1be8c00
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = protobuf-java
+ pkgdesc = Google's data interchange format utility (java API).
+ pkgver = 2.6.1
+ pkgrel = 1
+ url = http://code.google.com/p/protobuf/
+ arch = any
+ license = custom:BSD
+ makedepends = java-environment
+ makedepends = maven
+ makedepends = protobuf>=2.6.1
+ depends = java-environment
+ source = https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
+ source = protobuf-java.patch
+ md5sums = f3916ce13b7fcb3072a1fa8cf02b2423
+ md5sums = 01a3244c88fc5ddfee07c658c0bc7df4
+
+pkgname = protobuf-java
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1e51d3d9a91
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Sandor Nagy < sanya868 at gmail dot com >
+# Contributor: Igor R. Dejanovic igor.dejanovic@gmail.com
+
+pkgname=protobuf-java
+_xpkgname=protobuf
+pkgver=2.6.1
+pkgrel=1
+pkgdesc="Google's data interchange format utility (java API)."
+url="http://code.google.com/p/protobuf/"
+license=('custom:BSD')
+arch=('any')
+depends=("java-environment")
+makedepends=('java-environment' 'maven' "${_xpkgname}>=${pkgver}")
+source=(https://github.com/google/protobuf/releases/download/v$pkgver/$_xpkgname-$pkgver.tar.gz protobuf-java.patch)
+md5sums=('f3916ce13b7fcb3072a1fa8cf02b2423'
+ '01a3244c88fc5ddfee07c658c0bc7df4')
+
+build() {
+ cd $srcdir/$_xpkgname-$pkgver
+ patch -p1 < ../protobuf-java.patch
+
+ cd $srcdir/$_xpkgname-$pkgver/java
+ mvn package
+}
+
+package() {
+ install -Dm644 "$srcdir/$_xpkgname-$pkgver/java/target/$pkgname-$pkgver.jar" \
+ "$pkgdir/usr/share/java/$pkgname/$pkgname-$pkgver.jar"
+ install -Dm644 "$srcdir/$_xpkgname-$pkgver/LICENSE" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/protobuf-java.patch b/protobuf-java.patch
new file mode 100644
index 00000000000..1286223ed05
--- /dev/null
+++ b/protobuf-java.patch
@@ -0,0 +1,21 @@
+diff -aur protobuf-2.4.1/java/pom.xml protobuf-2.4.1-patched/java/pom.xml
+--- protobuf-2.4.1/java/pom.xml 2011-04-30 19:23:04.000000000 +0200
++++ protobuf-2.4.1-patched/java/pom.xml 2011-05-09 17:58:09.000000000 +0200
+@@ -78,7 +78,7 @@
+ <configuration>
+ <tasks>
+ <mkdir dir="target/generated-sources" />
+- <exec executable="../src/protoc">
++ <exec executable="protoc">
+ <arg value="--java_out=target/generated-sources" />
+ <arg value="--proto_path=../src" />
+ <arg value="../src/google/protobuf/descriptor.proto" />
+@@ -96,7 +96,7 @@
+ <configuration>
+ <tasks>
+ <mkdir dir="target/generated-test-sources" />
+- <exec executable="../src/protoc">
++ <exec executable="protoc">
+ <arg value="--java_out=target/generated-test-sources" />
+ <arg value="--proto_path=../src" />
+ <arg value="--proto_path=src/test/java" />