From 70e4fa892f0be14762fec6f74ca376ac6df9ae75 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 1 Jan 2012 19:45:02 +0000 Subject: Initial revision --- icedtea-web/build/icedtea-web.SlackBuild | 136 ++++++++++++++++++++++++++++++ icedtea-web/build/icedtea-web.npapi.patch | 11 +++ icedtea-web/build/slack-desc | 18 ++++ 3 files changed, 165 insertions(+) create mode 100755 icedtea-web/build/icedtea-web.SlackBuild create mode 100644 icedtea-web/build/icedtea-web.npapi.patch create mode 100644 icedtea-web/build/slack-desc (limited to 'icedtea-web') diff --git a/icedtea-web/build/icedtea-web.SlackBuild b/icedtea-web/build/icedtea-web.SlackBuild new file mode 100755 index 00000000..690a02dd --- /dev/null +++ b/icedtea-web/build/icedtea-web.SlackBuild @@ -0,0 +1,136 @@ +#!/bin/sh + +# Copyright 2011, 2012 Eric Hameleers, Eindhoven, The Netherlands +# All rights reserved. + +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PKGNAM=icedtea-web +VERSION=1.1.4 +BUILD=${BUILD:-1} +NUMJOBS=${NUMJOBS:--j6} + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + +# Automatically determine the architecture we're building on: +MARCH=$( uname -m ) +if [ -z "$ARCH" ]; then + case "$MARCH" in + i?86) export ARCH=i486 ;; + armv7hl) export ARCH=$MARCH ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$MARCH ;; + esac +fi + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +case "ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac + +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/sources/$PKGNAM-$VERSION.tar.?z* || exit 1 +cd $PKGNAM-$VERSION || exit 1 + +# We use seamonkey, not xulrunner: +sed -i -e 's/mozilla-plugin/seamonkey-plugin/g' configure + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +JVMDIR=${JAVA_HOME:-"/usr/lib${LIBDIRSUFFIX}/java"} + +CFLAGS="$SLKCFLAGS" \ +LDFLAGS="$SLKLDFLAGS" \ +./configure \ + --prefix=$JVMDIR \ + --mandir=$JVMDIR/man \ + --docdir=/usr/doc/$PKGNAM-$VERSION \ + --with-jdk-home=$JVMDIR \ + --with-jre-home=$JVMDIR/jre \ + --with-pkgversion=$(cat /etc/slackware-version |tr ' ' '-')-$ARCH \ + --disable-docs \ + --build=$TARGET + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +# Provide symlinks to binaries to make them accessible: +install -m755 -d $PKG/usr/bin +install -m755 -d $PKG/$JVMDIR/jre/bin +( cd $PKG/$JVMDIR/bin + for file in *; do + ln -sf ${JVMDIR}/bin/${file} ${PKG}/usr/bin + ln -sf ${JVMDIR}/bin/${file} ${PKG}/${JVMDIR}/jre/bin + done +) + +# Provide a link to the plugin for browsers: +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins +( cd $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins + ln -sf $JVMDIR/lib/IcedTeaPlugin.so IcedTeaPlugin.so +) + +# Install desktop files: +mkdir -p $PKG/usr/share/{applications,pixmaps} +cp javaws.png $PKG/usr/share/pixmaps/ +install -m 0644 javaws.desktop $PKG/usr/share/applications/ +install -m 0644 itweb-settings.desktop $PKG/usr/share/applications/ + +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a \ + AUTHORS COPYING ChangeLog NEWS README \ + $PKG/usr/doc/$PKGNAM-$VERSION + +mkdir -p $PKG/install +cat $CWD/slack-desc.$PKGNAM > $PKG/install/slack-desc +zcat $CWD/doinst.sh.$PKGNAM.gz > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION |tr - _)-$ARCH-$BUILD.txz + diff --git a/icedtea-web/build/icedtea-web.npapi.patch b/icedtea-web/build/icedtea-web.npapi.patch new file mode 100644 index 00000000..84798eae --- /dev/null +++ b/icedtea-web/build/icedtea-web.npapi.patch @@ -0,0 +1,11 @@ +--- ./plugin/icedteanp/IcedTeaNPPlugin.cc.orig 2011-08-31 20:17:31.083018181 +0200 ++++ ./plugin/icedteanp/IcedTeaNPPlugin.cc 2012-01-01 17:40:02.244669944 +0100 +@@ -2262,7 +2262,7 @@ + + // Returns a string describing the MIME type that this plugin + // handles. +-char* ++const char* + NP_GetMIMEDescription () + { + PLUGIN_DEBUG ("NP_GetMIMEDescription\n"); diff --git a/icedtea-web/build/slack-desc b/icedtea-web/build/slack-desc new file mode 100644 index 00000000..5a549d8b --- /dev/null +++ b/icedtea-web/build/slack-desc @@ -0,0 +1,18 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + |-----handy-ruler------------------------------------------------------| +icedtea-web: icedtea-web (Java Web Start browser plugin) +icedtea-web: +icedtea-web: The IcedTea-Web project provides a Free Software web browser plugin +icedtea-web: running applets written in the Java programming language and +icedtea-web: an implementation of Java Web Start, originally based on the +icedtea-web: NetX project. +icedtea-web: +icedtea-web: +icedtea-web: For additional information, refer to this web page: +icedtea-web: http://icedtea.classpath.org/wiki/IcedTea-Web +icedtea-web: -- cgit v1.2.3