wok-6.x annotate icedtea6-jdk/receipt @ rev 9233
Fix a typo in icetea6-jdk
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sat Mar 12 05:22:21 2011 +0100 (2011-03-12) |
parents | f1207145dcb3 |
children | c41de8958f36 |
rev | line source |
---|---|
rcx@3803 | 1 # SliTaz package receipt. |
rcx@3803 | 2 |
rcx@3803 | 3 PACKAGE="icedtea6-jdk" |
rcx@3803 | 4 SOURCE="icedtea6" |
slaxemulator@6861 | 5 VERSION="1.9.1" |
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 DEPENDS="icedtea6-jre glibc-base zlib xorg-libX11 xorg-libXau xorg-libXdmcp" |
gokhlayeh@9223 | 10 BUILD_DEPENDS="gcc+gcj autoconf automake m4 diffutils gawk \ |
rcx@3803 | 11 coreutils-file-special coreutils-file-summarize alsa-lib-dev cups-dev \ |
gokhlayeh@9223 | 12 file patch findutils perl zip unzip bzip2 tar cpio glib-dev \ |
gokhlayeh@9223 | 13 fastjar rhino ecj apache-ant xalan-xerces-j wget \ |
rcx@3803 | 14 freetype-dev gtk+-dev giflib-dev jpeg-dev libpng-dev \ |
rcx@3803 | 15 xorg-inputproto xorg-kbproto xorg-libXi-dev xorg-libXinerama-dev \ |
rcx@3803 | 16 xorg-libXp-dev xorg-libXt-dev xorg-libXtst-dev xorg-printproto \ |
gokhlayeh@8552 | 17 xorg-recordproto xorg-renderproto xorg-xextproto xorg-xineramaproto xorg-xproto \ |
gokhlayeh@9233 | 18 nss jdk6-jaxws jdk6-jaxp jdk6-jaf openjdk-6-src" |
rcx@3803 | 19 TARBALL="$SOURCE-$VERSION.tar.gz" |
rcx@3803 | 20 WEB_SITE="http://www.iced-tea.org/" |
rcx@3803 | 21 WGET_URL="http://icedtea.classpath.org/download/source/$TARBALL" |
rcx@3803 | 22 |
gokhlayeh@9223 | 23 # Note to icedtea6 updaters, |
gokhlayeh@9223 | 24 # You should check version into receipts: |
gokhlayeh@9223 | 25 # * jdk6-jaxws (version: $openjdk_version) |
gokhlayeh@9223 | 26 # * jdk6-jaxp (version: $openjdk_version) |
gokhlayeh@9223 | 27 # * jdk6-jaf (version: $openjdk_version) |
gokhlayeh@9223 | 28 # * openjdk-6-src (version: $openjdk_version-$openjdk_date) |
gokhlayeh@9223 | 29 # Theses receipts allow to have source tarballs managed by tazwok. |
slaxemulator@6866 | 30 openjdk_version="b20" |
slaxemulator@6866 | 31 openjdk_date="21_jun_2010" |
slaxemulator@6866 | 32 |
rcx@3803 | 33 # Rules to configure and make the package. |
rcx@3803 | 34 compile_rules() |
rcx@3803 | 35 { |
pascal@6031 | 36 # Limit memory usage |
pascal@6031 | 37 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo) |
pascal@6031 | 38 |
rcx@3803 | 39 local JVM_PREFIX |
rcx@6017 | 40 JVM_PREFIX="/usr/lib/jvm/java-icedtea" |
rcx@3910 | 41 |
rcx@3803 | 42 # NOTE: This build does not seem to work with ECJ 3.5 |
rcx@6017 | 43 local ECJ_VERSION |
rcx@6017 | 44 ECJ_VERSION="3.6" |
rcx@3803 | 45 |
rcx@3803 | 46 cd $src |
pascal@6034 | 47 mkdir drops |
rcx@6059 | 48 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile* |
gokhlayeh@9223 | 49 |
gokhlayeh@9223 | 50 report open-bloc |
gokhlayeh@9223 | 51 |
gokhlayeh@9223 | 52 # Check than all sources files are available, or exit. |
gokhlayeh@9223 | 53 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do |
gokhlayeh@9223 | 54 tazwok get-src $i || { report close-bloc; return 1; } |
gokhlayeh@9223 | 55 cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops |
slaxemulator@6894 | 56 done |
gokhlayeh@9223 | 57 tazwok get-src openjdk-6-src || { report close-bloc; return 1; } |
gokhlayeh@9223 | 58 cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz . |
slaxemulator@6894 | 59 |
gokhlayeh@9223 | 60 report step "Checking that all needed tools are OK" |
pascal@6034 | 61 [ -L /usr/bin/find ] && tazpkg get-install findutils --forced |
pascal@5915 | 62 [ -L /usr/bin/diff ] && tazpkg get-install diffutils --forced |
pascal@6029 | 63 [ "$(readlink /usr/bin/awk)" == "gawk" ] || |
pascal@6029 | 64 tazpkg get-install gawk --forced |
slaxemulator@6892 | 65 [ -L /usr/bin/sed ] && tazpkg get-install sed --forced |
gokhlayeh@9223 | 66 |
gokhlayeh@9223 | 67 report step "Running compilation" |
pascal@5915 | 68 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }') |
pascal@4304 | 69 cat > slitaz.sh <<EOT |
pascal@4304 | 70 # Busybox compatibility |
slaxemulator@6892 | 71 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile |
pascal@6034 | 72 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile |
pascal@4304 | 73 EOT |
pascal@6034 | 74 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \ |
pascal@5152 | 75 -e 's/--check/-c/' \ |
pascal@4304 | 76 -e 's/ln -sfv/ln -sf/' Makefile* |
rcx@3803 | 77 autoreconf && |
rcx@3803 | 78 ./configure \ |
rcx@3803 | 79 --prefix=/usr \ |
rcx@3803 | 80 --disable-plugin \ |
rcx@3803 | 81 --disable-docs \ |
rcx@3803 | 82 --with-ecj \ |
rcx@6017 | 83 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \ |
rcx@3803 | 84 --with-gcj \ |
rcx@3803 | 85 --with-gcj-home=/usr/lib/jvm/java-gcj \ |
rcx@3803 | 86 --with-xalan2-jar=/usr/share/java/xalan.jar \ |
rcx@3803 | 87 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \ |
rcx@3803 | 88 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \ |
rcx@3803 | 89 --with-rhino=/usr/share/java/js.jar \ |
rcx@3803 | 90 --with-abs-install-dir=$JVM_PREFIX \ |
rcx@3803 | 91 $CONFIGURE_ARGS && |
gokhlayeh@9223 | 92 make -j 1 ARCH_PREFIX= || { report close-bloc; return 1; } |
rcx@3803 | 93 |
slaxemulator@6927 | 94 # NOTE: don't build with -j 4. Only build with -j 1 or tank will crash |
rcx@3803 | 95 # NOTE: IcedTea6 does not define an "install" target |
rcx@3803 | 96 |
gokhlayeh@9223 | 97 report step "Copying needed files to install dir" |
gokhlayeh@9223 | 98 rm -rf $DESTDIR |
rcx@3803 | 99 |
rcx@3803 | 100 local JVM_BUILDDIR |
slaxemulator@6927 | 101 JVM_BUILDDIR=$src/openjdk.build/j2sdk-image |
rcx@3803 | 102 local JVM_DESTDIR |
gokhlayeh@9223 | 103 JVM_DESTDIR=$DESTDIR$JVM_PREFIX |
rcx@3803 | 104 |
rcx@3803 | 105 mkdir -p $JVM_DESTDIR |
rcx@3803 | 106 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR |
rcx@3803 | 107 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR |
rcx@3803 | 108 |
rcx@3803 | 109 mkdir -p $JVM_DESTDIR/jre |
rcx@3803 | 110 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre |
rcx@3803 | 111 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre |
rcx@3803 | 112 |
rcx@3803 | 113 # Delete duplicated executables from the JDK bin |
rcx@3803 | 114 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do |
rcx@3803 | 115 rm -f $JVM_DESTDIR/bin/$jbin |
rcx@3803 | 116 done |
rcx@3803 | 117 |
rcx@3803 | 118 # Create symlinks for JDK binaries |
gokhlayeh@9223 | 119 mkdir -p $DESTDIR/usr/jdk-bin |
rcx@3803 | 120 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do |
gokhlayeh@9223 | 121 ln -s $JVM_PREFIX/bin/$jbin $DESTDIR/usr/jdk-bin/$jbin |
rcx@3803 | 122 done |
rcx@3803 | 123 |
rcx@3803 | 124 # Create symlinks for JRE binaries |
gokhlayeh@9223 | 125 mkdir -p $DESTDIR/usr/jre-bin |
rcx@3803 | 126 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do |
rcx@3803 | 127 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin |
gokhlayeh@9223 | 128 ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin |
rcx@3803 | 129 done |
gokhlayeh@9223 | 130 report close-bloc |
rcx@3803 | 131 } |
rcx@3803 | 132 |
rcx@3803 | 133 # Rules to gen a SliTaz package suitable for Tazpkg. |
rcx@3803 | 134 genpkg_rules() |
rcx@3803 | 135 { |
rcx@3803 | 136 mkdir -p $fs/usr/lib/jvm/java-icedtea |
rcx@3803 | 137 cp -a $_pkg/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea |
rcx@3803 | 138 cp -a $_pkg/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea |
rcx@3803 | 139 } |