# # WARNING, READ FIRST: # # PLEASE svn cp SOURCES FROM xulrunner SOURCES INSTEAD # OF COMMITING AGAIN THE TARBALL # # This is a special package that needs special treatment. Due to the amount of # security updates it needs, it's common to ship new upstream versions instead of patching. # That means this package MUST be BUILDABLE for stable official releases. # This also means only STABLE upstream releases, NO betas. # This is a discussed topic. Please, do not flame it again. %define major 5.0 %define ff_epoch 0 # (tpg) set version HERE !!! %define realver %{major}.1 # (tpg) MOZILLA_FIVE_HOME %define mozillalibdir %{_libdir}/%{name}-%{realver} %define pluginsdir %{_libdir}/mozilla/plugins # libxul.so is provided by libxulrunnner2.0. %define _requires_exceptions libxul.so # this seems fragile, so require the exact version or later (#58754) %define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0) %define _use_syshunspell 1 #define prel 0 %define subrel 2 %if 0%{?prel} %define release %mkrel -c %prel 1 %else %define release %mkrel 1 %endif Summary: Next generation web browser Name: firefox Version: %{realver} Epoch: %{ff_epoch} Release: %{release} License: MPLv1+ Group: Networking/WWW Url: http://www.mozilla.com/firefox/ %if 0%{?prel} Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}%prel.source.tar.bz2 Source1: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}%prel.source.tar.bz2.asc %else Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}.source.tar.bz2 Source1: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}.source.tar.bz2.asc %endif Source4: %{name}.desktop Source9: kde.js Patch1: mozilla-firefox-3.0.5-lang.patch Patch2: firefox-vendor.patch Patch3: mozilla-firefox-1.5.0.6-systemproxy.patch # (OpenSuse) add patch to make firefox always use /usr/bin/firefox when "make firefox # the default web browser" is used fix mdv bug#58784 Patch5: firefox-3.6.3-appname.patch Patch7: mozilla-firefox-run-mozilla.patch Patch8: firefox-disable-check-default-browser.patch Patch10: firefox-3.5.3-default-mail-handler.patch # Patches for kde integration of FF Patch11: firefox-kde.patch Patch12: mozilla-kde.patch # patch from https://bugzilla.mozilla.org/show_bug.cgi?id=551138 # we'll have to use system libffi on arm because moz folks are using # vfp asm which doesn't exist on non-cortex platforms # src/arm/sysv.S: Assembler messages: # src/arm/sysv.S:266: Error: selected processor does not support ARM mode `flddle d0,[ip]' # src/arm/sysv.S:267: Error: selected processor does not support ARM mode `fldmiadgt ip,{d0-d7}' # src/arm/sysv.S:307: Error: selected processor does not support ARM mode `fstseq s0,[r2]' # src/arm/sysv.S:311: Error: selected processor does not support ARM mode `fstdeq d0,[r2]' # src/arm/sysv.S:316: Error: selected processor does not support ARM mode `fstmiadeq r2,{d0-d3}' # src/arm/sysv.S:400: Error: selected processor does not support ARM mode `fstmfdd sp!,{d0-d7}' # src/arm/sysv.S:438: Error: selected processor does not support ARM mode `flds s0,[sp]' # src/arm/sysv.S:441: Error: selected processor does not support ARM mode `fldd d0,[sp]' # src/arm/sysv.S:450: Error: selected processor does not support ARM mode `fldmiad sp,{d0-d1}' # src/arm/sysv.S:453: Error: selected processor does not support ARM mode `fldmiad sp,{d0-d3}' Patch32: xulrunner_allow_to_use_system_libffi.patch Patch33: xulrunner_configure_neon_check.patch Patch34: xulrunner_nojit.patch Patch35: firefox-5.0-asciidel.patch BuildRequires: gtk+2-devel BuildRequires: unzip BuildRequires: zip BuildRequires: libjpeg-devel BuildRequires: zlib-devel BuildRequires: glib2-devel BuildRequires: libIDL2-devel BuildRequires: makedepend BuildRequires: nss-devel >= 2:3.12.8 BuildRequires: nss-static-devel BuildRequires: nspr-devel >= 2:4.8.7 BuildRequires: startup-notification-devel BuildRequires: dbus-glib-devel BuildRequires: python Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version} BuildRequires: libsqlite3-devel >= 3.7.0.1-2 %ifnarch %arm %mips BuildRequires: valgrind BuildRequires: java-rpmbuild BuildRequires: yasm >= 1.0.1 %endif %ifarch %arm BuildRequires: libffi-devel %endif BuildRequires: rootcerts BuildRequires: libxt-devel %if %_use_syshunspell BuildRequires: hunspell-devel %endif BuildRequires: doxygen BuildRequires: libgnome2-devel BuildRequires: libgnomeui2-devel #BuildRequires: xulrunner-devel >= %xulrunner_version%{?prel:-0.%prel} BuildRequires: pkgconfig(libproxy-1.0) BuildRequires: pkgconfig(alsa) BuildRequires: wget BuildRequires: libnotify-devel BuildRequires: cairo-devel >= 1.10 BuildRequires: mesagl-devel BuildRequires: libvpx-devel BuildRequires: autoconf2.1 BuildRequires: libiw-devel %if 0%{?prel} Provides: %{name} = %{epoch}:%{realver}-0.%{prel} %else Provides: %{name} = %{epoch}:%{realver} %endif Provides: webclient Requires: indexhtml Requires: xdg-utils Suggests: myspell-en_US %ifarch x86_64 Suggests: nspluginwrapper %endif Requires(post): desktop-file-utils Requires(postun): desktop-file-utils # fixes bug #42096 Requires: mailcap Provides: mozilla-firefox = %{epoch}:%{version}-%{release} Obsoletes: firefox-ext-weave-sync %description The award-winning Web browser is now faster, more secure, and fully customizable to your online life. With Firefox(R), we've added powerful new features that make your online experience even better. It is an 'open source' product which is freely available, and is acquiring a growing proportion of international web browser usage. Firefox claims to offer a more secure web browsing experience than other products, with better protection against spyware and other Internet-based security threats. It includes all the standard features of a modern web browser, like Internet searching, tracking recently visited sites, setting up shortcuts to favourite sites, customising the software behaviour and so on. Firefox also includes features like 'tabbed browsing' (opening several web sites as sections within the same window) and methods for controlling pop-up windows, cookies and downloaded files. %package devel Summary: Development files for %{name} Group: Development/Other %description devel Files and macros mainly for building Firefox extensions. %prep %setup -qn mozilla-release %patch1 -p1 -b .lang %patch2 -p1 -b .vendor #patch3 -p1 %patch5 -p1 -b .defaultbrowser # It was disabled because firefox3 hangs when using soundwrapper #patch7 -p1 %patch8 -p1 -b .disable-software-update #patch9 %patch10 -p1 -b .default-mail-handler ## KDE INTEGRATION # copy current files and patch them later to keep them in sync %patch11 -p1 -b .kde %patch12 -p1 -b .kdemoz # install kde.js install -m 644 %{SOURCE9} browser/app/profile/kde.js # (tpg) remove ff bookmarks, use mga ones rm -rf browser/locales/en-US/profile/bookmarks.html touch browser/locales/en-US/profile/bookmarks.html # needed to regenerate certdata.c pushd security/nss/lib/ckfw/builtins perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt popd %patch32 -p1 %patch33 -p1 %ifarch %arm %if "%{_target_cpu}" != "armv7l" %patch34 -p1 %endif %endif %patch35 -p1 pushd js/src autoconf-2.13 popd autoconf-2.13 # (tpg) remove ff bookmarks, use mdv ones rm -rf browser/locales/en-US/profile/bookmarks.html touch browser/locales/en-US/profile/bookmarks.html # needed to regenerate certdata.c pushd security/nss/lib/ckfw/builtins perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt popd %build export MOZCONFIG=./mozconfig cat << EOF > $MOZCONFIG mk_add_options MOZILLA_OFFICIAL=1 mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZ_MAKE_FLAGS="%{_smp_mflags}" mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj ac_add_options --prefix="%{_prefix}" ac_add_options --libdir="%{_libdir}" ac_add_options --sysconfdir="%{_sysconfdir}" ac_add_options --mandir="%{_mandir}" ac_add_options --includedir="%{_includedir}" ac_add_options --datadir="%{_datadir}" ac_add_options --with-system-nspr ac_add_options --with-system-nss ac_add_options --with-system-zlib ac_add_options --disable-installer ac_add_options --disable-updater ac_add_options --disable-tests ac_add_options --disable-debug #ac_add_options --enable-chrome-format=jar #ac_add_options --enable-update-channel=beta ac_add_options --enable-official-branding ac_add_options --enable-libproxy %if %mgaversion > 2 ac_add_options --with-system-png %else ac_add_options --without-system-png %endif ac_add_options --with-system-jpeg ac_add_options --enable-system-cairo ac_add_options --enable-system-sqlite ac_add_options --with-distribution-id=org.mageia ac_add_options --disable-crashreporter %ifarch %arm %if "%{_target_cpu}" != "armv7l" ac_add_options --disable-methodjit ac_add_options --disable-tracejit %endif ac_add_options --enable-system-ffi %endif %ifnarch %arm %mips ac_add_options --with-valgrind ac_add_options --with-java-include-path=%{java_home}/include ac_add_options --with-java-bin-path=%{java_home}/bin %endif EOF %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl make -f client.mk build %install rm -rf %{buildroot} make -C %{_builddir}/obj/browser/installer STRIP=/bin/true # Copy files to buildroot %{__mkdir_p} %{buildroot}%{mozillalibdir} cp -rf %{_builddir}/obj/dist/firefox/* %{buildroot}%{mozillalibdir} %{__mkdir_p} %{buildroot}%{_bindir} ln -sf %{mozillalibdir}/firefox %{buildroot}%{_bindir}/firefox pushd %{buildroot}%{_bindir} ln -sf firefox mozilla-firefox popd # Create an own %_libdir/mozilla/plugins %{__mkdir_p} %{buildroot}%{_libdir}/mozilla/plugins # (tpg) desktop entry %{__mkdir_p} %{buildroot}%{_datadir}/applications install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop # (tpg) icons %{__cp} %{buildroot}%{mozillalibdir}/chrome/icons/default/default16.png %{buildroot}/%{mozillalibdir}/icons/ for i in 16 32 48 ; do %{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps ln -sf %{mozillalibdir}/chrome/icons/default/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/firefox.png ; done # exclusions rm -f %{buildroot}%{mozillalibdir}/README.txt rm -f %{buildroot}%{mozillalibdir}/removed-files rm -f %{buildroot}%{mozillalibdir}/precomplete install -D -m644 browser/app/profile/prefs.js %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js cat << EOF >> %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js user_pref("browser.EULA.override", true); user_pref("browser.shell.checkDefaultBrowser", false); user_pref("browser.startup.homepage", "file:///usr/share/indexhtml/index.html"); user_pref("browser.ctrlTab.previews", true); user_pref("browser.tabs.insertRelatedAfterCurrent", false); user_pref("app.update.auto", false); user_pref("app.update.enabled", false); user_pref("app.update.autoInstallEnabled", false); user_pref("security.ssl.require_safe_negotiation", false); user_pref("browser.startup.homepage","file:///usr/share/indexhtml/index.html"); EOF # (ahmad) these ones belonged in prefs.js (see above), remove them until it's # decided what search engines to ship by default #user_pref("browser.search.selectedEngine","Ask.com"); #user_pref("browser.search.order.1","Ask.com"); #user_pref("browser.search.order.2","Exalead"); #user_pref("browser.search.order.3","Google"); #user_pref("browser.search.order.4","Yahoo"); # (ahmad) don't install these until it's decided what search engines to ship by # default # search engines #cp -f %{SOURCE5} %{buildroot}%{mozillalibdir}/searchplugins/jamendo.xml #cp -f %{SOURCE6} %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml #cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml #sed -i 's/@DISTRO_VALUE@/ffx/' %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml #sed -i 's/@DISTRO_VALUE@//' %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml # Use the system myspell dictionaries rm -fr %{buildroot}%{mozillalibdir}/dictionaries ln -s %{_datadir}/dict/mozilla %{buildroot}%{mozillalibdir}/dictionaries %find_lang %{name} mkdir -p %{buildroot}%{_sys_macros_dir} cat <%{buildroot}%{_sys_macros_dir}/%{name}.macros # Macros from %{name} package %%firefox_major %{major} %%firefox_epoch %{ff_epoch} %%firefox_version %{realver}%{?prel:-0.%prel} %%firefox_mozillapath %{mozillalibdir} %%firefox_pluginsdir %{pluginsdir} %%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} %%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi) FIN %pre if [ -d %{mozillalibdir}/dictionaries ]; then rm -fr %{mozillalibdir}/dictionaries fi %post if [ ! -r /etc/sysconfig/oem ]; then case `grep META_CLASS /etc/sysconfig/system` in *powerpack) bookmark="mozilla-powerpack.html" ;; *desktop) bookmark="mozilla-one.html";; *) bookmark="mozilla-download.html";; esac ln -s -f ../../../../share/mdk/bookmarks/mozilla/$bookmark %{mozillalibdir}/defaults/profile/bookmarks.html fi %files -f %{name}.lang %{_bindir}/%{name} %{_bindir}/mozilla-firefox %{_iconsdir}/hicolor/*/apps/*.png %{_datadir}/applications/*.desktop %{_libdir}/%{name}-%{realver}* %dir %{_libdir}/mozilla %dir %{pluginsdir} %files devel %{_sys_macros_dir}/%{name}.macros