diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-08-30 00:11:40 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-08-30 22:36:21 +0200 |
commit | a45e55b728be5fc0f4cd90f30171958f168f2343 (patch) | |
tree | 56d019d5cc37e3a4c9a661787b22974e3bdc4c50 /community/openjdk8 | |
parent | f1bcc4bce42045795274a1e87ff38fbee0808a6f (diff) | |
download | aports-a45e55b728be5fc0f4cd90f30171958f168f2343.tar.bz2 aports-a45e55b728be5fc0f4cd90f30171958f168f2343.tar.xz |
community/openjdk8: improve abuild
Diffstat (limited to 'community/openjdk8')
-rw-r--r-- | community/openjdk8/APKBUILD | 97 |
1 files changed, 48 insertions, 49 deletions
diff --git a/community/openjdk8/APKBUILD b/community/openjdk8/APKBUILD index ffb0212f40..3d2ae0b76e 100644 --- a/community/openjdk8/APKBUILD +++ b/community/openjdk8/APKBUILD @@ -29,17 +29,17 @@ arm*) _jarch=arm;; *) _jarch="$CARCH";; esac -INSTALL_BASE=/usr/lib/jvm/java-1.8-openjdk -BOOTSTRAP_JAVA_HOME=/usr/lib/jvm/java-1.7-openjdk -_jrelib="$INSTALL_BASE/jre/lib/$_jarch" +_bootstrap_java_home="/usr/lib/jvm/java-1.7-openjdk" +_java_home="/usr/lib/jvm/java-1.8-openjdk" +_jrelib="$_java_home/jre/lib/$_jarch" -# exclude xawt from ldpath to avoid duplicate provides for libmawt.so +# Exclude xawt from ldpath to avoid duplicate provides for libmawt.so # (also in headless). in future this should be a virtual provides. ldpath="$_jrelib:$_jrelib/native_threads:$_jrelib/headless:$_jrelib/server:$_jrelib/jli" sonameprefix="$pkgname:" subpackages="$pkgname-jre-lib:jrelib $pkgname-jre $pkgname-jre-base:jrebase - $pkgname-doc:doc $pkgname-demos:demos" + $pkgname-doc $pkgname-demos" _dropsver=$_icedteaver _dropsurl="http://icedtea.classpath.org/download/drops/icedtea8/$_dropsver" @@ -64,7 +64,6 @@ source="http://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.gz icedtea-jdk-includes.patch icedtea-autoconf-config.patch " - builddir="$srcdir/icedtea-$_icedteaver" unpack() { @@ -99,7 +98,7 @@ prepare() { } build() { - export JAVA_HOME="$BOOTSTRAP_JAVA_HOME" + export JAVA_HOME="$_bootstrap_java_home" export PATH="$JAVA_HOME/bin:$PATH" if [ -z "$JOBS" ]; then @@ -121,7 +120,7 @@ build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ - --prefix=$INSTALL_BASE \ + --prefix="$_java_home" \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ @@ -138,7 +137,7 @@ build() { --with-langtools-src-zip="$srcdir/langtools-$_dropsver.tar.xz" \ --with-nashorn-src-zip="$srcdir/nashorn-$_dropsver.tar.xz" \ --with-pax=paxmark \ - --with-jdk-home="$BOOTSTRAP_JAVA_HOME" \ + --with-jdk-home="$_bootstrap_java_home" \ --with-pkgversion="Alpine ${pkgver}-r${pkgrel}" \ || return 1 make || return 1 @@ -147,23 +146,23 @@ build() { package() { cd "$builddir" - mkdir -p "$pkgdir"/$INSTALL_BASE + mkdir -p "$pkgdir"/$_java_home - cp -a openjdk.build/images/j2sdk-image/* "$pkgdir"/$INSTALL_BASE/ || return 1 - rm "$pkgdir"/$INSTALL_BASE/src.zip + cp -a openjdk.build/images/j2sdk-image/* "$pkgdir"/$_java_home/ || return 1 + rm "$pkgdir"/$_java_home/src.zip # This archive contains absolute paths from the build environment, # so it does not work on the target system. User can generate it # running `java -Xshare:dump`. rm "$pkgdir"/$_jrelib/server/classes.jsa - # Pax mark again (due to fakeroot xattr handling bug). - ./pax-mark-vm "$pkgdir"/$INSTALL_BASE + # pax mark again (due to fakeroot xattr handling bug) + ./pax-mark-vm "$pkgdir"/$_java_home - # Symlink to shared java cacerts store. - rm -f "$pkgdir"/$INSTALL_BASE/jre/lib/security/cacerts + # symlink to shared java cacerts store + rm -f "$pkgdir"/$_java_home/jre/lib/security/cacerts ln -sf /etc/ssl/certs/java/cacerts \ - "$pkgdir"/$INSTALL_BASE/jre/lib/security/cacerts + "$pkgdir"/$_java_home/jre/lib/security/cacerts } jrelib() { @@ -182,31 +181,9 @@ jrelib() { jre/LICENSE; do dir=${file%/*} - mkdir -p "$subpkgdir"/$INSTALL_BASE/$dir - mv "$pkgdir"/$INSTALL_BASE/$file "$subpkgdir"/$INSTALL_BASE/$dir || return 1 - done -} - -jrebase() { - pkgdesc="OpenJDK 8 Java Runtime (no GUI support)" - depends="$pkgname-jre-lib java-common java-cacerts" - - mkdir -p "$subpkgdir"/$INSTALL_BASE/bin \ - "$subpkgdir"/$INSTALL_BASE/lib/$_jarch - - mv "$pkgdir"/$INSTALL_BASE/lib/$_jarch/jli \ - "$subpkgdir"/$INSTALL_BASE/lib/$_jarch/ || return 1 - - local file; for file in java orbd rmid servertool unpack200 keytool \ - pack200 rmiregistry tnameserv; do - mv "$pkgdir"/$INSTALL_BASE/bin/$file "$subpkgdir"/$INSTALL_BASE/bin/ || return 1 + mkdir -p "$subpkgdir"/$_java_home/$dir + mv "$pkgdir"/$_java_home/$file "$subpkgdir"/$_java_home/$dir || return 1 done - - # Rest of the jre subdir (which were not taken by -jre subpkg). - mv "$pkgdir"/$INSTALL_BASE/jre "$subpkgdir"/$INSTALL_BASE/ || return 1 - - # Pax mark again (due to fakeroot xattr handling bug). - "$builddir"/pax-mark-vm "$subpkgdir"/$INSTALL_BASE } jre() { @@ -223,28 +200,50 @@ jre() { jre/lib/$_jarch/libsplashscreen.so; do dir=${file%/*} - mkdir -p "$subpkgdir"/$INSTALL_BASE/$dir - mv "$pkgdir"/$INSTALL_BASE/$file "$subpkgdir"/$INSTALL_BASE/$dir || return 1 + mkdir -p "$subpkgdir"/$_java_home/$dir + mv "$pkgdir"/$_java_home/$file "$subpkgdir"/$_java_home/$dir || return 1 + done + + # Pax mark again (due to fakeroot xattr handling bug). + "$builddir"/pax-mark-vm "$subpkgdir"/$_java_home +} + +jrebase() { + pkgdesc="OpenJDK 8 Java Runtime (no GUI support)" + depends="$pkgname-jre-lib java-common java-cacerts" + + mkdir -p "$subpkgdir"/$_java_home/bin \ + "$subpkgdir"/$_java_home/lib/$_jarch + + mv "$pkgdir"/$_java_home/lib/$_jarch/jli \ + "$subpkgdir"/$_java_home/lib/$_jarch/ || return 1 + + local file; for file in java orbd rmid servertool unpack200 keytool \ + pack200 rmiregistry tnameserv; do + mv "$pkgdir"/$_java_home/bin/$file "$subpkgdir"/$_java_home/bin/ || return 1 done + # Rest of the jre subdir (which were not taken by -jre subpkg). + mv "$pkgdir"/$_java_home/jre "$subpkgdir"/$_java_home/ || return 1 + # Pax mark again (due to fakeroot xattr handling bug). - "$builddir"/pax-mark-vm "$subpkgdir"/$INSTALL_BASE + "$builddir"/pax-mark-vm "$subpkgdir"/$_java_home } doc() { default_doc || return 1 - mkdir -p "$subpkgdir"/$INSTALL_BASE/ - mv "$pkgdir"/$INSTALL_BASE/man "$subpkgdir"/$INSTALL_BASE/ + mkdir -p "$subpkgdir"/$_java_home/ + mv "$pkgdir"/$_java_home/man "$subpkgdir"/$_java_home/ } demos() { pkgdesc="OpenJDK 8 Java Demos and Samples" depends="$pkgname" - mkdir -p "$subpkgdir"/$INSTALL_BASE/ - mv "$pkgdir"/$INSTALL_BASE/demo "$pkgdir"/$INSTALL_BASE/sample \ - "$subpkgdir"/$INSTALL_BASE/ + mkdir -p "$subpkgdir"/$_java_home/ + mv "$pkgdir"/$_java_home/demo "$pkgdir"/$_java_home/sample \ + "$subpkgdir"/$_java_home/ } md5sums="7b54dacd18f3adc0d77008d15db2b5c6 icedtea-3.1.0.tar.gz |