summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-09-15 22:56:38 -0500
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-22 16:15:04 -0300
commitf3bda5cbd06583bca8cd63af47448527f406854d (patch)
treee0d44987d26ee14245527342d127c724e977d514 /pcr
parente6d6438f441bd115bc47401247e160f4b9951967 (diff)
java-commons-httpclient: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r--pcr/java-commons-httpclient/PKGBUILD48
-rw-r--r--pcr/java-commons-httpclient/commons-httpclient-utf8_encoding.patch21
2 files changed, 69 insertions, 0 deletions
diff --git a/pcr/java-commons-httpclient/PKGBUILD b/pcr/java-commons-httpclient/PKGBUILD
new file mode 100644
index 000000000..eb0670d9d
--- /dev/null
+++ b/pcr/java-commons-httpclient/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=commons-httpclient
+pkgname=java-${_pkgname}
+pkgver=3.1
+pkgrel=1
+pkgdesc="A Java(TM) library for creating HTTP clients"
+arch=('any')
+url="https://hc.apache.org/httpclient-3.x/"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('apache-ant' 'java-commons-codec' 'java-commons-logging' 'jh')
+source=("https://archive.apache.org/dist/httpcomponents/${_pkgname}/source/${_pkgname}-${pkgver}-src.tar.gz"
+ "commons-httpclient-utf8_encoding.patch")
+md5sums=('2c9b0f83ed5890af02c0df1c1776f39b'
+ 'c7eb3d8b63c89bb8165b71f7c7fb4eaf')
+
+prepare() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/commons-httpclient-utf8_encoding.patch"
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ ant dist \
+ -lib "/usr/share/java/commons-logging-1.2.jar" \
+ -lib "/usr/share/java/commons-codec.jar"
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}-${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 "dist/docs/apidocs" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install ${_pkgname} ${_pkgname} ${pkgver} \
+ "${srcdir}/${_pkgname}-${pkgver}/project.xml" \
+ "${srcdir}/${_pkgname}-${pkgver}/dist/${_pkgname}.jar" \
+ "${_pkgname}.jar"
+ ln -s "/usr/share/java/${_pkgname}.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}-${pkgver}.jar"
+} \ No newline at end of file
diff --git a/pcr/java-commons-httpclient/commons-httpclient-utf8_encoding.patch b/pcr/java-commons-httpclient/commons-httpclient-utf8_encoding.patch
new file mode 100644
index 000000000..a586b6b6e
--- /dev/null
+++ b/pcr/java-commons-httpclient/commons-httpclient-utf8_encoding.patch
@@ -0,0 +1,21 @@
+--- commons-httpclient-3.1.orig/build.xml 2007-08-18 04:02:14.000000000 -0500
++++ commons-httpclient-3.1/build.xml 2015-09-15 22:34:20.497911699 -0500
+@@ -181,14 +181,16 @@
+ destdir ="${build.home}/classes"
+ debug ="${compile.debug}"
+ deprecation ="${compile.deprecation}"
+- optimize ="${compile.optimize}">
++ optimize ="${compile.optimize}"
++ encoding="iso-8859-1">
+ <classpath refid="compile.classpath"/>
+ </javac>
+ <javac srcdir ="${source.home}/examples"
+ destdir ="${build.home}/examples"
+ debug ="${compile.debug}"
+ deprecation ="${compile.deprecation}"
+- optimize ="${compile.optimize}">
++ optimize ="${compile.optimize}"
++ encoding="iso-8859-1">
+ <classpath refid="compile.classpath"/>
+ </javac>
+ </target>