From 5ac085060ee35727bf082169ceed1c3b5173a29b Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Thu, 23 Jun 2016 04:01:20 -0500 Subject: java-jsch-agent-proxy: add new package to [pcr] --- pcr/java-jsch-agent-proxy/PKGBUILD | 75 ++++++++++++++++++++++ .../jsch-agent-proxy-bundles_to_jars.patch | 66 +++++++++++++++++++ .../jsch-agent-proxy-poms.patch | 13 ++++ ...ch-agent-proxy-remove_maven3_prerequisite.patch | 13 ++++ 4 files changed, 167 insertions(+) create mode 100644 pcr/java-jsch-agent-proxy/PKGBUILD create mode 100644 pcr/java-jsch-agent-proxy/jsch-agent-proxy-bundles_to_jars.patch create mode 100644 pcr/java-jsch-agent-proxy/jsch-agent-proxy-poms.patch create mode 100644 pcr/java-jsch-agent-proxy/jsch-agent-proxy-remove_maven3_prerequisite.patch (limited to 'pcr/java-jsch-agent-proxy') 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 + +_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 @@ + + jsch.agentproxy.core + jsch-agent-proxy core library +- bundle ++ jar + + + +--- 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 @@ + + jsch.agentproxy.connector-factory + a connector factory +- bundle ++ jar + + + +--- 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 @@ + + jsch.agentproxy.sshagent + a connector for ssh-agent +- bundle ++ jar + + + +--- 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 @@ + + jsch.agentproxy.usocket-nc + an implementation of USocketFactory using netcat +- bundle ++ jar + + + +--- 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 @@ + + jsch.agentproxy.pageant + a connector for Pageant using JNA +- bundle ++ jar + + + +--- 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 @@ + + jsch.agentproxy.usocket-jna + an implementation of USocketFactory using JNA +- bundle ++ jar + + + 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 @@ + + + +- +- +- org.sonatype.oss +- oss-parent +- 6 +- + 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 @@ + + 4.0.0 + +- +- 3.0.0 +- +- + com.jcraft + jsch.agentproxy + 0.0.8 -- cgit v1.2.3