diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2016-05-24 21:02:42 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2016-05-24 21:02:42 -0500 |
commit | f1c71f910fe17404977fd886321abe35a0faadff (patch) | |
tree | 509143051ce2fa01d9ed2896467896619afe31e3 | |
parent | b646a980dd13712730e457790097a67c38414f48 (diff) | |
download | abslibre-f1c71f910fe17404977fd886321abe35a0faadff.tar.gz abslibre-f1c71f910fe17404977fd886321abe35a0faadff.tar.bz2 abslibre-f1c71f910fe17404977fd886321abe35a0faadff.zip |
java-animal-sniffer: add new package to [pcr] (required by java-guava)
-rw-r--r-- | pcr/java-animal-sniffer/LICENSE.txt | 21 | ||||
-rw-r--r-- | pcr/java-animal-sniffer/PKGBUILD | 66 |
2 files changed, 87 insertions, 0 deletions
diff --git a/pcr/java-animal-sniffer/LICENSE.txt b/pcr/java-animal-sniffer/LICENSE.txt new file mode 100644 index 000000000..d1406b9d6 --- /dev/null +++ b/pcr/java-animal-sniffer/LICENSE.txt @@ -0,0 +1,21 @@ + The MIT License + + Copyright (c) 2009 codehaus.org. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/pcr/java-animal-sniffer/PKGBUILD b/pcr/java-animal-sniffer/PKGBUILD new file mode 100644 index 000000000..9fa8d2759 --- /dev/null +++ b/pcr/java-animal-sniffer/PKGBUILD @@ -0,0 +1,66 @@ +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +_libname=animal-sniffer +pkgname=java-${_libname} +pkgver=1.15 +pkgrel=1 +pkgdesc="JDK/API verification tools" +arch=('any') +url="http://www.mojohaus.org/animal-sniffer/" +license=('MIT') +depends=('java-runtime') +makedepends=('java-environment' 'java-asm' 'jh') +source=("https://github.com/mojohaus/${_libname}/archive/${_libname}-parent-${pkgver}.tar.gz" + 'LICENSE.txt') +sha256sums=('d5a07409b74a961f044a7bdaaec57c6f960865790de8c8db972ef80100f5a08c' + '848feaf991fc0d2415c414d519de3fd1ab0cce2f74488780b773acb02d5f2b40') + +prepare() { + cd "${srcdir}/${_libname}-${_libname}-parent-${pkgver}" + mkdir -p source + mkdir -p build/classes + mkdir -p build/annotations/classes + cp -rv ${_libname}{,-annotations}/src source +} + +build() { + cd "${srcdir}/${_libname}-${_libname}-parent-${pkgver}" + + CLASSPATH="/usr/share/java/asm-4.jar" + javac -cp $CLASSPATH -d "build/classes" \ + $(find "${_libname}/src/main/java" -name \*.java) + javac -cp $CLASSPATH -d "build/annotations/classes" \ + $(find "${_libname}-annotations/src/main/java" -name \*.java) + + javadoc -classpath $CLASSPATH -d "build/javadoc" \ + -sourcepath "source/src/main/java" -subpackages org + + jar -cvf "${_libname}.jar" -C "build/classes" . + jar -cvf "${_libname}-annotations.jar" -C "build/annotations/classes" . +} + +package() { + cd "${srcdir}/${_libname}-${_libname}-parent-${pkgver}" + + # Install license file + install -Dm644 "${srcdir}/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 + artifacts=("${_libname}" "${_libname}-annotations") + export DESTDIR=${pkgdir} + jh mvn-install "org.codehaus.mojo" ${_libname}-parent ${pkgver} pom.xml + + for artifact in "${artifacts[@]}"; do + jh mvn-install "org.codehaus.mojo" ${artifact} ${pkgver} \ + "${artifact}/pom.xml" \ + "${artifact}.jar" \ + "${artifact}-${pkgver}.jar" + + ln -s "/usr/share/java/${artifact}-${pkgver}.jar" \ + "${pkgdir}/usr/share/java/${artifact}.jar" + done +} |