#!/bin/sh # # $Id: seamonkey.SlackBuild 2006-10-12 JohnB316 $ # adapting from JohnB316's script 2006-11-10 incognu # 2007-05-12 incognu # # 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.6 PVERSION=1.1.6 ARCH=i586 BUILD=2vl59 VL_PACKAGER=incognu CFLAGS="-O2 -march=i586 -mtune=i686" CXXFLAGS=$CFLAGS export LDFLAGS="-Wl,--hash-style=gnu" 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: echo ' pref("general.useragent.extra.vendorComment", "(VectorLinux package '$VERSION'-'$BUILD')");' >> xpfe/bootstrap/browser-prefs.js # change homepage to vl; this is in prefs js but should be here: localisation: sed -i 's/browser.startup.homepage=http:\/\/www.mozilla.org\/projects\/seamonkey\/start\//browser.startup.homepage=http:\/\/www.vectorlinux.com\//' xpfe/browser/resources/locale/en-US/region.properties sed -i 's/startup.homepage_override_url=http:\/\/www.mozilla.org\/projects\/seamonkey\/start\//startup.homepage_override_url=http:\/\/www.vectorlinux.com\//' xpfe/browser/resources/locale/en-US/region.properties sed -i 's/browser.throbber.url=http:\/\/www.mozilla.org\/projects\/seamonkey\//browser.throbber.url=http:\/\/www.vectorlinux.com\//' xpfe/browser/resources/locale/en-US/region.properties # change default extension set to exclude reporter as it borks localisation sometimes cp -v configure configure~ cp -v configure.in configure.in~ sed -i 's/MOZ_EXTENSIONS_DEFAULT=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming permissions reporter"/MOZ_EXTENSIONS_DEFAULT=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming permissions"/g' configure sed -i 's/MOZ_EXTENSIONS_DEFAULT=" cookie xml-rpc xmlextras pref transformiix universalchardet webservices inspector gnomevfs auth permissions reporter spellcheck"/MOZ_EXTENSIONS_DEFAULT=" cookie xml-rpc xmlextras pref transformiix universalchardet webservices inspector gnomevfs auth permissions spellcheck"/g' configure sed -i 's/MOZ_EXTENSIONS_DEFAULT=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming permissions reporter"/MOZ_EXTENSIONS_DEFAULT=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming permissions"/g' configure.in sed -i 's/MOZ_EXTENSIONS_DEFAULT=" cookie xml-rpc xmlextras pref transformiix universalchardet webservices inspector gnomevfs auth permissions reporter spellcheck"/MOZ_EXTENSIONS_DEFAULT=" cookie xml-rpc xmlextras pref transformiix universalchardet webservices inspector gnomevfs auth permissions spellcheck"/g' configure.in # also do the filepicker to use the xul by default cp -v modules/libpref/src/init/all.js modules/libpref/src/init/all.js~ sed -i 's/pref("ui.allow_platform_file_picker", true);/pref("ui.allow_platform_file_picker", false);/g' modules/libpref/src/init/all.js # # 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 correctly # the patch is borrowed from Beyond Linux from Scratch and was originally # written for Fedora Core # # #cat $CWD/seamonkey-1.0.5-system_nss-1.patch | patch -p1 --verbose --backup --suffix=.orig || exit 1 # # also patch the source to get around an issue with pango text rendering # the patch is borrowed from Beyond Linux from Scratch # #cat $CWD/seamonkey-1.0.5-pangoxft-1.patch | patch -p1 --verbose --backup --suffix=.orig || exit 1 # both pango and nss patches' code seem mostly in the upstream source now ... 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 # This remains the standard plugin directory for all browsers. #mkdir -p $PKG/usr/lib/mozilla/plugins # # after the build is done, we will rename the seamonkey script # to seamonkey-original. This is done to allow us to check for # running instances of seamonkey and to bypass the profile selector # # this is now fixed upstream, so not using #mv $PKG/opt/seamonkey/bin/seamonkey $PKG/opt/seamonkey/bin/seamonkey-original # # now copy the new seamonkey script and make it world-executable # #cp -a $CWD/seamonkey $PKG/opt/seamonkey/bin/seamonkey 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 # is it necessary to copy nereid and nuvola there ??? also, the chrome.rdf wasn't copying over into a new profile ... # theme in profile seems unnecessary; installed globally; removing from 1.1.2 builds # cp -a $CWD/eurynome.jar $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/chrome/eurynome.jar 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/*.jar 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/*.jar chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/US/chrome/*.css # now copy the prefs.js into the default profile directory #cp -a $CWD/*.js $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/. #chown root.root $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/*.js #chmod 644 $PKG/opt/seamonkey/lib/seamonkey-$VERSION/defaults/profile/*.js #no, that needs to go in defaults/profile/US as is not going into profile otherwise for me: 20070909 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 # # we need to manually force zenity to be a dependency # for the Joe1962-contributed seamonkey script, so here goes: # # since this is fixed upstream in 1.1 builds, not using custom script #cat $CWD/slack-required >> $PKG/install/slack-required 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