wok rev 9223

Fix icedtea6; handle multi-sources using some new receipts
author Antoine Bodin <gokhlayeh@slitaz.org>
date Fri Mar 11 17:58:14 2011 +0100 (2011-03-11)
parents 2074057740e1
children 3d0f1a3ab4c1
files icedtea6-jdk/receipt icedtea6-jre/receipt jdk6-jaf/receipt jdk6-jaxp/receipt jdk6-jaxws/receipt openjdk-6-src/receipt
line diff
     1.1 --- a/icedtea6-jdk/receipt	Fri Mar 11 17:41:03 2011 +0100
     1.2 +++ b/icedtea6-jdk/receipt	Fri Mar 11 17:58:14 2011 +0100
     1.3 @@ -7,29 +7,28 @@
     1.4  SHORT_DESC="A Free Software harness for OpenJDK."
     1.5  MAINTAINER="rcx@zoominternet.net"
     1.6  DEPENDS="icedtea6-jre glibc-base zlib xorg-libX11 xorg-libXau xorg-libXdmcp"
     1.7 -BUILD_DEPENDS="gcc+gcj slitaz-toolchain autoconf automake m4 diffutils gawk \
     1.8 +BUILD_DEPENDS="gcc+gcj autoconf automake m4 diffutils gawk \
     1.9  coreutils-file-special coreutils-file-summarize alsa-lib-dev cups-dev \
    1.10 -gawk file patch findutils perl zip unzip bzip2 tar cpio glib-dev zlib-dev \
    1.11 -fastjar rhino ecj apache-ant xalan-xerces-j \
    1.12 +file patch findutils perl zip unzip bzip2 tar cpio glib-dev \
    1.13 +fastjar rhino ecj apache-ant xalan-xerces-j wget \
    1.14  freetype-dev gtk+-dev giflib-dev jpeg-dev libpng-dev \
    1.15  xorg-inputproto xorg-kbproto xorg-libXi-dev xorg-libXinerama-dev \
    1.16  xorg-libXp-dev xorg-libXt-dev xorg-libXtst-dev xorg-printproto \
    1.17  xorg-recordproto xorg-renderproto xorg-xextproto xorg-xineramaproto xorg-xproto \
    1.18 -nss"
    1.19 +nss jdk6-jaws jdk6-jaxp jdk6-jaf openjdk-6-src"
    1.20  TARBALL="$SOURCE-$VERSION.tar.gz"
    1.21  WEB_SITE="http://www.iced-tea.org/"
    1.22  WGET_URL="http://icedtea.classpath.org/download/source/$TARBALL"
    1.23  
    1.24 +# Note to icedtea6 updaters,
    1.25 +# You should check version into receipts:
    1.26 +# * jdk6-jaxws (version: $openjdk_version)
    1.27 +# * jdk6-jaxp (version: $openjdk_version)
    1.28 +# * jdk6-jaf (version: $openjdk_version)
    1.29 +# * openjdk-6-src (version: $openjdk_version-$openjdk_date)
    1.30 +# Theses receipts allow to have source tarballs managed by tazwok.
    1.31  openjdk_version="b20"
    1.32  openjdk_date="21_jun_2010"
    1.33 -JAXWS="jdk6-jaxws-${openjdk_version}.zip"
    1.34 -JAXP="jdk6-jaxp-${openjdk_version}.zip"
    1.35 -JAF="jdk6-jaf-${openjdk_version}.zip"
    1.36 -OPENJDK="openjdk-6-src-${openjdk_version}-${openjdk_date}.tar.gz"
    1.37 -WGETJAXWS="https://jax-ws.dev.java.net/files/documents/4202/150724"
    1.38 -WGETJAXP="https://jaxp.dev.java.net/files/documents/913/150648"
    1.39 -WGETJAF="https://jax-ws.dev.java.net/files/documents/4202/150725"
    1.40 -WGETOPENJDK="http://download.java.net/openjdk/jdk6/promoted/${openjdk_version}"
    1.41  
    1.42  # Rules to configure and make the package.
    1.43  compile_rules()
    1.44 @@ -47,36 +46,25 @@
    1.45  	cd $src
    1.46  	mkdir drops
    1.47  	sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/'  Makefile*
    1.48 -	[ -L /usr/bin/wget ] && tazpkg get-install wget --forced
    1.49 -	for i in $JAXWS $JAXP $JAF ; do
    1.50 -		if [ -f $SOURCES_REPOSITORY/$i ]; then
    1.51 -			cp $SOURCES_REPOSITORY/$i drops
    1.52 -		elif [ "$i" == "$JAXWS" ]; then
    1.53 -			wget -O $SOURCES_REPOSITORY/$JAXWS --no-check-certificate "$WGETJAXWS/$JAXWS"
    1.54 -			cp $SOURCES_REPOSITORY/$JAXWS drops
    1.55 -		elif [ "$i" == "$JAXP" ]; then
    1.56 -			wget -O $SOURCES_REPOSITORY/$JAXP --no-check-certificate "$WGETJAXP/$JAXP"
    1.57 -			cp $SOURCES_REPOSITORY/$JAXP drops
    1.58 -		elif [ "$i" == "$JAF" ]; then
    1.59 -			wget -O $SOURCES_REPOSITORY/$JAF --no-check-certificate "$WGETJAF/$JAF"
    1.60 -			cp $SOURCES_REPOSITORY/$JAF drops
    1.61 -		fi
    1.62 -		
    1.63 +
    1.64 +	report open-bloc
    1.65 +	
    1.66 +	# Check than all sources files are available, or exit.
    1.67 +	for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do
    1.68 +		tazwok get-src $i || { report close-bloc; return 1; }
    1.69 +		cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops
    1.70  	done
    1.71 +	tazwok get-src openjdk-6-src || { report close-bloc; return 1; }
    1.72 +	cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
    1.73  
    1.74 -	for i in $OPENJDK ; do
    1.75 -		if [ -f $SOURCES_REPOSITORY/$i ]; then
    1.76 -			cp $SOURCES_REPOSITORY/$i .
    1.77 -		else
    1.78 -			wget -O $SOURCES_REPOSITORY/$OPENJDK "$WGETOPENJDK/$OPENJDK"
    1.79 -			cp $SOURCES_REPOSITORY/$OPENJDK .
    1.80 -		fi
    1.81 -	done
    1.82 +	report step "Checking that all needed tools are OK"
    1.83  	[ -L /usr/bin/find ] && tazpkg get-install findutils --forced
    1.84  	[ -L /usr/bin/diff ] && tazpkg get-install diffutils --forced
    1.85  	[ "$(readlink /usr/bin/awk)" == "gawk" ] ||
    1.86  	tazpkg get-install gawk --forced
    1.87  	[ -L /usr/bin/sed ] && tazpkg get-install sed --forced
    1.88 +
    1.89 +	report step "Running compilation"
    1.90  	mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
    1.91  	cat > slitaz.sh <<EOT
    1.92  # Busybox compatibility
    1.93 @@ -101,17 +89,18 @@
    1.94  		--with-rhino=/usr/share/java/js.jar \
    1.95  		--with-abs-install-dir=$JVM_PREFIX \
    1.96  		$CONFIGURE_ARGS &&
    1.97 -	make -j 1 ARCH_PREFIX=  || return 1
    1.98 +	make -j 1 ARCH_PREFIX=  || { report close-bloc; return 1; }
    1.99  
   1.100  	# NOTE: don't build with -j 4. Only build with -j 1 or tank will crash
   1.101  	# NOTE: IcedTea6 does not define an "install" target
   1.102  	
   1.103 -	rm -r -f $src/_pkg
   1.104 +	report step "Copying needed files to install dir"
   1.105 +	rm -rf $DESTDIR
   1.106  
   1.107  	local JVM_BUILDDIR
   1.108  	JVM_BUILDDIR=$src/openjdk.build/j2sdk-image
   1.109  	local JVM_DESTDIR
   1.110 -	JVM_DESTDIR=$src/_pkg$JVM_PREFIX
   1.111 +	JVM_DESTDIR=$DESTDIR$JVM_PREFIX
   1.112  
   1.113  	mkdir -p $JVM_DESTDIR
   1.114  	cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
   1.115 @@ -127,17 +116,18 @@
   1.116  	done
   1.117  
   1.118  	# Create symlinks for JDK binaries
   1.119 -	mkdir -p $src/_pkg/usr/jdk-bin
   1.120 +	mkdir -p $DESTDIR/usr/jdk-bin
   1.121  	for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
   1.122 -		ln -s $JVM_PREFIX/bin/$jbin $src/_pkg/usr/jdk-bin/$jbin
   1.123 +		ln -s $JVM_PREFIX/bin/$jbin $DESTDIR/usr/jdk-bin/$jbin
   1.124  	done
   1.125  	
   1.126  	# Create symlinks for JRE binaries
   1.127 -	mkdir -p $src/_pkg/usr/jre-bin
   1.128 +	mkdir -p $DESTDIR/usr/jre-bin
   1.129  	for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
   1.130  		ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
   1.131 -		ln -s $JVM_PREFIX/jre/bin/$jbin $src/_pkg/usr/jre-bin
   1.132 +		ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin
   1.133  	done
   1.134 +	report close-bloc
   1.135  }
   1.136  
   1.137  # Rules to gen a SliTaz package suitable for Tazpkg.
     2.1 --- a/icedtea6-jre/receipt	Fri Mar 11 17:41:03 2011 +0100
     2.2 +++ b/icedtea6-jre/receipt	Fri Mar 11 17:58:14 2011 +0100
     2.3 @@ -16,9 +16,6 @@
     2.4  # Rules to gen a SliTaz package suitable for Tazpkg.
     2.5  genpkg_rules()
     2.6  {
     2.7 -	# tazwok does not define _pkg correctly when both WANTED and SOURCE are set
     2.8 -	
     2.9 -
    2.10  	mkdir -p $fs/usr/lib/jvm/java-icedtea
    2.11  	cp -a $_pkg/usr/lib/jvm/java-icedtea/jre $fs/usr/lib/jvm/java-icedtea
    2.12  }
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/jdk6-jaf/receipt	Fri Mar 11 17:58:14 2011 +0100
     3.3 @@ -0,0 +1,12 @@
     3.4 +# SliTaz package receipt.
     3.5 +
     3.6 +PACKAGE="jdk6-jaf"
     3.7 +VERSION="b20"
     3.8 +CATEGORY="development"
     3.9 +SHORT_DESC="A component of Sun's jdk6 we use to cook icedtea6 (empty package)"
    3.10 +MAINTAINER="gokhlayeh@mailoo.org"
    3.11 +BUILD_DEPENDS="wget"
    3.12 +TARBALL="$PACKAGE-$VERSION.zip"
    3.13 +WEB_SITE="http://java.sun.com"
    3.14 +WGET_URL="https://jax-ws.dev.java.net/files/documents/4202/150725/$TARBALL"
    3.15 +COOK_OPT="!unpack !repack_src !fs"
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/jdk6-jaxp/receipt	Fri Mar 11 17:58:14 2011 +0100
     4.3 @@ -0,0 +1,12 @@
     4.4 +# SliTaz package receipt.
     4.5 +
     4.6 +PACKAGE="jdk6-jaxp"
     4.7 +VERSION="b20"
     4.8 +CATEGORY="development"
     4.9 +SHORT_DESC="A component of Sun's jdk6 we use to cook icedtea6 (empty package)"
    4.10 +MAINTAINER="gokhlayeh@mailoo.org"
    4.11 +BUILD_DEPENDS="wget"
    4.12 +TARBALL="$PACKAGE-$VERSION.zip"
    4.13 +WEB_SITE="http://java.sun.com"
    4.14 +WGET_URL="https://jaxp.dev.java.net/files/documents/913/150648/$TARBALL"
    4.15 +COOK_OPT="!unpack !repack_src !fs"
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/jdk6-jaxws/receipt	Fri Mar 11 17:58:14 2011 +0100
     5.3 @@ -0,0 +1,12 @@
     5.4 +# SliTaz package receipt.
     5.5 +
     5.6 +PACKAGE="jdk6-jaxws"
     5.7 +VERSION="b20"
     5.8 +CATEGORY="development"
     5.9 +SHORT_DESC="A component of Sun's jdk6 we use to cook icedtea6 (empty package)"
    5.10 +MAINTAINER="gokhlayeh@mailoo.org"
    5.11 +BUILD_DEPENDS="wget"
    5.12 +TARBALL="$PACKAGE-$VERSION.zip"
    5.13 +WEB_SITE="http://java.sun.com"
    5.14 +WGET_URL="https://jax-ws.dev.java.net/files/documents/4202/150724/$TARBALL"
    5.15 +COOK_OPT="!unpack !repack_src !fs"
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/openjdk-6-src/receipt	Fri Mar 11 17:58:14 2011 +0100
     6.3 @@ -0,0 +1,11 @@
     6.4 +# SliTaz package receipt.
     6.5 +
     6.6 +PACKAGE="openjdk-6-src"
     6.7 +VERSION="b20-21_jun_2010"
     6.8 +CATEGORY="development"
     6.9 +SHORT_DESC="Openjdk6 we use to cook icedtea6 (empty package)"
    6.10 +MAINTAINER="gokhlayeh@mailoo.org"
    6.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    6.12 +WEB_SITE="http://java.sun.com"
    6.13 +WGET_URL="http://download.java.net/openjdk/jdk6/promoted/${VERSION%-*}/$TARBALL"
    6.14 +COOK_OPT="!unpack !repack_src !fs"