#!/bin/sh # # $Id: seamonkey.SlackBuild 2006-04-30 JohnB316 $ # # adapted from seamonkey.SlackBuild script for Slackware CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-seamonkey VERSION=1.0.2 PVERSION=1.0.2 ARCH=i586 BUILD=4vl6 VL_PACKAGER=JohnB316 CFLAGS="-O2 -march=i586 -mtune=i686" CXXFLAGS=$CFLAGS if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP tar xjvf $CWD/seamonkey-$VERSION.source.tar.bz2 cd mozilla # cat $CWD/mozconfig > $TMP/mozilla/.mozconfig # Add /usr/lib/mozilla/plugins to MOZ_PLUGINS_PATH: zcat $CWD/seamonkey.moz_plugin_path.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 rm -f xpfe/bootstrap/mozilla.in.orig # # for this build, we will use a separate package with the nss and nspr # libraries - this will facilitate building gaim and we won't have to # worry about extra symlinks in this package. # # patch the source to allow --with-system-nss switch to work # the patch is borrowed from Beyond Linux from Scratch and was originally # written for Fedora Core # zcat $CWD/seamonkey-1.0.1-system_nss-1.patch.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 export MOZILLA_OFFICIAL="1" export BUILD_OFFICIAL="1" chown -R root:root . BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 \ ./configure --prefix=/opt/seamonkey \ --enable-optimize="-O2 -march=i586 -mtune=i686" \ --disable-debug \ --enable-elf-dynstr-gc \ --with-default-mozilla-five-home=/opt/seamonkey/lib/seamonkey-${VERSION} \ --enable-strip \ --enable-strip-libs \ --disable-tests \ --enable-svg \ --enable-canvas \ --disable-freetype2 \ --enable-svg-renderer-cairo \ --enable-pango \ --disable-short-wchar \ --enable-nspr-autoconf \ --enable-calendar \ --enable-ldap \ --enable-extensions=default,irc \ --enable-crypto \ --disable-xprint \ --disable-gnomeui \ --disable-gnomevfs \ --disable-installer \ --with-system-nspr \ --with-system-nss \ --with-system-zlib \ --with-system-jpeg \ --with-system-png \ --with-system-mng \ --with-system-cairo \ --enable-default-toolkit=gtk2 \ --enable-application=suite \ --enable-xft \ i486-slackware-linux BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 make -j3 -s export BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 make -j3 -s libs BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 DESTDIR=$PKG make install # This remains the standard plugin directory for all browsers. mkdir -p $PKG/usr/lib/mozilla/plugins mkdir -p $PKG/usr/share/applications cp -a $CWD/*.desktop $PKG/usr/share/applications chown -R root:root $PKG/usr/share/applications chmod 644 $PKG/usr/share/applications/* mkdir -p $PKG/usr/share/pixmaps cp -a $CWD/*.png $PKG/usr/share/pixmaps chown -R root:root $PKG/usr/share/pixmaps chmod 644 $PKG/usr/share/pixmaps/* mkdir -p $PKG/opt/seamonkey/doc/seamonkey-$VERSION cp -a LEGAL LICENSE README.txt \ $PKG/opt/seamonkey/doc/seamonkey-$VERSION cd $PKG find . -type f | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded find . -type f | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded gzip -9 $PKG/opt/seamonkey/man/*/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # # append build information to the end of the slack-desc file # cat >> $PKG/install/slack-desc << EOF #---------------------------------------- BUILDDATE: `date` PACKAGER: $VL_PACKAGER HOST: `uname -srm` DISTRO: `cat /etc/vector-version` CFLAGS: $CFLAGS CONFIGURE: `awk "/\.\/configure\ /" $TMP/mozilla/config.status` EOF cat $CWD/doinst.sh > $PKG/install/doinst.sh # since we are putting seamonkey into /opt/seamonkey, # let's add a startup script to seed its path mkdir -p $PKG/etc/profile.d cat $CWD/seamonkey.sh > $PKG/etc/profile.d/seamonkey.sh chown root.root $PKG/etc/profile.d/seamonkey.sh chmod a+x $PKG/etc/profile.d/seamonkey.sh cd $PKG # copy some plugins into the appropriate place: if [ !d $PKG/opt/seamonkey/lib/seamonkey-$VERSION/plugins ] ; then mkdir -p $PKG/opt/seamonkey/lib/seamonkey-$VERSION/plugins fi cp -a $CWD/*.so $PKG/opt/seamonkey/lib/seamonkey-$VERSION/plugins/. cp -a $CWD/*.xpt $PKG/opt/seamonkey/lib/seamonkey-$VERSION/plugins/. echo "Generating slapt-get dependencies..." requiredbuilder -v -y $PKG echo "Building package..." makepkg -l y -c n $TMP/seamonkey-$VERSION-$ARCH-$BUILD.tlz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/mozilla rm -rf $PKG fi