diff options
author | dsomero <xgizzmo@slackbuilds.org> | 2012-08-26 08:11:44 -0400 |
---|---|---|
committer | dsomero <xgizzmo@slackbuilds.org> | 2012-08-26 22:40:58 -0400 |
commit | ba08663773dd39ecab52b80fd6499374ee8d99a0 (patch) | |
tree | 7862f7b27157065beddb3cc9455bf43ba61319bd | |
parent | fe607e8da2bbc944761fb0c68fb545568bcd05dd (diff) |
development/jdk: Added (Java(TM) 2 Platform SE Development Kit)
This is a modified version of Patrick J. Volkerding's java
SlackBuild many thanks to him. DO NOT send bug reports to
Slackware or Patrick J. Volkerding.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
-rw-r--r-- | development/jdk/README | 8 | ||||
-rw-r--r-- | development/jdk/jdk.SlackBuild | 141 | ||||
-rw-r--r-- | development/jdk/jdk.info | 11 | ||||
-rw-r--r-- | development/jdk/profile.d/jdk.csh | 4 | ||||
-rw-r--r-- | development/jdk/profile.d/jdk.sh | 4 | ||||
-rw-r--r-- | development/jdk/slack-desc | 19 |
6 files changed, 187 insertions, 0 deletions
diff --git a/development/jdk/README b/development/jdk/README new file mode 100644 index 0000000000000..ebab1726207b8 --- /dev/null +++ b/development/jdk/README @@ -0,0 +1,8 @@ +This is a SlackBuild that will repackage Oracle Java into a package that +can be easily installed, upgraded, or removed using Slackware's native +package management tools. + +This will also package JRE so you will not need a separate JRE build. + +You must Agree to Oracle's download agreement before this can be downloaded. +This means you have to use a web browser to download it. Sorry wget folks. diff --git a/development/jdk/jdk.SlackBuild b/development/jdk/jdk.SlackBuild new file mode 100644 index 0000000000000..f710920697062 --- /dev/null +++ b/development/jdk/jdk.SlackBuild @@ -0,0 +1,141 @@ +#!/bin/sh + +# Modified for SlackBuilds.org by David Somero + +# Based off of java.Slackbuild +# Copyright 2008, 2009, 2010, 2011, 2012 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. + +PRGNAM=jdk +VERSION=7u6 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +DVER=1.7.0_06 + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm echo "Unsupported arch" exit 1;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-jdk +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "x86_64" ]; then + LIB_ARCH=amd64 + LIBDIRSUFFIX="64" + SRC_ARCH="x64" +else + LIB_ARCH=i386 + LIBDIRSUFFIX="" + SRC_ARCH="i586" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $PKG +mkdir -p usr/lib${LIBDIRSUFFIX} +cd usr/lib${LIBDIRSUFFIX} +tar xvf $CWD/$PRGNAM-$VERSION-linux-$SRC_ARCH.tar.gz +chown -R root.root $PKG +find $PKG \ + \( -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 {} \; + +mkdir -p $PKG/etc/profile.d +for file in $(ls $CWD/profile.d/${PRGNAM}*) ; do + cat $file | sed -e "s#lib/java#lib${LIBDIRSUFFIX}/java#" \ + > $PKG/etc/profile.d/$(basename $file) +done +chmod 755 $PKG/etc/profile.d/* + +( cd $PKG/usr/lib${LIBDIRSUFFIX} + mv ${PRGNAM}${DVER} java + ln -sf java ${PRGNAM}${DVER} +) + +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 $PKG/usr/lib${LIBDIRSUFFIX} + ln -sf ./java/jre/lib/${LIB_ARCH}/server/libjvm.so . + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat << EOF > $PKG/install/doinst.sh +# Clean up a potential upgrade mess caused by changing the +# installation directory to /usr/lib${LIBDIRSUFFIX}/java/: +if [ -L usr/lib${LIBDIRSUFFIX}/java ]; then + rm -rf usr/lib${LIBDIRSUFFIX}/java + mkdir -p usr/lib${LIBDIRSUFFIX}/java/man + mkdir -p usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/server + mkdir -p usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/client + mkdir -p usr/lib${LIBDIRSUFFIX}/java/jre/javaws + mkdir -p usr/lib${LIBDIRSUFFIX}/java/jre/bin + mkdir -p usr/lib${LIBDIRSUFFIX}/java/bin + mkdir -p usr/lib${LIBDIRSUFFIX}/mozilla/plugins +fi +if [ -L ControlPanel ]; then + rm -f ControlPanel +fi +if [ -L ja ]; then + rm -f ja +fi +if [ -L javaws ]; then + rm -f javaws +fi +if [ -L libjsig.so ]; then + rm -f libjsig.so +fi +# End cleanup. + +EOF + +# 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/ + +# Java may not expect compressed manpages, so don't compress them. +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + $PKG/usr/lib64/java/THIRDPARTYLICENSEREADME.txt \ + $PKG/usr/lib64/java/LICENSE \ + $PKG/usr/lib64/java/COPYRIGHT \ + $PKG/usr/lib64/java/README.html \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/jdk/jdk.info b/development/jdk/jdk.info new file mode 100644 index 0000000000000..f72ffe23bfeff --- /dev/null +++ b/development/jdk/jdk.info @@ -0,0 +1,11 @@ +PRGNAM="jdk" +VERSION="7u6" +HOMEPAGE="http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html" +DOWNLOAD="http://download.oracle.com/otn-pub/java/jdk/7u6-b24/jdk-7u6-linux-i586.tar.gz" +MD5SUM="3ddb72969d92485e8ec9b32dc065130b" +DOWNLOAD_x86_64="http://download.oracle.com/otn-pub/java/jdk/7u6-b24/jdk-7u6-linux-x64.tar.gz" +MD5SUM_x86_64="2178f5f10dadaed75c1476805a3d04d8" +REQUIRES="" +MAINTAINER="David Somero" +EMAIL="dsomero@hotmail.com" + diff --git a/development/jdk/profile.d/jdk.csh b/development/jdk/profile.d/jdk.csh new file mode 100644 index 0000000000000..3a1ec7be8b2e0 --- /dev/null +++ b/development/jdk/profile.d/jdk.csh @@ -0,0 +1,4 @@ +#!/bin/csh +setenv JAVA_HOME /usr/lib/java +setenv MANPATH ${MANPATH}:${JAVA_HOME}/man +setenv PATH ${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin diff --git a/development/jdk/profile.d/jdk.sh b/development/jdk/profile.d/jdk.sh new file mode 100644 index 0000000000000..ed0bc73d4d66d --- /dev/null +++ b/development/jdk/profile.d/jdk.sh @@ -0,0 +1,4 @@ +#!/bin/sh +export JAVA_HOME=/usr/lib/java +export MANPATH="${MANPATH}:${JAVA_HOME}/man" +export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin" diff --git a/development/jdk/slack-desc b/development/jdk/slack-desc new file mode 100644 index 0000000000000..f0fa8461f268f --- /dev/null +++ b/development/jdk/slack-desc @@ -0,0 +1,19 @@ +# 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------------------------------------------------------| +jdk: jdk (Java(TM) 2 Platform Standard Edition Development Kit) +jdk: +jdk: The Java 2 SDK software includes tools for developing, testing, and +jdk: running programs written in the Java programming language. This +jdk: package contains everything you need to run Java(TM). +jdk: +jdk: For additional information, refer to this web page: +jdk: http://java.com/ +jdk: +jdk: +jdk: |