diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2015-09-17 18:53:44 -0500 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-22 16:15:06 -0300 |
commit | d32ad0ddf0247a8656b3251a0f3f681ca365fdf6 (patch) | |
tree | 7aa6762419567ba45b91c18433accee8c0da9734 /pcr/objenesis/PKGBUILD | |
parent | 5827282e08d984314f462be25987a539d6994f0a (diff) | |
download | abslibre-d32ad0ddf0247a8656b3251a0f3f681ca365fdf6.tar.gz abslibre-d32ad0ddf0247a8656b3251a0f3f681ca365fdf6.tar.bz2 abslibre-d32ad0ddf0247a8656b3251a0f3f681ca365fdf6.zip |
objenesis: add new package to [pcr]
Diffstat (limited to 'pcr/objenesis/PKGBUILD')
-rw-r--r-- | pcr/objenesis/PKGBUILD | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/pcr/objenesis/PKGBUILD b/pcr/objenesis/PKGBUILD new file mode 100644 index 000000000..f130b6287 --- /dev/null +++ b/pcr/objenesis/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +pkgname=objenesis +pkgver=2.2 +pkgrel=1 +pkgdesc="Java library to instantiate a new object of a particular class" +arch=('any') +url="http://objenesis.org/" +license=('APACHE') +depends=('java-runtime') +makedepends=('java-environment' 'jh') +source=("https://github.com/easymock/${pkgname}/archive/${pkgver}.tar.gz") +md5sums=('92e3bd808297c684cdc95eccfb94ec61') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + mkdir -p build/classes +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + CLASSPATH="build/classes" + javac -encoding utf8 -classpath $CLASSPATH -d "build/classes" \ + $(find "main/src/main/java/" -name \*.java) + javadoc -encoding utf8 -classpath $CLASSPATH -d "build/javadoc" \ + -sourcepath "main/src/main/java/" -subpackages org + + jar -cvf "${pkgname}.jar" -C "build/classes" . +} + +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 "build/javadoc" "${pkgdir}/usr/share/doc/${pkgname}" + + # Install Maven artifacts + export DESTDIR=${pkgdir} + jh mvn-install "org.objenesis" "${pkgname}-parent" ${pkgver} \ + "${srcdir}/${pkgname}-${pkgver}/pom.xml" + jh mvn-install "org.objenesis" ${pkgname} ${pkgver} \ + "${srcdir}/${pkgname}-${pkgver}/main/pom.xml" \ + "${srcdir}/${pkgname}-${pkgver}/${pkgname}.jar" \ + "${pkgname}.jar" + ln -s "/usr/share/java/${pkgname}.jar" \ + "${pkgdir}/usr/share/java/${pkgname}-${pkgver}.jar" +} |