wok-next view icedtea6-jdk/receipt @ rev 6891
Fixed cups. Needed to add --enable-dbus and --with-dbusdir=/etc/dbus-1 for there to be a /etc/dbus-1 folder to copy to package.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Oct 21 02:47:40 2010 +0000 (2010-10-21) |
parents | c64455fbcb86 |
children | 685f070bd605 |
line source
1 # SliTaz package receipt.
3 PACKAGE="icedtea6-jdk"
4 SOURCE="icedtea6"
5 VERSION="1.9.1"
6 CATEGORY="development"
7 SHORT_DESC="A Free Software harness for OpenJDK."
8 MAINTAINER="rcx@zoominternet.net"
9 DEPENDS="icedtea6-jre glibc-base zlib xorg-libX11 xorg-libXau xorg-libXdmcp"
10 BUILD_DEPENDS="gcc+gcj slitaz-toolchain autoconf automake m4 diffutils gawk \
11 coreutils-file-special coreutils-file-summarize alsa-lib-dev cups-dev \
12 gawk file patch findutils perl zip unzip bzip2 tar cpio glib-dev zlib-dev \
13 fastjar rhino ecj apache-ant xalan-xerces-j \
14 freetype-dev gtk+-dev giflib-dev jpeg-dev libpng-dev \
15 xorg-inputproto xorg-kbproto xorg-libXi-dev xorg-libXinerama-dev \
16 xorg-libXp-dev xorg-libXt-dev xorg-libXtst-dev xorg-printproto \
17 xorg-recordproto xorg-renderproto xorg-xextproto xorg-xineramaproto xorg-xproto wget"
18 TARBALL="$SOURCE-$VERSION.tar.gz"
19 WEB_SITE="http://www.iced-tea.org/"
20 WGET_URL="http://icedtea.classpath.org/download/source/$TARBALL"
22 openjdk_version="b20"
23 openjdk_date="21_jun_2010"
24 JAXWS="jdk6-jaxws-${openjdk_version}.zip"
25 JAXP="jdk6-jaxp-${openjdk_version}.zip"
26 JAF="jdk6-jaf-${openjdk_version}.zip"
27 OPENJDK="openjdk-6-src-${openjdk_version}-${openjdk_date}.tar.gz"
28 WGETJAXWS="https://jax-ws.dev.java.net/files/documents/4202/150724"
29 WGETJAXP="https://jaxp.dev.java.net/files/documents/913/150648"
30 WGETJAF="https://jax-ws.dev.java.net/files/documents/4202/150725"
31 WGETOPENJDK="http://download.java.net/openjdk/jdk6/promoted/${openjdk_version}"
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 # Limit memory usage
37 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
39 local JVM_PREFIX
40 JVM_PREFIX="/usr/lib/jvm/java-icedtea"
42 # NOTE: This build does not seem to work with ECJ 3.5
43 local ECJ_VERSION
44 ECJ_VERSION="3.6"
46 cd $src
47 mkdir drops
48 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile*
49 for i in $JAXWS $JAXP $JAF $OPENJDK ; do
50 if [ -f $SOURCES_REPOSITORY/$i ]; then
51 cp $SOURCES_REPOSITORY/$i drops
52 elif [ "$i" == "$JAXWS" ]; then
53 wget -O $SOURCES_REPOSITORY/$JAXWS --no-check-certificate "$WGETJAXWS/$JAXWS"
54 cp $SOURCES_REPOSITORY/$JAXWS drops
55 elif [ "$i" == "$JAXP" ]; then
56 wget -O $SOURCES_REPOSITORY/$JAXP --no-check-certificate "$WGETJAXP/$JAXP"
57 cp $SOURCES_REPOSITORY/$JAXP drops
58 elif [ "$i" == "$JAF" ]; then
59 wget -O $SOURCES_REPOSITORY/$JAF --no-check-certificate "$WGETJAF/$JAF"
60 cp $SOURCES_REPOSITORY/$JAF drops
61 elif [ "$i" == "$OPENJDK" ]; then
62 wget -O $SOURCES_REPOSITORY/$OPENJDK "$WGETOPENJDK/$OPENJDK"
63 cp $SOURCES_REPOSITORY/$OPENJDK .
64 fi
66 done
67 [ -L /usr/bin/find ] && tazpkg get-install findutils --forced
68 [ -L /usr/bin/diff ] && tazpkg get-install diffutils --forced
69 [ "$(readlink /usr/bin/awk)" == "gawk" ] ||
70 tazpkg get-install gawk --forced
71 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
72 cat > slitaz.sh <<EOT
73 # Busybox compatibility
74 find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
75 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
76 EOT
77 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
78 -e 's/--check/-c/' \
79 -e 's/ln -sfv/ln -sf/' Makefile*
80 autoreconf &&
81 ./configure \
82 --prefix=/usr \
83 --disable-plugin \
84 --disable-docs \
85 --with-ecj \
86 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
87 --with-gcj \
88 --with-gcj-home=/usr/lib/jvm/java-gcj \
89 --with-xalan2-jar=/usr/share/java/xalan.jar \
90 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
91 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
92 --with-rhino=/usr/share/java/js.jar \
93 --with-abs-install-dir=$JVM_PREFIX \
94 $CONFIGURE_ARGS &&
95 make -j 1 ARCH_PREFIX= || exit 1
97 # NOTE: IcedTea6 does not define an "install" target
99 rm -r -f $src/_pkg
101 local JVM_BUILDDIR
102 JVM_BUILDDIR=$src/openjdk/build/linux-i586/j2sdk-image
103 local JVM_DESTDIR
104 JVM_DESTDIR=$src/_pkg$JVM_PREFIX
106 mkdir -p $JVM_DESTDIR
107 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
108 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
110 mkdir -p $JVM_DESTDIR/jre
111 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
112 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
114 # Delete duplicated executables from the JDK bin
115 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
116 rm -f $JVM_DESTDIR/bin/$jbin
117 done
119 # Create symlinks for JDK binaries
120 mkdir -p $src/_pkg/usr/jdk-bin
121 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
122 ln -s $JVM_PREFIX/bin/$jbin $src/_pkg/usr/jdk-bin/$jbin
123 done
125 # Create symlinks for JRE binaries
126 mkdir -p $src/_pkg/usr/jre-bin
127 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
128 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
129 ln -s $JVM_PREFIX/jre/bin/$jbin $src/_pkg/usr/jre-bin
130 done
131 }
133 # Rules to gen a SliTaz package suitable for Tazpkg.
134 genpkg_rules()
135 {
136 mkdir -p $fs/usr/lib/jvm/java-icedtea
137 cp -a $_pkg/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
138 cp -a $_pkg/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
139 }