#!/bin/sh # # $Id: seamonkey.SlackBuild 2006-10-12 JohnB316 $ # adapting from JohnB316's script 2006-11-10 incognu # revised 2007-05-12 incognu; 2008-07 # # adapted from seamonkey.SlackBuild script for Slackware # # the seamonkey source code can be found at ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/ # 1.1.6 src is ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/1.1.6/seamonkey-1.1.6.source.tar.bz2 # the extra themes, Eurynome, Nereid and Nuvola can be found at http://vectorlinux.osuosl.org/incognu/ or http://incognu.com CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp # TMP=$CWD/tmp fi PKG=$TMP/package-seamonkey VERSION=1.1.14 PVERSION=1.1.14 ARCH=i586 BUILD=1vl59 VL_PACKAGER=incognu CFLAGS="-O2 -march=i586 -mtune=i686" CXXFLAGS=$CFLAGS export LDFLAGS="-Wl,--hash-style=gnu" # not for vl.58 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 -N --verbose --backup --suffix=.orig || exit 1 rm -f xpfe/bootstrap/mozilla.in.orig # append VL to user agent string: cat << EOF >> ./xpfe/bootstrap/browser-prefs.js || exit 1 pref("general.useragent.extra.vendorComment", "(VectorLinux package $VERSION-$BUILD)"); EOF # change homepage to vl; this is in prefs js but should also be here: localisation: zcat $CWD/all.js.diff.gz | patch -p1 -N --verbose --backup --suffix=.orig || exit 1 zcat $CWD/configure.diff.gz | patch -p1 -N --verbose --backup --suffix=.orig || exit 1 zcat $CWD/configure.in.diff.gz | patch -p1 -N --verbose --backup --suffix=.orig || exit 1 zcat $CWD/region.properties.diff.gz | patch -p1 -N --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-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 \ --with-java-include-path=/usr/include \ --with-java-bin-path=/usr/bin \ --enable-default-toolkit=gtk2 \ --enable-application=suite \ --enable-xft \ --disable-activex \ --disable-activex-scripting \ i486-slackware-linux BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 make -s export BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 make -s libs BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 DESTDIR=$PKG make install chmod a+x $PKG/opt/seamonkey/bin/seamonkey chown root.root $PKG/opt/seamonkey/bin/seamonkey # copy the .desktop files and the matching icons to their proper places 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/* # now copy the xfce helpers into their proper place mkdir -p $PKG/usr/share/xfce4/helpers cp -a $CWD/helpers/*.desktop $PKG/usr/share/xfce4/helpers chown -R root:root $PKG/usr/share/xfce4 chmod 644 $PKG/usr/share/xfce4/helpers/* 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 our chrome modifications to the global chrome directory if [ ! -d $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome ] ; then mkdir -p $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome fi cp -a $CWD/eurynome.jar $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/ chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/eurynome.jar chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/eurynome.jar cp -a $CWD/nereid.jar $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/ chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/nereid.jar chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/nereid.jar cp -a $CWD/nuvola.jar $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/ chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/nuvola.jar chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/nuvola.jar cp -a $CWD/newsfox.jar $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/ chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/newsfox.jar chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/newsfox.jar cp -a $CWD/*.rdf $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/ chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/*.rdf chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/*.rdf # copy the chrome modifications into the default profile if [ ! -d $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/chrome ] ; then mkdir -p $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/chrome fi cp -a $CWD/chrome.rdf $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/chrome/chrome.rdf cp -a $CWD/*.css $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/chrome chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/chrome/*.rdf chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/chrome/*.css chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/chrome/*.rdf chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/chrome/*.css cp -a $CWD/*.js $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/. chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/*.js chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/*.js # now copy the inconnu icons into the right place -- actually these are jtek's based on incognu's if [ ! -d $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/icons/default ] ; then mkdir -p $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/icons/default else rm $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/icons/default/*.* fi cp -a $CWD/default-linux/*.xpm $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/icons/default chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/icons/default/*.xpm chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/chrome/icons/default/*.xpm # copy our modified bookmarks and our prefs.js into the default profile cp -a $CWD/bookmarks.html $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/ chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/bookmarks.html chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/bookmarks.html cp -a $CWD/bookmarks.html $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/bookmarks.html chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/bookmarks.html 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