| 1 | # Contributor: Simon Frankenberger <[email protected]> |
| 2 | # Maintainer: Simon Frankenberger <[email protected]> |
| 3 | pkgname=java-asmtools |
| 4 | _pkgver=8.0-b09 |
| 5 | pkgver=${_pkgver/-b/.} |
| 6 | pkgrel=0 |
| 7 | pkgdesc="The AsmTools open source project is used to develop tools for the production of proper and improper Java '.class' files" |
| 8 | url="https://github.com/openjdk/asmtools" |
| 9 | # armhf / armv7 / x86: requires java 17 |
| 10 | # s390x: FTBFS due to SIGFPE (see #12275) |
| 11 | arch="noarch !armhf !armv7 !x86 !s390x" |
| 12 | license="GPL-2.0" |
| 13 | makedepends="java-jdk" |
| 14 | options="!check" # this package has no tests |
| 15 | subpackages="$pkgname-doc:_doc" |
| 16 | source="https://github.com/openjdk/asmtools/archive/$_pkgver/asmtools-$_pkgver.tar.gz |
| 17 | https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.13-bin.zip |
| 18 | |
| 19 | java-version-check.patch |
| 20 | " |
| 21 | builddir="$srcdir/asmtools-$_pkgver" |
| 22 | |
| 23 | _ant_home="$srcdir"/apache-ant-1.9.13/ |
| 24 | |
| 25 | build() { |
| 26 | cd "$builddir/build" |
| 27 | |
| 28 | # fix the build target directory |
| 29 | sed -i "s@^BUILD_DIR.\+@BUILD_DIR = $builddir/target@" build.properties |
| 30 | |
| 31 | $_ant_home/bin/ant |
| 32 | } |
| 33 | |
| 34 | package() { |
| 35 | _destdir="$pkgdir/usr/share/java/asmtools" |
| 36 | mkdir -p "$_destdir" |
| 37 | cp -r \ |
| 38 | $builddir/target/binaries/lib \ |
| 39 | $builddir/target/binaries/LICENSE \ |
| 40 | "$_destdir" |
| 41 | } |
| 42 | |
| 43 | _doc() { |
| 44 | _destdir="$subpkgdir/usr/share/java/asmtools" |
| 45 | mkdir -p "$_destdir" |
| 46 | cp -r \ |
| 47 | $builddir/target/binaries/doc \ |
| 48 | $builddir/target/binaries/README.html \ |
| 49 | "$_destdir" |
| 50 | } |
| 51 | |
| 52 | sha512sums=" |
| 53 | 27d4378061d0c703d0220b35b75ce67bcd20dce3f0339cdbd68e8396cf647719ae029720081abac22e186ae9d5ed5c1fb4050adea30f3ef855586eaacba1dca7 asmtools-8.0-b09.tar.gz |
| 54 | 873062cf789e1572ec4ef3cdbb15c0d3a57e5a0794068591565367d4cec15b9f9a24f59734a85170d61b23eb9288d6bafd35a9ae2b015b09c7a175e344cb4e1c apache-ant-1.9.13-bin.zip |
| 55 | e6687969df9d1386c9d7e2948f0f08f1c447f14d30281372f29efb47a894a709b1a901429087e5e7cb69daa9f3e935f3613750239e9eb848ddaf736b4affd056 java-version-check.patch |
| 56 | " |