# HG changeset patch # User Wolfgang Rosenauer # Date 1283497341 -7200 # Node ID 37947cc02392efd95f193a8cefad4ec7c7234767 # Parent 9a05844af63460d8655dd1e032eb2af0137d304a new branch to prepare MozillaFirefox as a standalone package instead of basing on xulrunner diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/MozillaFirefox.spec --- a/MozillaFirefox/MozillaFirefox.spec Thu Sep 02 23:05:22 2010 +0200 +++ b/MozillaFirefox/MozillaFirefox.spec Fri Sep 03 09:02:21 2010 +0200 @@ -20,11 +20,12 @@ Name: MozillaFirefox -%define use_xulrunner 1 +%define use_xulrunner 0 %define xulrunner mozilla-xulrunner20 -BuildRequires: autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa-devel yasm +BuildRequires: autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python startup-notification-devel unzip pkg-config update-desktop-files zip fdupes Mesa-devel yasm hunspell-devel nss-shared-helper-devel %if %suse_version > 1110 BuildRequires: libiw-devel +BuildRequires: libproxy-devel %else BuildRequires: wireless-tools %endif @@ -40,6 +41,10 @@ Summary: Mozilla Firefox Web Browser Url: http://www.mozilla.org/ Group: Productivity/Networking/Web/Browsers +# this is needed to match this package with the kde4 helper package without the main package +# having a hard requirement on the kde4 package +%define kde_helper_version 6 +Provides: mozilla-kde4-version = %{kde_helper_version} Source: firefox-%{version}-source.tar.bz2 Source1: MozillaFirefox.desktop Source2: MozillaFirefox-rpmlintrc @@ -51,20 +56,35 @@ Source8: firefox-mimeinfo.xml Source9: firefox-lockdown.js Source10: compare-locales.tar.bz2 +Source11: add-plugins.sh.in +Source12: create-tar.sh +Source13: toolkit-lockdown.js Source16: firefox.1 -Patch1: firefox-libxul-sdk.patch -Patch2: firefox-credits.patch -Patch3: toolkit-download-folder.patch -Patch4: firefox-linkorder.patch -Patch5: firefox-browser-css.patch -Patch6: firefox-cross-desktop.patch -Patch8: firefox-appname.patch -Patch9: firefox-kde.patch -Patch10: firefox-ui-lockdown.patch -Patch11: firefox-no-sync-l10n.patch -Patch12: firefox-sync-system-nss.patch -Patch13: firefox-sync-build.patch -Patch14: firefox-tabview.patch +# Gecko/Toolkit +Patch1: toolkit-download-folder.patch +Patch2: mozilla-nongnome-proxies.patch +Patch3: mozilla-prefer_plugin_pref.patch +Patch4: mozilla-shared-nss-db.patch +Patch5: mozilla-kde.patch +Patch6: mozilla-gconf-backend.patch +Patch7: gecko-lockdown.patch +Patch8: toolkit-ui-lockdown.patch +Patch9: mozilla-cpuid.patch +Patch10: mozilla-buildsymbols.patch +Patch11: mozilla-cairo-lcd.patch +# Firefox/browser +Patch30: firefox-libxul-sdk.patch +Patch31: firefox-credits.patch +Patch32: firefox-linkorder.patch +Patch33: firefox-browser-css.patch +Patch34: firefox-cross-desktop.patch +Patch35: firefox-appname.patch +Patch36: firefox-kde.patch +Patch37: firefox-ui-lockdown.patch +Patch38: firefox-no-sync-l10n.patch +Patch39: firefox-sync-system-nss.patch +Patch40: firefox-sync-build.patch +Patch41: firefox-tabview.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(post): coreutils shared-mime-info desktop-file-utils Requires(postun): shared-mime-info desktop-file-utils @@ -89,8 +109,10 @@ %define localize 1 %ifarch ppc ppc64 s390 s390x ia64 %define crashreporter 0 +%define plugincontainer 0 %else %define crashreporter 1 +%define plugincontainer 1 %endif ### build options end @@ -155,39 +177,72 @@ %description branding-upstream This package provides upstream look and feel for MozillaFirefox. +%if %crashreporter && !0%{?use_xulrunner} +%package buildsymbols +License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+ +Summary: Breakpad buildsymbols for %{name} +Group: Development/Debug + +%description buildsymbols +This subpackage contains the Breakpad created and compatible debugging +symbols meant for upload to Mozilla's crash collector database. +%endif %prep %setup -q -n mozilla -b 7 -b 10 cd $RPM_BUILD_DIR/mozilla +# Gecko/Toolkit %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 -%patch8 -p1 +#%patch6 -p1 +#%patch7 -p1 +#%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +#%patch11 -p1 +# Firefox/browser +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 %if %suse_version >= 1110 -%patch9 -p1 +%patch36 -p1 # install kde.js install -m 644 %{SOURCE6} browser/app/profile/kde.js %endif -#%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 +#%patch37 -p1 +%patch38 -p1 +%patch39 -p1 +%patch40 -p1 +%patch41 -p1 %build +kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) +if test "$kdehelperversion" != %{kde_helper_version}; then + echo fix kde helper version in the .spec file + exit 1 +fi export MOZ_BUILD_DATE=%{releasedate} export MOZILLA_OFFICIAL=1 export BUILD_OFFICIAL=1 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" +%ifarch ppc64 +export CFLAGS="$CFLAGS -mminimal-toc" +%endif export CXXFLAGS="$CFLAGS" export MOZCONFIG=$RPM_BUILD_DIR/mozconfig +%if 0%{?use_xulrunner} SDKDIR=$(pkg-config --variable=sdkdir libxul) +%endif cat << EOF > $MOZCONFIG mk_add_options MOZILLA_OFFICIAL=1 mk_add_options BUILD_OFFICIAL=1 +mk_add_options MOZ_MILESTONE_RELEASE=1 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj . \$topsrcdir/browser/config/mozconfig @@ -202,11 +257,13 @@ ac_add_options --with-system-jpeg #ac_add_options --with-system-png # doesn't work because of missing APNG support ac_add_options --with-system-zlib +ac_add_options --enable-startup-notification +ac_add_options --enable-system-hunspell ac_add_options --disable-installer ac_add_options --disable-updater ac_add_options --disable-tests -ac_add_options --disable-debug ac_add_options --enable-update-channel=beta +#ac_add_options --enable-debug EOF %if 0%{?use_xulrunner} cat << EOF >> $MOZCONFIG @@ -218,6 +275,22 @@ ac_add_options --enable-official-branding EOF %endif +%if %suse_version > 1110 +cat << EOF >> $MOZCONFIG +ac_add_options --enable-libproxy +EOF +%endif +%if ! %crashreporter +cat << EOF >> $MOZCONFIG +ac_add_options --disable-crashreporter +EOF +%endif +%if ! %plugincontainer +cat << EOF >> $MOZCONFIG +# Chromium IPC is not ported to Power,S/390 and Itanium (currently just x86,x86_64 and arm) +ac_add_options --disable-ipc +EOF +%endif make -f client.mk build %install @@ -303,6 +376,18 @@ # fdupes %fdupes $RPM_BUILD_ROOT%{progdir} %fdupes $RPM_BUILD_ROOT%{_datadir} +# create breakpad debugsymbols +%if %crashreporter && !0%{?use_xulrunner} +SYMBOLS_NAME="firefox-%{version}-%{release}.%{_arch}-%{suse_version}-symbols" +make buildsymbols \ + SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \ + SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \ + SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME" +if [ -e dist/*symbols.zip ]; then + mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/ + cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/ +fi +%endif %clean rm -rf $RPM_BUILD_ROOT @@ -324,14 +409,6 @@ opt/gnome/bin/update-mime-database > /dev/null || : fi %endif -# move plugins to new location -if [ "$1" = "2" ]; then - if [ -d /opt/MozillaFirefox/%{_lib}/plugins ]; then - rm -rf /opt/MozillaFirefox/%{_lib}/plugins/libnullplugin.so - cp -fud /opt/MozillaFirefox/%{_lib}/plugins/* %{progdir}/plugins - rm -rf /opt/MozillaFirefox/%{_lib}/plugins - fi -fi exit 0 %postun @@ -348,6 +425,13 @@ fi %endif +%if !0%{?use_xulrunner} +%posttrans +[ -e %{_libdir}/firefox/add-plugins.sh ] && \ + %{_libdir}/firefox/add-plugins.sh > /dev/null 2>&1 +exit 0 +%endif + %files %defattr(-,root,root) %dir %{progdir} @@ -395,4 +479,10 @@ #%dir %{progdir}/defaults/ #%{progdir}/defaults/profile/bookmarks.html +%if %crashreporter && !0%{?use_xulrunner} +%files buildsymbols +%defattr(-,root,root) +%{_datadir}/mozilla/ +%endif + %changelog diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/add-plugins.sh.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/add-plugins.sh.in Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,57 @@ +#! /bin/sh +# Copyright (c) 2008 Wolfgang Rosenauer. All rights reserved. +# + +# check if we are started as root +# only one of UID and USER must be set correctly +if test "$UID" != 0 -a "$USER" != root; then + echo "You must be root to start $0." + exit 1 +fi + +PREFIX="%PROGDIR" + +# dictionaries +MYSPELL=/usr/share/myspell +MOZ_SPELL=$PREFIX/dictionaries +if [ -d $MOZ_SPELL ] ; then + if [ -d $MYSPELL ] ; then + for dict in $MYSPELL/??[-_]??.aff ; do + + # check is it is really the file or it is a string which contain '??_??' + if ! [ -e $dict ] ; then + continue + fi + + # the dict file name + dict_file=`echo ${dict##*/}` + + # the dict file has a valid name + lang=`echo ${dict_file:0:2}` + country=`echo ${dict_file:3:2}` + + # check for .dic file + if [ ! -r $MYSPELL/${lang}[-_]${country}.dic ] ; then + continue + fi + + # create links + if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.aff ] ; then + ln -sf $MYSPELL/${lang}[-_]${country}.aff \ + $MOZ_SPELL/${lang}-${country}.aff + fi + if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.dic ] ; then + ln -sf $MYSPELL/${lang}[-_]${country}.dic \ + $MOZ_SPELL/${lang}-${country}.dic + fi + done + echo "-> added myspell dictionaries" + fi + + # remove broken links + for dict in $MOZ_SPELL/*.{aff,dic} ; do + if ! [ -r $dict ] ; then + rm -f $dict + fi + done +fi diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/create-tar.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/create-tar.sh Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,31 @@ +#!/bin/bash + +BRANCH="mozilla-central" +RELEASE_TAG="FIREFOX_4_0b5_RELEASE" +VERSION="4.0b" + +# mozilla +hg clone http://hg.mozilla.org/$BRANCH mozilla +pushd mozilla +[ "$RELEASE_TAG" == "default" ] || hg update -r $RELEASE_TAG +popd +tar cjf firefox-$VERSION-source.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla + +# l10n +test ! -d l10n && mkdir l10n +for locale in $(awk '{ print $1; }' mozilla/browser/locales/shipped-locales); do + case $locale in + ja-JP-mac|en-US) + ;; + *) + hg clone http://hg.mozilla.org/l10n-central/$locale l10n/$locale + [ "$RELEASE_TAG" == "default" ] || hg -R l10n/$locale up -C -r $RELEASE_TAG + ;; + esac +done +tar cjf l10n-$VERSION.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n + +# compare-locales +hg clone http://hg.mozilla.org/build/compare-locales +tar cjf compare-locales.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales + diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/gecko-lockdown.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/gecko-lockdown.patch Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,1 @@ +../gecko-lockdown.patch \ No newline at end of file diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/mozilla-buildsymbols.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/mozilla-buildsymbols.patch Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,1 @@ +../mozilla-buildsymbols.patch \ No newline at end of file diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/mozilla-cairo-lcd.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/mozilla-cairo-lcd.patch Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,1 @@ +../mozilla-cairo-lcd.patch \ No newline at end of file diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/mozilla-cpuid.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/mozilla-cpuid.patch Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,1 @@ +../mozilla-cpuid.patch \ No newline at end of file diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/mozilla-gconf-backend.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/mozilla-gconf-backend.patch Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,1 @@ +../mozilla-gconf-backend.patch \ No newline at end of file diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/mozilla-kde.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/mozilla-kde.patch Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,1 @@ +../mozilla-kde.patch \ No newline at end of file diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/mozilla-nongnome-proxies.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/mozilla-nongnome-proxies.patch Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,1 @@ +../mozilla-nongnome-proxies.patch \ No newline at end of file diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/mozilla-prefer_plugin_pref.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/mozilla-prefer_plugin_pref.patch Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,1 @@ +../mozilla-prefer_plugin_pref.patch \ No newline at end of file diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/mozilla-shared-nss-db.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/mozilla-shared-nss-db.patch Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,1 @@ +../mozilla-shared-nss-db.patch \ No newline at end of file diff -r 9a05844af634 -r 37947cc02392 MozillaFirefox/toolkit-ui-lockdown.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/toolkit-ui-lockdown.patch Fri Sep 03 09:02:21 2010 +0200 @@ -0,0 +1,1 @@ +../toolkit-ui-lockdown.patch \ No newline at end of file