summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-06-23 04:01:20 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-06-23 04:01:20 -0500
commit5ac085060ee35727bf082169ceed1c3b5173a29b (patch)
tree4b14c87f98cbad470eaad9095c37a047e48bda00
parent62d76c5259a209017f4e2b895fccd3f06ae5dfff (diff)
java-jsch-agent-proxy: add new package to [pcr]
-rw-r--r--pcr/java-jsch-agent-proxy/PKGBUILD75
-rw-r--r--pcr/java-jsch-agent-proxy/jsch-agent-proxy-bundles_to_jars.patch66
-rw-r--r--pcr/java-jsch-agent-proxy/jsch-agent-proxy-poms.patch13
-rw-r--r--pcr/java-jsch-agent-proxy/jsch-agent-proxy-remove_maven3_prerequisite.patch13
4 files changed, 167 insertions, 0 deletions
diff --git a/pcr/java-jsch-agent-proxy/PKGBUILD b/pcr/java-jsch-agent-proxy/PKGBUILD
new file mode 100644
index 000000000..535d61e81
--- /dev/null
+++ b/pcr/java-jsch-agent-proxy/PKGBUILD
@@ -0,0 +1,75 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_libname=jsch-agent-proxy
+_pkgname=jsch.agentproxy
+pkgname=java-${_libname}
+pkgver=0.0.8
+pkgrel=1
+pkgdesc="Proxy to ssh-agent and Pageant in Java"
+arch=('any')
+url='http://www.jcraft.com/jsch-agent-proxy/'
+license=('BSD')
+depends=('java-runtime')
+makedepends=('java-environment' 'java-jsch' 'jh' 'jna')
+source=("https://github.com/ymnk/${_libname}/archive/${pkgver}.tar.gz"
+ 'jsch-agent-proxy-remove_maven3_prerequisite.patch'
+ 'jsch-agent-proxy-bundles_to_jars.patch'
+ 'jsch-agent-proxy-poms.patch')
+sha1sums=('811eb8d5ff1524bc1b2f9fa94f5ecda958b5dc41'
+ '649d1a9fc1eacd125a85d5b9ec42c0ec2f29fa6e'
+ '4bdb1f5b2c5367ae66d01857b3d7b501edf20835'
+ 'ee4112801473130951ed7559caeaf9be48a8dd62')
+
+_artifacts=(core jsch sshagent usocket-nc usocket-jna pageant connector-factory)
+
+prepare() {
+ cd "${srcdir}/${_libname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/jsch-agent-proxy-remove_maven3_prerequisite.patch"
+ patch -Np1 -i "${srcdir}/jsch-agent-proxy-bundles_to_jars.patch"
+ patch -Np1 -i "${srcdir}/jsch-agent-proxy-poms.patch"
+ mkdir -p {source,dist}
+
+ for artifact in ${_artifacts[@]}; do
+ mkdir -p "build/${artifact}/classes"
+ cp -rv "${_libname}-${artifact}/src" source
+ done
+}
+
+build() {
+ cd "${srcdir}/${_libname}-${pkgver}"
+
+ CLASSPATH="/usr/share/java/jsch.jar:/usr/share/java/jna.jar:/usr/share/java/jna-platform.jar:dist/*"
+ for artifact in ${_artifacts[@]}; do
+ javac -cp $CLASSPATH -d "build/${artifact}/classes" -encoding UTF-8 \
+ $(find "${_libname}-${artifact}/src/main/java" -name \*.java)
+ jar -cvf "dist/${_pkgname}.${artifact}.jar" -C "build/${artifact}/classes" .
+ done
+
+ javadoc -classpath $CLASSPATH -d "build/javadoc" -encoding UTF-8 \
+ -sourcepath source/src/main/java -subpackages com
+}
+
+package() {
+ cd "${srcdir}/${_libname}-${pkgver}"
+
+ # Install license file
+ install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+
+ # Install documentation
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r build/javadoc "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install com.jcraft jsch.agentproxy ${pkgver} pom.xml
+
+ for artifact in ${_artifacts[@]}; do
+ jh mvn-install com.jcraft "jsch.agentproxy.${artifact}" ${pkgver} \
+ "${_libname}-${artifact}/pom.xml" \
+ "dist/${_pkgname}.${artifact}.jar" \
+ "${_pkgname}.${artifact}-${pkgver}.jar"
+
+ ln -s "/usr/share/java/${_pkgname}.${artifact}-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}.${artifact}.jar"
+ done
+}
diff --git a/pcr/java-jsch-agent-proxy/jsch-agent-proxy-bundles_to_jars.patch b/pcr/java-jsch-agent-proxy/jsch-agent-proxy-bundles_to_jars.patch
new file mode 100644
index 000000000..51d36b9f6
--- /dev/null
+++ b/pcr/java-jsch-agent-proxy/jsch-agent-proxy-bundles_to_jars.patch
@@ -0,0 +1,66 @@
+--- jsch-agent-proxy-0.0.8.orig/jsch-agent-proxy-core/pom.xml 2014-09-25 00:09:18.000000000 -0500
++++ jsch-agent-proxy-0.0.8/jsch-agent-proxy-core/pom.xml 2015-09-13 00:21:21.098542111 -0500
+@@ -11,7 +11,7 @@
+
+ <artifactId>jsch.agentproxy.core</artifactId>
+ <name>jsch-agent-proxy core library</name>
+- <packaging>bundle</packaging>
++ <packaging>jar</packaging>
+
+ <dependencies>
+ </dependencies>
+--- jsch-agent-proxy-0.0.8.orig/jsch-agent-proxy-connector-factory/pom.xml 2014-09-25 00:09:18.000000000 -0500
++++ jsch-agent-proxy-0.0.8/jsch-agent-proxy-connector-factory/pom.xml 2015-09-13 00:21:44.595081492 -0500
+@@ -11,7 +11,7 @@
+
+ <artifactId>jsch.agentproxy.connector-factory</artifactId>
+ <name>a connector factory</name>
+- <packaging>bundle</packaging>
++ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+--- jsch-agent-proxy-0.0.8.orig/jsch-agent-proxy-sshagent/pom.xml 2014-09-25 00:09:18.000000000 -0500
++++ jsch-agent-proxy-0.0.8/jsch-agent-proxy-sshagent/pom.xml 2015-09-13 00:22:27.278183603 -0500
+@@ -11,7 +11,7 @@
+
+ <artifactId>jsch.agentproxy.sshagent</artifactId>
+ <name>a connector for ssh-agent</name>
+- <packaging>bundle</packaging>
++ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+--- jsch-agent-proxy-0.0.8.orig/jsch-agent-proxy-usocket-nc/pom.xml 2014-09-25 00:09:18.000000000 -0500
++++ jsch-agent-proxy-0.0.8/jsch-agent-proxy-usocket-nc/pom.xml 2015-09-13 00:22:52.931377969 -0500
+@@ -11,7 +11,7 @@
+
+ <artifactId>jsch.agentproxy.usocket-nc</artifactId>
+ <name>an implementation of USocketFactory using netcat</name>
+- <packaging>bundle</packaging>
++ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+--- jsch-agent-proxy-0.0.8.orig/jsch-agent-proxy-pageant/pom.xml 2014-09-25 00:09:18.000000000 -0500
++++ jsch-agent-proxy-0.0.8/jsch-agent-proxy-pageant/pom.xml 2015-09-13 00:23:12.371272659 -0500
+@@ -11,7 +11,7 @@
+
+ <artifactId>jsch.agentproxy.pageant</artifactId>
+ <name>a connector for Pageant using JNA</name>
+- <packaging>bundle</packaging>
++ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+--- jsch-agent-proxy-0.0.8.orig/jsch-agent-proxy-usocket-jna/pom.xml 2014-09-25 00:09:18.000000000 -0500
++++ jsch-agent-proxy-0.0.8/jsch-agent-proxy-usocket-jna/pom.xml 2015-09-13 00:23:42.541109223 -0500
+@@ -11,7 +11,7 @@
+
+ <artifactId>jsch.agentproxy.usocket-jna</artifactId>
+ <name>an implementation of USocketFactory using JNA</name>
+- <packaging>bundle</packaging>
++ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
diff --git a/pcr/java-jsch-agent-proxy/jsch-agent-proxy-poms.patch b/pcr/java-jsch-agent-proxy/jsch-agent-proxy-poms.patch
new file mode 100644
index 000000000..92f1e0c4d
--- /dev/null
+++ b/pcr/java-jsch-agent-proxy/jsch-agent-proxy-poms.patch
@@ -0,0 +1,13 @@
+--- jsch-agent-proxy-0.0.8.orig/pom.xml 2014-09-25 00:09:18.000000000 -0500
++++ jsch-agent-proxy-0.0.8/pom.xml 2015-09-13 00:39:25.229335838 -0500
+@@ -141,10 +141,4 @@
+ </extension>
+ </extensions>
+ </build>
+-
+- <parent>
+- <groupId>org.sonatype.oss</groupId>
+- <artifactId>oss-parent</artifactId>
+- <version>6</version>
+- </parent>
+ </project>
diff --git a/pcr/java-jsch-agent-proxy/jsch-agent-proxy-remove_maven3_prerequisite.patch b/pcr/java-jsch-agent-proxy/jsch-agent-proxy-remove_maven3_prerequisite.patch
new file mode 100644
index 000000000..4b6c25733
--- /dev/null
+++ b/pcr/java-jsch-agent-proxy/jsch-agent-proxy-remove_maven3_prerequisite.patch
@@ -0,0 +1,13 @@
+--- jsch-agent-proxy-0.0.8.orig/pom.xml 2014-09-25 00:09:18.000000000 -0500
++++ jsch-agent-proxy-0.0.8/pom.xml 2015-09-13 00:14:40.377379559 -0500
+@@ -3,10 +3,6 @@
+
+ <modelVersion>4.0.0</modelVersion>
+
+- <prerequisites>
+- <maven>3.0.0</maven>
+- </prerequisites>
+-
+ <groupId>com.jcraft</groupId>
+ <artifactId>jsch.agentproxy</artifactId>
+ <version>0.0.8</version>