wok view icedtea6-jdk/receipt @ rev 10641

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