#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild # https://developer.mozilla.org/en/XULRunner # Packager Andrea Sciucca ( gohanz at infinito.it) # Thanks Darkvision :) http://slackbot.sourceforge.net # http://www.slacky.it # # # Exit on most errors set -e CWD=`pwd` TMP=${TMP:-/tmp/tgz} NAME=xulrunner PKG=$TMP/package/$NAME VERSION=1.9.0.10 CHOST=i486 ARCH=${ARCH:-i686} BUILD=1as SOURCE=http://releases.mozilla.org/pub/mozilla.org/$NAME/releases/$VERSION/source/$NAME-$VERSION-source.tar.bz2 if [ ! -e $NAME-$VERSION-source.tar.bz2 ]; then wget -c $SOURCE fi if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O3 -march=i686 -pipe -fomit-frame-pointer" elif [ "$ARCH" = "athlon64" ]; then SLKCFLAGS="-O2 -march=athlon64 -pipe" elif [ "$ARCH" = "athlonxp" ]; then SLKCFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvjf $CWD/$NAME-$VERSION-source.tar.bz2 echo -e "\E[0;32m+----------------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild XULRunner |\E[0;0m" echo -e "\E[0;32m+----------------------------+\E[0;0m" cd mozilla # Add /usr/lib/mozilla/plugins to MOZ_PLUGINS_PATH: zcat $CWD/$NAME.diff.gz | patch -p1 -E --backup --verbose find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; chown -R root:root . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib \ --enable-shared \ --with-default-mozilla-five-home=/usr/lib/$NAME-$VERSION \ --enable-application=xulrunner \ --enable-svg \ --enable-svg-renderer=cairo \ --enable-canvas \ --enable-default-toolkit=cairo-gtk2 \ --enable-system-cairo \ --enable-xft \ --enable-pango \ --enable-extensions=default \ --enable-xprint \ --enable-xinerama \ --enable-crypto \ --enable-system-sqlite \ --disable-accessibility \ --disable-short-wchar \ --disable-installer \ --disable-updater \ --disable-tests \ --disable-pedantic \ --disable-mailnews \ --disable-short-wchar \ --disable-javaxpcom \ --with-system-zlib \ --with-system-jpeg \ --without-system-png \ --with-system-mng \ --with-system-bz2 \ --enable-nspr-autoconf \ --without-system-nspr \ --with-pthreads \ --with-x \ --x-includes=/usr/X11/include \ --x-libraries=/usr/X11/lib \ --program-prefix= \ --program-suffix= \ --build=$CHOST-slackware-linux make make install DESTDIR=$PKG # Create plugin-path. mkdir -p $PKG/usr/lib/mozilla/plugins # Install nss headers. # On newer releases of Slackware this is necessary if Seamonkey has been # uninstalled. In this case evolution-data-server will fail to build. mkdir -p $PKG/usr/include/$NAME-$VERSION/nss find security/nss/lib -name "*.h" -type f -exec cp -a {} $PKG/usr/include/$NAME-$VERSION/nss \; chown -R root:root $PKG/usr/include/$NAME-$VERSION/nss chmod 644 $PKG/usr/include/$NAME-$VERSION/nss/* # Symlink some files... ( mkdir -p $PKG/usr/lib cd $PKG/usr/lib for LIBRARY in $(find $PKG/usr/lib/$NAME-$VERSION -type f -maxdepth 1 -name "*.so" -printf "%f\n"); do rm -f "${LIBRARY}" ln -sf $NAME-$VERSION/$LIBRARY . done ) mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a LEGAL LICENSE README.txt $PKG/usr/doc/$NAME-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild cd $PKG requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi