summaryrefslogtreecommitdiff
path: root/libre/java-jline
diff options
context:
space:
mode:
Diffstat (limited to 'libre/java-jline')
-rw-r--r--libre/java-jline/PKGBUILD50
-rw-r--r--libre/java-jline/build.xml57
2 files changed, 107 insertions, 0 deletions
diff --git a/libre/java-jline/PKGBUILD b/libre/java-jline/PKGBUILD
new file mode 100644
index 000000000..31cb5f1eb
--- /dev/null
+++ b/libre/java-jline/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+_libname=jline
+pkgname=java-${_libname}
+pkgver=1.0
+pkgrel=3.parabola1
+pkgdesc="Java library for handling console input"
+arch=('any')
+url="http://jline.sourceforge.net/"
+license=('BSD')
+depends=('java-runtime-headless')
+makedepends=('apache-ant' 'jh' 'junit')
+source=("http://downloads.sourceforge.net/project/${_libname}/${_libname}/${pkgver}/${_libname}-${pkgver}.zip"
+ "http://repo.maven.apache.org/maven2/${_libname}/${_libname}/${pkgver}/${_libname}-${pkgver}.pom"
+ "build.xml")
+md5sums=('811dc1c8a351a2e928524bd79eb9e798'
+ 'b45424a0b2557589f2f3eddae5fc4944'
+ '6d198263612535fe617c6d166200c08d')
+
+prepare() {
+ cd "${srcdir}/${_libname}-${pkgver}"
+ rm -v "${_libname}-${pkgver}.jar"
+ mv "${srcdir}/build.xml" .
+}
+
+build() {
+ cd "${srcdir}/${_libname}-${pkgver}"
+
+ ant clean jar javadoc
+}
+
+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 "api" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR=${pkgdir}
+ jh mvn-install ${_libname} ${_libname} ${pkgver} \
+ "${srcdir}/${_libname}-${pkgver}.pom" \
+ "${_libname}.jar" \
+ "${_libname}.jar"
+
+ ln -s "/usr/share/java/${_libname}.jar" \
+ "${pkgdir}/usr/share/java/${_libname}-${pkgver}.jar"
+}
diff --git a/libre/java-jline/build.xml b/libre/java-jline/build.xml
new file mode 100644
index 000000000..72b17e7ab
--- /dev/null
+++ b/libre/java-jline/build.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<project default="jar" name="jline" basedir=".">
+ <property name="class.dir" value="build">
+ </property>
+ <property name="source.dir" value="src/src">
+ </property>
+ <property name="doc.dir" value="api">
+ </property>
+ <property name="jar.name" value="jline.jar">
+ </property>
+ <property name="demo-jar.name" value="jline-demo.jar">
+ </property>
+
+ <patternset id="compiler.resources">
+ <include name="**/*.properties"/>
+ <include name="**/*.gz"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.png"/>
+ <include name="**/*.jpg"/>
+ </patternset>
+
+ <target name="clean">
+ <delete dir="${class.dir}" quiet="true" />
+ <delete file="${jar.name}" quiet="true" />
+ <delete file="${demo-jar.name}" quiet="true" />
+ <delete dir="${doc.dir}" quiet="true" />
+ </target>
+
+ <target name="compile">
+ <mkdir dir="${class.dir}" />
+ <javac srcdir="${source.dir}" destdir="${class.dir}"
+ deprecation="true" debug="true" optimize="false" />
+ <copy todir="${class.dir}">
+ <fileset dir="${source.dir}/main/resources">
+ <patternset refid="compiler.resources" />
+ </fileset>
+ </copy>
+ <copy todir="${class.dir}">
+ <fileset dir="${source.dir}/test/resources">
+ <patternset refid="compiler.resources" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="jar" description="o Creates the jars" depends="compile">
+ <jar jarfile="${jar.name}" basedir="${class.dir}"
+ includes="**/jline/*.class,**/jline/*.properties" />
+ <jar jarfile="${demo-jar.name}" basedir="${class.dir}" includes="**/example/*"/>
+ </target>
+
+ <target name="javadoc" description="Creates Javadoc documentation">
+ <mkdir dir="${doc.dir}" />
+ <javadoc packagenames="jline" sourcepath="${source.dir}/main/java" destdir="${doc.dir}" />
+ </target>
+
+</project>