summaryrefslogtreecommitdiffstats
path: root/openjdk/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2011-11-27 22:56:32 +0000
committer Eric Hameleers <alien@slackware.com>2011-11-27 22:56:32 +0000
commit3c23fa3a108881a69b8f3e3545d3a2e1f58ddbd6 (patch)
tree6973cb3ca777f8983849fe315b2655137479c216 /openjdk/build
parent5c7c2f5ed7b0d1c412e928252c614c00cc2cb296 (diff)
downloadasb-3c23fa3a108881a69b8f3e3545d3a2e1f58ddbd6.tar.gz
asb-3c23fa3a108881a69b8f3e3545d3a2e1f58ddbd6.tar.xz
Initial revision
Diffstat (limited to 'openjdk/build')
-rwxr-xr-xopenjdk/build/openjdk.SlackBuild178
-rw-r--r--openjdk/build/slack-desc.jdk18
-rw-r--r--openjdk/build/slack-desc.jre18
3 files changed, 214 insertions, 0 deletions
diff --git a/openjdk/build/openjdk.SlackBuild b/openjdk/build/openjdk.SlackBuild
new file mode 100755
index 00000000..6d6462da
--- /dev/null
+++ b/openjdk/build/openjdk.SlackBuild
@@ -0,0 +1,178 @@
+#!/bin/sh
+
+# Copyright 2011 Eric Hameleers, Eindhoven, The Netherlands
+# Copyright 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM1=openjdk
+PKGNAM2=openjre
+JBLD=b147
+JVER=7
+
+VERSION="${JVER}_${JBLD}"
+BUILD=${BUILD:-1}
+NUMJOBS=${NUMJOBS:--j6}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ LIB_ARCH=amd64
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=$ARCH
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG1=$TMP/package-$PKGNAM1
+PKG2=$TMP/package-$PKGNAM2
+
+rm -rf $PKG1 $PKG2
+mkdir -p $TMP $PKG1 $PKG2
+cd $TMP
+rm -rf $PKGNAM1 $PKGNAM2
+unzip $CWD/$PKGNAM1-$JVER-*-src-$JBLD-*.zip || exit 1
+cd $PKGNAM1 || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# We start with creating a proper build environment.
+# Check its correctness with "make sanity":
+unset JAVA_HOME
+unset MAKEFLAGS
+
+export ALT_BOOTDIR=/usr/lib${LIBDIRSUFFIX}/java
+export ALT_DROPS_DIR=$CWD
+export ALT_PARALLEL_COMPILE_JOBS="${NUMJOBS/-j}"
+
+export BUILD_NUMBER=$JBLD
+export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
+export LANG=C
+export OS_VARIANT_NAME="Slackware"
+export OS_VARIANT_VERSION=$(cat /etc/slackware-version | cut -f2 -d' ')
+
+# Compile the lot:
+# If I do not define ALLOW_DOWNLOADS=true the build will fail, even if I have
+# the jaxws/jaxp source drops in place and ALT_DROPS_DIR points to them:
+make ALLOW_DOWNLOADS=true || exit 1
+
+# Move the generated jre and sdk images to the respective packages:
+mkdir -p $PKG1/usr/lib${LIBDIRSUFFIX} $PKG2/usr/lib${LIBDIRSUFFIX}
+cp -ia $TMP/$PKGNAM1/build/linux-$LIB_ARCH/j2sdk-image \
+ $PKG1/usr/lib${LIBDIRSUFFIX}/java
+cp -ia $TMP/$PKGNAM1/build/linux-$LIB_ARCH/j2re-image \
+ $PKG2/usr/lib${LIBDIRSUFFIX}/java
+
+( cd $PKG1/usr/lib${LIBDIRSUFFIX}
+ ln -sf java jdk${VERSION}
+) || exit 1
+
+( cd $PKG2/usr/lib${LIBDIRSUFFIX}
+ ln -sf java jre${VERSION}
+) || exit 1
+
+# Add the profile scripts:
+mkdir -p $PKG1/etc/profile.d $PKG2/etc/profile.d
+for file in $(ls $CWD/profile.d/*) ; do
+ cat $file | sed -e "s#lib/java#lib${LIBDIRSUFFIX}/java#" \
+ > $PKG1/etc/profile.d/$(basename $file)
+ cat $file | sed -e "s#lib/java#lib${LIBDIRSUFFIX}/java#" \
+ > $PKG2/etc/profile.d/$(basename $file)
+done
+chmod 755 $PKG1/etc/profile.d/* $PKG2/etc/profile.d/*
+
+# The openjdk does not build a mozilla plugin:
+#mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+#( cd $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+# ln -sf /usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/libnpjp2.so libnpjp2.so
+#)
+
+( cd $PKG1/usr/lib${LIBDIRSUFFIX}
+ ln -sf ./java/jre/lib/${LIB_ARCH}/server/libjvm.so .
+)
+
+( cd $PKG2/usr/lib${LIBDIRSUFFIX}
+ ln -sf ./java/lib/${LIB_ARCH}/server/libjvm.so .
+)
+
+mkdir -p $PKG1/install $PKG2/install
+cat $CWD/slack-desc.jdk > $PKG1/install/slack-desc
+cat $CWD/slack-desc.jre > $PKG2/install/slack-desc
+
+# For openjdk I have to create desktop files:
+## Install the desktop/mime files:
+#mkdir -p $PKG/usr/share/{applications,icons,mime}
+#cp -a $PKG/usr/lib${LIBDIRSUFFIX}/java/jre/lib/desktop/applications/* \
+# $PKG/usr/share/applications/
+#cp -a $PKG/usr/lib${LIBDIRSUFFIX}/java/jre/lib/desktop/icons/hicolor \
+# $PKG/usr/share/icons/
+#cp -a $PKG/usr/lib${LIBDIRSUFFIX}/java/jre/lib/desktop/mime/packages \
+# $PKG/usr/share/mime/
+
+# Add documentation files:
+mkdir -p $PKG1/usr/doc/$PKGNAM1-$VERSION $PKG2/usr/doc/$PKGNAM2-$VERSION
+cp -a \
+ ASSEMBLY_EXCEPTION LICENSE README* THIRD_PARTY_README \
+ $PKG1/usr/doc/$PKGNAM1-$VERSION
+cp -a \
+ ASSEMBLY_EXCEPTION LICENSE README* THIRD_PARTY_README \
+ $PKG2/usr/doc/$PKGNAM2-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ for DOCSDIR in $(echo $PKG1/usr/doc/${PKGNAM1}-$VERSION) \
+ $(echo $PKG2/usr/doc/${PKGNAM2}-$VERSION)
+ do
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ done
+fi
+
+# Finally, create the two packages:
+cd $PKG1
+/sbin/makepkg -l y -c n $TMP/$PKGNAM1-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+cd $PKG2
+/sbin/makepkg -l y -c n $TMP/$PKGNAM2-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+
diff --git a/openjdk/build/slack-desc.jdk b/openjdk/build/slack-desc.jdk
new file mode 100644
index 00000000..2d38ace6
--- /dev/null
+++ b/openjdk/build/slack-desc.jdk
@@ -0,0 +1,18 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+ |-----handy-ruler------------------------------------------------------|
+openjdk: Java(TM) 2 Platform Standard Edition Development Kit.
+openjdk:
+openjdk: The Java 2 SDK software includes tools for developing, testing, and
+openjdk: running programs written in the Java programming language. This
+openjdk: package contains the Open Source version of the JDK, which holds
+openjdk: everything you need to run Java(TM).
+openjdk:
+openjdk: For additional information, refer to this web page:
+openjdk: http://openjdk.java.net/
+openjdk:
+openjdk:
diff --git a/openjdk/build/slack-desc.jre b/openjdk/build/slack-desc.jre
new file mode 100644
index 00000000..611233ae
--- /dev/null
+++ b/openjdk/build/slack-desc.jre
@@ -0,0 +1,18 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+ |-----handy-ruler------------------------------------------------------|
+openjre: Java(TM) 2 Platform Standard Edition Runtime Environment.
+openjre:
+openjre: The J2SE(TM) Runtime Environment (JRE) is intended for software
+openjre: developers and vendors to redistribute with their applications.
+openjre: It contains the Java virtual machine, runtime class libraries, and
+openjre: Java application launcher that are necessary to run programs written
+openjre: in the Java programming language.
+openjre:
+openjre: If you need development tools, obtain the jdk from /extra, or see the
+openjre: web page: http://openjdk.java.net/
+openjre: