Commits

Anonymous committed b71cd83

jdk fix SB

  • Participants
  • Parent commits 8c4ce16

Comments (0)

Files changed (3)

var/vabs/jdk/src/jdk.SlackBuild

 # AUTHORS = 
 
 NAME="jdk"            #Enter package Name!
-VERSION=${VERSION:-"6u26"}      #Enter package Version!
+VERSION=${VERSION:-"7u15"}      #Enter package Version!q
+DVER=1.7.0_$(printf $VERSION | cut -du -f2)
 VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
 VL_PACKAGER=${VL_PACKAGER:-"hata_ph"}   #Enter your Name!
-LINK=${LINK:-""}  #Enter URL for package here!
+LINK32="http://download.oracle.com/otn-pub/java/${NAME}/${VERSION}-b03/${NAME}-${VESRION}-linux-i586.tar.gz"
+LINK64="http://download.oracle.com/otn-pub/java/${NAME}/${VERSION}-b03/${NAME}-${VERSION}-linux-x64.tar.gz"
+LINK=${LINK:-"$LINNK32 $LINK64"}  #Enter URL for package here!
 
 
 #SYSTEM VARIABLES
   ARCH=i586
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   CONFIGURE_TRIPLET="i586-vector-linux"
+  LINK=$LINKN32
   LIBDIRSUFFIX=""
+  LIB_ARCH="i586"
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fpic"
   CONFIGURE_TRIPLET="x86_64-vlocity-linux"
   LIBDIRSUFFIX="64"
+  LINK=$LINK64
+  LIB_ARCH="x64"
 elif [ "$ARCH" = "powerpc" ]; then
   SLKCFLAGS="-O2"
   CONFIGURE_TRIPLET="powerpc-vlocity-linux"
 rm -rf $PKG
 mkdir -p $PKG
 cd $TMP
-rm -rf $NAME'1.6.0_26'
+rm -rf ${NAME}${DVER}
 
 
 #EXTRACT SOURCES
 #-----------------------------------------------------
 echo "Extracting source..."
 #tar xvf $CWD/$NAME-$VERSION.tar.* || exit 1
-chmod +x $CWD/$NAME-$VERSION-linux-i586.bin
-sh $CWD/$NAME-$VERSION-linux-i586.bin
+#chmod +x $CWD/$(basename $LINK)
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
+cd $PKG/usr/lib${LIBDIRSUFFIX}
+tar xfv $CWD/$(basename $LINK)
+#chmod +x $CWD/$NAME-$VERSION-linux-i586.bin
+#sh $CWD/$NAME-$VERSION-linux-i586.bin
 #-----------------------------------------------------
 
 
-cd $TMP/$NAME'1.6.0_26'
+#cd $TMP/${NAME}${DVER}/
 
 # Put any Patches into a patches folder in the src dir
 #-----------------------------------------------------
 
 #######################################################################
 #Miscellenious tweaks and things outside a normal ./configure go here #
+mkdir -p $PKG/etc/profile.d
+for file in $(ls $CWD/profile.d/${NAME}*); do
+	cat $file | sed -e "s#lib/java#lib${LIBDIRSUFFIX}/java#" \
+		> $PKG/etc/profile.d/$(basename $file)
+done
+chmod 0755 $PKG/etc/profile.d/*
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+	mv ${NAME}${DVER} java
+	ln -sf java ${NAME}${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.
+
+if [ -x /usr/bin/update-desktop-database ]; then
+  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+  /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+  if [ -x /usr/bin/gtk-update-icon-cache ]; then
+    /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+  fi
+fi
+
+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/lib${LIBDIRSUFFIX}/java/THIRDPARTYLICENSEREADME.txt \
+  $PKG/usr/lib${LIBDIRSUFFIX}/java/LICENSE \
+  $PKG/usr/lib${LIBDIRSUFFIX}/java/COPYRIGHT \
+  $PKG/usr/lib${LIBDIRSUFFIX}/java/README.html \
+  $PKG/usr/doc/$PRGNAM-$VERSION
+
+
+
+
 #######################################################################
 
 
 cp $CWD/profile.d/* $PKG/etc/profile.d/
 
 mkdir -p $PKG/opt
-mv $TMP/$NAME'1.6.0_26' $PKG/opt/java
+mv $TMP/${NAME}${DVER} $PKG/opt/java
 #----------------------------------------------------------------------
 
 if [ -d $PKG/usr/share/man ] ; then

var/vabs/jdk/src/profile.d/jdk.csh

+#!/bin/csh
+setenv JAVA_HOME /usr/lib/java
+setenv MANPATH ${MANPATH}:${JAVA_HOME}/man
+setenv PATH ${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin

var/vabs/jdk/src/profile.d/jdk.sh

+#!/bin/sh
+export JAVA_HOME=/usr/lib/java
+export MANPATH="${MANPATH}:${JAVA_HOME}/man"
+export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"