wok-next annotate icedtea6-jdk/receipt @ rev 11114
Up: libtasn1 to 2.10.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Oct 26 19:24:52 2011 +0000 (2011-10-26) |
parents | 5b3eacdcc59d |
children | 0adddcc6b227 |
rev | line source |
---|---|
rcx@3803 | 1 # SliTaz package receipt. |
rcx@3803 | 2 |
rcx@3803 | 3 PACKAGE="icedtea6-jdk" |
rcx@3803 | 4 SOURCE="icedtea6" |
slaxemulator@9235 | 5 VERSION="1.9.7" |
rcx@3803 | 6 CATEGORY="development" |
rcx@3803 | 7 SHORT_DESC="A Free Software harness for OpenJDK." |
rcx@3803 | 8 MAINTAINER="rcx@zoominternet.net" |
rcx@3803 | 9 TARBALL="$SOURCE-$VERSION.tar.gz" |
rcx@3803 | 10 WEB_SITE="http://www.iced-tea.org/" |
rcx@3803 | 11 WGET_URL="http://icedtea.classpath.org/download/source/$TARBALL" |
rcx@3803 | 12 |
pankso@10639 | 13 DEPENDS="icedtea6-jre xorg xorg-libXtst xorg-libXp cups" |
pankso@10639 | 14 BUILD_DEPENDS="gcc+gcj autoconf automake m4 diffutils gawk cups-dev wget cpio \ |
pankso@10639 | 15 coreutils-file-special coreutils-file-summarize alsa-lib-dev file patch perl \ |
pankso@10639 | 16 zip unzip findutils bzip2 tar glib-dev fastjar rhino ecj apache-ant jpeg-dev \ |
pankso@10639 | 17 xalan-xerces-j gtk+-dev giflib-dev libpng-dev xorg-dev xorg-libXtst-dev \ |
pankso@10639 | 18 xorg-libXp-dev xorg-dev-proto nss nss-dev jdk6-jaxws jdk6-jaxp jdk6-jaf \ |
pankso@10639 | 19 openjdk-6-src" |
pankso@10639 | 20 |
gokhlayeh@9223 | 21 # Note to icedtea6 updaters, |
gokhlayeh@9223 | 22 # You should check version into receipts: |
gokhlayeh@9223 | 23 # * jdk6-jaxws (version: $openjdk_version) |
gokhlayeh@9223 | 24 # * jdk6-jaxp (version: $openjdk_version) |
gokhlayeh@9223 | 25 # * jdk6-jaf (version: $openjdk_version) |
gokhlayeh@9223 | 26 # * openjdk-6-src (version: $openjdk_version-$openjdk_date) |
pankso@10639 | 27 # Theses receipts allow to have source tarballs in SRC. |
slaxemulator@6866 | 28 openjdk_version="b20" |
slaxemulator@6866 | 29 openjdk_date="21_jun_2010" |
slaxemulator@6866 | 30 |
rcx@3803 | 31 # Rules to configure and make the package. |
rcx@3803 | 32 compile_rules() |
rcx@3803 | 33 { |
pascal@6031 | 34 # Limit memory usage |
pascal@6031 | 35 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo) |
pascal@6031 | 36 |
rcx@3803 | 37 local JVM_PREFIX |
rcx@6017 | 38 JVM_PREFIX="/usr/lib/jvm/java-icedtea" |
rcx@3910 | 39 |
rcx@3803 | 40 # NOTE: This build does not seem to work with ECJ 3.5 |
rcx@6017 | 41 local ECJ_VERSION |
rcx@6017 | 42 ECJ_VERSION="3.6" |
rcx@3803 | 43 |
rcx@3803 | 44 cd $src |
pascal@6034 | 45 mkdir drops |
rcx@6059 | 46 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile* |
gokhlayeh@9223 | 47 |
gokhlayeh@9223 | 48 # Check than all sources files are available, or exit. |
gokhlayeh@9223 | 49 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do |
pankso@10640 | 50 cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops || exit 1 |
slaxemulator@6894 | 51 done |
pankso@10643 | 52 # openjdk-6-src is in BUILD_DEPENDS and must be build like jdk6-* pkgs. |
gokhlayeh@9223 | 53 cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz . |
slaxemulator@6894 | 54 |
pascal@5915 | 55 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }') |
pascal@4304 | 56 cat > slitaz.sh <<EOT |
pascal@4304 | 57 # Busybox compatibility |
slaxemulator@6892 | 58 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile |
pascal@6034 | 59 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile |
pascal@4304 | 60 EOT |
pascal@6034 | 61 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \ |
pascal@5152 | 62 -e 's/--check/-c/' \ |
pascal@4304 | 63 -e 's/ln -sfv/ln -sf/' Makefile* |
rcx@3803 | 64 autoreconf && |
rcx@3803 | 65 ./configure \ |
rcx@3803 | 66 --prefix=/usr \ |
rcx@3803 | 67 --disable-plugin \ |
rcx@3803 | 68 --disable-docs \ |
rcx@3803 | 69 --with-ecj \ |
rcx@6017 | 70 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \ |
rcx@3803 | 71 --with-gcj \ |
rcx@3803 | 72 --with-gcj-home=/usr/lib/jvm/java-gcj \ |
rcx@3803 | 73 --with-xalan2-jar=/usr/share/java/xalan.jar \ |
rcx@3803 | 74 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \ |
rcx@3803 | 75 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \ |
rcx@3803 | 76 --with-rhino=/usr/share/java/js.jar \ |
rcx@3803 | 77 --with-abs-install-dir=$JVM_PREFIX \ |
pankso@10654 | 78 $CONFIGURE_ARGS || exit 1 |
pankso@10650 | 79 make -j 1 ARCH_PREFIX= 2>&1 | sed s/ERROR/error/ |
rcx@3803 | 80 |
pankso@10641 | 81 echo "Copying needed files to install dir..." |
gokhlayeh@9223 | 82 rm -rf $DESTDIR |
rcx@3803 | 83 |
rcx@3803 | 84 local JVM_BUILDDIR |
slaxemulator@6927 | 85 JVM_BUILDDIR=$src/openjdk.build/j2sdk-image |
rcx@3803 | 86 local JVM_DESTDIR |
pankso@10639 | 87 JVM_DESTDIR=${DESTDIR}$JVM_PREFIX |
pankso@10654 | 88 echo "OpenJDK build : source/openjdk.build/j2sdk-image" |
pankso@10654 | 89 echo "OpenJDK install : install/$JVM_PREFIX" |
rcx@3803 | 90 |
pankso@10654 | 91 echo "Copying JDK files : bin/ lib/" |
rcx@3803 | 92 mkdir -p $JVM_DESTDIR |
rcx@3803 | 93 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR |
rcx@3803 | 94 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR |
pankso@10641 | 95 |
pankso@10654 | 96 echo "Copying JRE files : bin/ lib/" |
rcx@3803 | 97 mkdir -p $JVM_DESTDIR/jre |
rcx@3803 | 98 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre |
rcx@3803 | 99 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre |
rcx@3803 | 100 |
rcx@3803 | 101 # Delete duplicated executables from the JDK bin |
pankso@10641 | 102 echo "Deleting duplicated files..." |
rcx@3803 | 103 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do |
rcx@3803 | 104 rm -f $JVM_DESTDIR/bin/$jbin |
rcx@3803 | 105 done |
rcx@3803 | 106 |
rcx@3803 | 107 # Create symlinks for JDK binaries |
pankso@10641 | 108 echo "Creating symlinks for JDK binaries..." |
gokhlayeh@9223 | 109 mkdir -p $DESTDIR/usr/jdk-bin |
rcx@3803 | 110 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do |
gokhlayeh@9223 | 111 ln -s $JVM_PREFIX/bin/$jbin $DESTDIR/usr/jdk-bin/$jbin |
rcx@3803 | 112 done |
rcx@3803 | 113 |
rcx@3803 | 114 # Create symlinks for JRE binaries |
pankso@10641 | 115 echo "Creating symlinks for JRE binaries..." |
gokhlayeh@9223 | 116 mkdir -p $DESTDIR/usr/jre-bin |
rcx@3803 | 117 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do |
rcx@3803 | 118 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin |
gokhlayeh@9223 | 119 ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin |
rcx@3803 | 120 done |
rcx@3803 | 121 } |
rcx@3803 | 122 |
rcx@3803 | 123 # Rules to gen a SliTaz package suitable for Tazpkg. |
rcx@3803 | 124 genpkg_rules() |
rcx@3803 | 125 { |
rcx@3803 | 126 mkdir -p $fs/usr/lib/jvm/java-icedtea |
rcx@3803 | 127 cp -a $_pkg/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea |
rcx@3803 | 128 cp -a $_pkg/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea |
rcx@3803 | 129 } |