[arch-commits] Commit in openjdk6/repos (4 files)

Jan de Groot jgc at archlinux.org
Sat Aug 2 14:48:11 EDT 2008


    Date: Saturday, August 2, 2008 @ 14:48:11
  Author: jgc
Revision: 7507

Merged revisions 7451-7506 via svnmerge from 
svn+ssh://svn.archlinux.org/home/svn-packages/openjdk6/trunk

........
  r7457 | andyrtr | 2008-08-02 13:42:24 +0000 (Sat, 02 Aug 2008) | 1 line
  
  upgpkg: openjdk6 1.2-1
........
  r7506 | jgc | 2008-08-02 18:41:35 +0000 (Sat, 02 Aug 2008) | 6 lines
  
  - Move over to /usr/lib/jvm/java-1.6.0-openjdk
  - Make it compile with openjdk, jdk or java-gcj-compat
  - Export variables like jdk/jre do
  - Symlink all binaries into /usr/bin
  - Depend on rhino for javascript support
........

Added:
  openjdk6/repos/testing-x86_64/openjdk6.install
    (from rev 7506, openjdk6/trunk/openjdk6.install)
Modified:
  openjdk6/repos/testing-x86_64/	(properties)
  openjdk6/repos/testing-x86_64/PKGBUILD
  openjdk6/repos/testing-x86_64/openjdk6.profile

------------------+
 PKGBUILD         |  112 ++++++++++++++++++++++++++++-------------------------
 openjdk6.install |   12 +++++
 openjdk6.profile |   17 +-------
 3 files changed, 77 insertions(+), 64 deletions(-)


Property changes on: openjdk6/repos/testing-x86_64
___________________________________________________________________
Name: svnmerge-integrated
   - /openjdk6/trunk:1-7450
   + /openjdk6/trunk:1-7506

Modified: testing-x86_64/PKGBUILD
===================================================================
--- testing-x86_64/PKGBUILD	2008-08-02 18:41:35 UTC (rev 7506)
+++ testing-x86_64/PKGBUILD	2008-08-02 18:48:11 UTC (rev 7507)
@@ -1,62 +1,55 @@
 # Maintainer: Andreas Radke <andyrtr at archlinux.org>
+# Maintainer: Jan de Groot <jgc at archlinux.org>
 
 pkgname=openjdk6
 pkgver=1.2
 _date=20080801
-pkgrel=1
+pkgrel=2
 pkgdesc='Free Java environment based on OpenJDK 6.0 with IcedTea6 replacing binary plugs.'
 url='http://icedtea.classpath.org'
 arch=('i686' 'x86_64')
 license=('GPL')
-_javaver=1.6.0
 _openjdk_version=b11
 _openjdk_date=10_jul_2008
-if [ "${CARCH}" = 'x86_64' ]; then
-      _arch=amd64
- else _arch=i586
-fi
-depends=('gcc-libs')
-makedepends=('alsa-libs' 'libxtst' 'giflib' 'gtk2' 'nspr' 'zlib' 'freetype2' 'libjpeg' 'libx11' 'libcups' 'patch'
-             'xalan-java' 'xulrunner>=1.9.0.1' 'apache-ant>=1.7.0' 'autoconf' 'unzip' 'openjdk6')
-conflicts=('jdk' 'j2sdk' 'java-environment' 'j2re' 'java-runtime' 'jre' 'gcc-gcj' 'java-gcj-compat')
-provides=("jdk=6" "j2sdk" "java-environment" "jre=6" "j2re" "java-runtime")
+depends=('gcc-libs' 'xdg-utils' 'hicolor-icon-theme' 'rhino')
+makedepends=('alsa-lib' 'libxtst' 'giflib' 'libxp' 'gtk2' 'nspr' 'zlib' 'freetype2' 'libjpeg' 'libx11' 'libcups' 'patch' 'xalan-java' 'xulrunner>=1.9.0.1' 'apache-ant>=1.7.0' 'autoconf' 'unzip')
+conflicts=('jdk' 'j2sdk' 'java-environment' 'j2re' 'java-runtime' 'jre')
+provides=('jdk=6' 'j2sdk' 'java-environment' 'jre=6' 'j2re' 'java-runtime')
+options=(!emptydirs)
+install=openjdk6.install
 source=(http://download.java.net/openjdk/jdk6/promoted/${_openjdk_version}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz
 	ftp://ftp.archlinux.org/other/openjdk6/icedtea6-${_date}.tar.bz2
 	fix_jdk_cmds_path.diff
 	fix_corba_cmds_path.diff
 	gcjwebplugin_xulrunner.diff
-	$pkgname.profile)
+	openjdk6.profile)
 noextract=(openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz)
 md5sums=('8e60cdac02ec1b2d8ddb9d7369be69df'
          '0d4f3b981212e29621a0faf3edd8acf7'
          '5da3e39fa60985576c4f37d1491efbe2'
          'f7e7a212e50abb56a6ef1a2b1bd27405'
          'ed2e808df2d2fc2ea7dae5139d475192'
-         '3ee3f2a7a1dfb33d58e39e01d6234519')
+         '23583f0bf1418aa59f241b1082a2999e')
 
-# for bootstrap build:
-# makedepend on 'java-gcj-compat'
-# remove 
-#	--with-openjdk \
-# add
-# 	--with-gcj-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0 \
-#	--with-openjdk-src-dir=${srcdir}/icedtea6-${pkgver}/openjdk \
-#	--with-openjdk-src-zip=${srcdir} \
-#	--with-javac \
-                                        
 build() {
   # for hg checkout install mercurial and
-#  mkdir ${startdir}/src/icedtea6-${_date}
-#  cd ${startdir}/src/icedtea6-${_date}
+#  mkdir ${srcdir}/icedtea6-${_date}
+#  cd ${srcdir}/icedtea6-${_date}
 #  hg clone http://icedtea.classpath.org/hg/icedtea6 || return 1
 #  tar -cvjf ../icedtea6-${_date}.tar.bz2 *
 #  return 1
 
   unset JAVA_HOME
   unset CLASSPATH
+  if [ "${CARCH}" = "x86_64" ]; then
+    _arch=amd64
+  else
+    _arch=i586
+  fi
+  _javaver=1.6.0
 
   cd ${srcdir}/icedtea6
-  ln ${srcdir}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz .
+  ln -s ${srcdir}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz .
 
   # fix xulrunner linking
   patch -Np0 -i ${srcdir}/gcjwebplugin_xulrunner.diff || return 1
@@ -70,49 +63,66 @@
   export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
   unset MAKEFLAGS
 
+  if [ -x /usr/lib/jvm/java-${_javaver}-openjdk/bin/javac ]; then
+    JCONF="--with-openjdk --with-openjdk-home=/usr/lib/jvm/java-${_javaver}-openjdk"
+  elif [ -x /opt/java/bin/javac ]; then
+    JCONF="--with-openjdk --with-openjdk-home=/opt/java"
+  elif [ -x /usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/bin/javac ]; then
+    JCONF="--with-gcj-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0 --with-javac"
+  else
+    echo "No supported java installation found, install either openjdk6, jdk or java-gcj-compat"
+    return 1
+  fi
+
   ./configure --with-parallel-jobs=${HOTSPOT_BUILD_JOBS} \
 	--with-xalan2-jar=/usr/share/java/xalan.jar \
-	--with-openjdk \
-	--with-openjdk-home=/usr/lib/java-${_javaver}-openjdk \
-	--with-rhino=no
-
+	$JCONF
   LD_PRELOAD="" make || return 1
-  make || return 1
   
-  mkdir -p ${pkgdir}/usr/lib/java-${_javaver}-openjdk/jre
-  mkdir -p ${pkgdir}/usr/share/man
+  install -m755 -d ${pkgdir}/usr/lib/jvm/java-${_javaver}-openjdk/jre
+  install -m755 -d ${pkgdir}/usr/share/man
 
   pushd ${srcdir}/icedtea6/openjdk/control/build/linux-${_arch}/j2sdk-image
    # Install main files.
-  cp -a bin include lib src.zip ${pkgdir}/usr/lib/java-${_javaver}-openjdk
-  cp -a jre/bin jre/lib ${pkgdir}/usr/lib/java-${_javaver}-openjdk/jre
+  cp -a bin include lib src.zip ${pkgdir}/usr/lib/jvm/java-${_javaver}-openjdk || return 1
+  cp -a jre/bin jre/lib ${pkgdir}/usr/lib/jvm/java-${_javaver}-openjdk/jre || return 1
+
    # Install man pages.
-  cp -a man/man1 ${pkgdir}/usr/share/man
+  install -m755 -d ${pkgdir}/usr/share/man/man1
+  install -m644 man/man1/*.1 ${pkgdir}/usr/share/man/man1/ || return 1
+
    # Install demos and samples.
-  cp -a demo ${pkgdir}/usr/lib/java-${_javaver}-openjdk
-  mkdir -p sample/rmi
-  mv bin/java-rmi.cgi sample/rmi
-  cp -a sample ${pkgdir}/usr/lib/java-${_javaver}-openjdk
+  cp -a demo ${pkgdir}/usr/lib/jvm/java-${_javaver}-openjdk/ || return 1
+  install -m755 -d sample/rmi
+  mv bin/java-rmi.cgi sample/rmi || return 1
+  cp -a sample ${pkgdir}/usr/lib/jvm/java-${_javaver}-openjdk || return 1
   popd
 
   # Install icons and menu entries.
   for s in 16 24 32 48 ; do
-    install -D -p -m 644 \
-    openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
-    ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/java.png
+    install -m755 -d ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps
+    install -m644 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
+    ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/java.png || return 1
   done
 
   # Install desktop files.
-  install -d -m 755 ${pkgdir}/usr/share/{applications,pixmaps}
-  cp javaws.png ${pkgdir}/usr/share/pixmaps
-  install  -m644 {javaws,jconsole,policytool}.desktop ${pkgdir}/usr/share/applications
+  install -m755 -d ${pkgdir}/usr/share/{applications,pixmaps}
+  install -m644 javaws.png ${pkgdir}/usr/share/pixmaps || return 1
+  install -m644 {javaws,jconsole,policytool}.desktop ${pkgdir}/usr/share/applications || return 1
 
   # link the mozilla-plugin
-  mkdir -p ${pkgdir}/usr/lib/mozilla/plugins/
-  pushd $pkgdir/usr/lib/mozilla/plugins/
-  ln -v -s  /usr/lib/java-${_javaver}-openjdk/jre/lib/${_arch/i586/i386}/gcjwebplugin.so .
-  popd
+  install -m755 -d ${pkgdir}/usr/lib/mozilla/plugins/
+  ln -sf /usr/lib/jvm/java-${_javaver}-openjdk/jre/lib/${_arch/i586/i386}/gcjwebplugin.so ${pkgdir}/usr/lib/mozilla/plugins/ || return 1
 
+  # link binaries into /usr/bin
+  install -m755 -d ${pkgdir}/usr/bin
+  pushd ${pkgdir}/usr/lib/jvm/java-${_javaver}-openjdk/bin
+  for file in *; do
+    ln -sf /usr/lib/jvm/java-${_javaver}-openjdk/bin/${file} \
+      ${pkgdir}/usr/bin || return 1
+  done
+ 
   # set some variables
-  install -m755 -D ${startdir}/src/openjdk6.profile ${startdir}/pkg/etc/profile.d/openjdk6.sh
+  install -m755 -d ${pkgdir}/etc/profile.d
+  install -m755 ${srcdir}/openjdk6.profile ${pkgdir}/etc/profile.d/openjdk6.sh || return 1
 }

Copied: openjdk6/repos/testing-x86_64/openjdk6.install (from rev 7506, openjdk6/trunk/openjdk6.install)
===================================================================
--- testing-x86_64/openjdk6.install	                        (rev 0)
+++ testing-x86_64/openjdk6.install	2008-08-02 18:48:11 UTC (rev 7507)
@@ -0,0 +1,12 @@
+post_install() {
+  xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+}
+
+post_upgrade() {
+  post_install
+}
+
+
+post_remove() {
+  post_install
+}

Modified: testing-x86_64/openjdk6.profile
===================================================================
--- testing-x86_64/openjdk6.profile	2008-08-02 18:41:35 UTC (rev 7506)
+++ testing-x86_64/openjdk6.profile	2008-08-02 18:48:11 UTC (rev 7507)
@@ -1,13 +1,4 @@
-export JAVA_HOME=/usr/lib/java-1.6.0-openjdk/
-export PATH=$PATH:$JAVA_HOME/bin
-export MANPATH=$MANPATH:$JAVA_HOME/man
-export JAVADIR=$JAVA_HOME
-export JAVA_ROOT=$JAVA_HOME
-export JAVA_BINDIR=$JAVA_HOME/bin
-export JDK_HOME=$JAVA_HOME
-export J2SDKDIR=$JAVA_HOME
-export JRE_HOME=$JAVA_HOME/jre
-export J2REDIR=$JRE_HOME
-export PATH=$PATH:$J2REDIR/bin
-export CLASSPATH=$CLASSPATH:$J2REDIR/lib
-export CLASSPATH=$CLASSPATH:$J2SDKDIR/lib
+export J2SDKDIR=/usr/lib/jvm/java-1.6.0-openjdk
+export J2REDIR=$J2SDKDIR/jre
+export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk
+export CLASSPATH="${CLASSPATH:+$CLASSPATH:}$J2SDKDIR/lib:$J2REDIR/lib"




More information about the arch-commits mailing list