summaryrefslogtreecommitdiffstats
path: root/openjdk
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2012-10-09 11:13:08 +0000
committer Eric Hameleers <alien@slackware.com>2012-10-09 11:13:08 +0000
commitf3254c445fd379fcb7d7abb0faba3ab3588b7987 (patch)
tree26fa19f97292e5d8108acb354d2a86c841ba454e /openjdk
parentacd885bc87d4ea21b7e85efae2ca010c5e90c25b (diff)
downloadasb-f3254c445fd379fcb7d7abb0faba3ab3588b7987.tar.gz
asb-f3254c445fd379fcb7d7abb0faba3ab3588b7987.tar.xz
Start using "alien" tag. Strip debug symbols from libjvm.so, this shaves off 150MB !
Diffstat (limited to 'openjdk')
-rwxr-xr-xopenjdk/build/openjdk.SlackBuild17
1 files changed, 14 insertions, 3 deletions
diff --git a/openjdk/build/openjdk.SlackBuild b/openjdk/build/openjdk.SlackBuild
index 8eed74f3..e3fe37ae 100755
--- a/openjdk/build/openjdk.SlackBuild
+++ b/openjdk/build/openjdk.SlackBuild
@@ -28,7 +28,8 @@ JAVABLD=b30
ICEDTEA=2.3.2
VERSION="${JAVAVER}_${JAVABLD}"
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
+TAG=${TAG:-"alien"}
NUMJOBS=${NUMJOBS:--j6}
@@ -42,6 +43,10 @@ PKG2=$TMP/package-$PKGNAM2
# of OpenJDK to build OpenJDK.
BOOTSTRAP=${BOOTSTRAP:-"NO"}
+# If you want debug symbols in your JVM library, set DEBUGBUILD to "YES";
+# this would inflate the libjvm.so file from 13 to 160 MB (estimate):
+DEBUGBUILD=${DEBUGBUILD:-"NO"}
+
# Sources the script requires. Note that the Makefile contains SHA256SUM values
# for all of these tarballs; if the tarball does not verify then it will be
# downloaded again:
@@ -199,6 +204,12 @@ cp -a openjdk.build/j2sdk-image \
cp -a openjdk.build/j2re-image \
$PKG2/usr/lib${LIBDIRSUFFIX}/java/jre
+if [ "$DEBUGBUILD" = "NO" ]; then
+ # Strip debug symbols from the libjvm.so but leave the symbol tables alone:
+ find $PKG1 -name libjvm.so -exec strip --strip-debug {} \;
+ find $PKG2 -name libjvm.so -exec strip --strip-debug {} \;
+fi
+
# Generate a cacerts file from the certificates installed through our
# ca-certificates package - the "cacerts" in the OpenJDK sources is empty.
# This will only work if we already have a proper JDK/JRE installed:
@@ -332,7 +343,7 @@ fi
# Finally, create the two packages:
cd $PKG1
-/sbin/makepkg -l y -c n $TMP/$PKGNAM1-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM1-$(echo $VERSION | tr - _)-$ARCH-$BUILD$TAG.txz
cd $PKG2
-/sbin/makepkg -l y -c n $TMP/$PKGNAM2-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM2-$(echo $VERSION | tr - _)-$ARCH-$BUILD$TAG.txz