Search
j0ke.net Open Build Service
>
Projects
>
mozilla
>
MozillaFirefox
> MozillaFirefox.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File MozillaFirefox.spec of Package MozillaFirefox (Revision 55)
Currently displaying revision
55
,
show latest
# # spec file for package MozillaFirefox (Version 2.0.0.13) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: MozillaFirefox BuildRequires: gcc-c++ libgnomeui-devel libidl-devel mozilla-nss-devel orbit-devel startup-notification-devel unzip update-desktop-files zip %if %suse_version >= 1000 %if %suse_version <= 1010 BuildRequires: dbus-1-devel %else BuildRequires: dbus-1-glib-devel %endif %endif %if %suse_version > 1020 BuildRequires: fdupes %endif # fix broken 9.3 requirements %if %suse_version <= 930 BuildRequires: freetype2-devel popt-devel %endif # fix broken SLES9 requirements %if %suse_version == 910 BuildRequires: pkgconfig libgnomeui %endif License: MPL/GPL/LGPL Provides: web_browser Provides: MozillaFirebird Provides: firefox Obsoletes: MozillaFirebird %if %sles_version == 10 Obsoletes: mozilla %endif Version: 2.0.0.13 Release: 1 Summary: Mozilla Firefox Web Browser Url: http://www.mozilla.org/ Group: Productivity/Networking/Web/Browsers # Creation of firefox and l10n tarballs: # cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r MOZILLA_1_8_BRANCH mozilla/client.mk # cd mozilla # export MOZ_CO_PROJECT=browser # export MOZ_CO_LOCALES=all # make -f client.mk checkout # cd .. # tar cjf l10n.tar.bz2 l10n; tar cjf firefox-2.0-source.tar.bz2 mozilla Source: firefox-%{version}-source.tar.bz2 Source1: MozillaFirefox.desktop Source2: add-plugins.sh.in Source3: mozilla.sh.in Source4: tango-theme.tar.bz2 Source5: search-addons.tar.bz2 Source6: MozillaFirefox.desktop.nld Source7: l10n-%{version}.tar.bz2 Source8: plastikfox-theme.tar.bz2 Source9: bookmarks.html.nld Source10: bookmarks.html.suse Source11: firefox48.png Source16: firefox.1 Source17: firefox-suse-default-prefs.js Source18: firefox.schemas Source19: firefox-mimeinfo.xml Patch1: x11-session.patch Patch2: rpath.patch Patch3: gcc-undefined-ops.patch Patch4: mozilla-gcc4.3-fixes.patch Patch5: abuild.patch # NSPR bmo #270502 Patch6: nspr-prdtoa.patch Patch7: locale.patch # lockdown infrastructure Patch8: firefox-ui-lockdown.patch Patch9: gecko-lockdown.patch Patch10: gconf-backend.patch Patch11: gnome-vfs.patch Patch12: misc.dif Patch13: nss-opt.patch Patch14: credits.patch Patch15: em-356370.patch # bmo #273524 (only for NLD) Patch16: gnome-vfs-default.patch # integration Patch17: firefox-appname.patch Patch18: firefox-no-update.patch Patch19: dbus.patch Patch20: mozilla-path_len.patch # customization Patch22: cjk-postscript-fonts.dif Patch23: startup.patch # bmo #324060 Patch24: cups-paper.patch Patch25: system-extensions.patch Patch27: system-proxies.patch # bmo #331522 Patch32: postscript.patch Patch33: proxy-dev.patch # integration Patch34: skin-selection.patch Patch36: greasemonkey.patch # gconf-backend.patch dbus.patch startup.patch Patch100: configure.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: libstdc++ fileutils textutils /bin/sh gconf2 shared-mime-info desktop-file-utils %if %sles_version == 10 %define default_home_page http://www.novell.com/linux/sle10 %else %define default_home_page http://www.opensuse.org/ %endif %define has_system_nspr 0 %define has_system_nss 0 %define has_system_cairo 0 %if %suse_version > 930 || 0%{opensuse_bs} %define has_system_nspr 1 %endif %if %suse_version > 930 %define has_system_cairo 1 %endif %if %suse_version > 1010 || 0%{opensuse_bs} %define has_system_nss 1 %endif %if %has_system_nspr Requires: mozilla-nspr >= %( echo `rpm -q --queryformat '%{VERSION}' mozilla-nspr`) %endif %if %has_system_nss Requires: mozilla-nss >= %( echo `rpm -q --queryformat '%{VERSION}' mozilla-nss`) %endif %define _unpackaged_files_terminate_build 0 %define releasedate 2008031600 %define progname firefox %if %suse_version < 1010 %define progdir /opt/MozillaFirefox/%_lib %else %define progdir %{_prefix}/%_lib/firefox %endif %if %suse_version > 1020 %define gnome_confdir %{_sysconfdir} %define gnome_dir %{_prefix} %gconf_schemas_prereq %else %define gnome_confdir %{_sysconfdir}/opt/gnome %define gnome_dir /opt/gnome %endif %define nld9 %(if grep -q sles9-sld /.buildenv; then echo 1; else echo 0; fi) %define my_provides /tmp/my-provides %define my_requires /tmp/my-requires %if %suse_version > 920 %define libgssapi libgssapi_krb5.so.2 %else %define libgssapi libgssapi.so.1 %endif # let add-plugins.sh maintain Java %if %suse_version <= 1000 %define JAVA 1 %else %define JAVA 0 %endif ### build options %define milestone 1 %define localize 1 %define broken 0 ### build options end %description Mozilla Firefox, formerly known as Phoenix and Firebird, is a redesign of the Mozilla browser component, similar to Galeon, K-Meleon and Camino, but written using the XUL user interface language and designed to be cross-platform. It is a stand-alone application instead of part of the Mozilla Application Suite. Authors: -------- Mozilla Foundation <drivers@mozilla.org> %package translations Summary: Translations for MozillaFirefox Provides: locale(MozillaFirefox:af;ar;bg;be;ca;cs;da;de;el;en_GB;es_AR;es_ES;eu;fi;fr;fy_NL;ga_IE;gu_IN;he;hu;it;ja;ka;ko;ku;lt;mk;mn;nb_NO;nl;nn_NO;pa_IN;pl;pt_BR;pt_PT;ro;ru;sk;sl;sv_SE;tr;uk;zh_CN;zh_TW) Group: Productivity/Networking/Web/Browsers PreReq: %{name} = %{version} %description translations This package contains several optional languages for the user interface of MozillaFirefox. Authors: -------- Mozilla Foundation <drivers@mozilla.org> %debug_package %prep %setup -q -n mozilla -b 7 -b 4 -b 8 cd $RPM_BUILD_DIR/mozilla %patch1 -p1 %patch2 %patch3 %patch4 %patch5 %patch6 %patch7 # lockdown stuff %patch8 -p1 %patch9 %patch10 %patch11 %patch12 %patch13 %patch14 %patch15 %patch17 %patch18 %patch19 %patch20 -p1 %patch22 %patch23 %patch24 %patch25 %patch27 %if %nld9 %patch16 %endif %patch32 %patch33 -p1 %patch34 %patch36 %patch100 # custom bookmarks %if %nld9 cp -f %{SOURCE9} $RPM_BUILD_DIR/mozilla/browser/locales/en-US/profile/bookmarks.html %else cp -f %{SOURCE10} $RPM_BUILD_DIR/mozilla/browser/locales/en-US/profile/bookmarks.html %endif %build export MOZ_BUILD_DATE=%{releasedate} export MOZILLA_OFFICIAL=1 export BUILD_OFFICIAL=1 export CFLAGS="$RPM_OPT_FLAGS -g -Os -fno-strict-aliasing" %if %suse_version > 1000 export CFLAGS="$CFLAGS -fstack-protector" %endif export CXXFLAGS="$CFLAGS" export RPATH="-Wl,-rpath -Wl,%{progdir}" export MOZCONFIG=$RPM_BUILD_DIR/mozconfig cat << EOF > $MOZCONFIG mk_add_options MOZILLA_OFFICIAL=1 mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} . \$topsrcdir/browser/config/mozconfig 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 --enable-optimize="$CFLAGS" ac_add_options --with-system-jpeg ac_add_options --with-system-png ac_add_options --with-system-mng ac_add_options --with-system-zlib ac_add_options --enable-default-toolkit=gtk2 ac_add_options --enable-gconf ac_add_options --enable-svg ac_add_options --enable-canvas ac_add_options --enable-xft ac_add_options --disable-freetype2 ac_add_options --disable-installer ac_add_options --enable-static ac_add_options --disable-shared ac_add_options --disable-tests ac_add_options --disable-debug EOF %if %is_plus || %suse_version >= 930 cat << EOF >> $MOZCONFIG ac_add_options --enable-pango EOF %endif %if %has_system_nspr cat << EOF >> $MOZCONFIG ac_add_options --with-system-nspr EOF %endif %if %has_system_nss cat << EOF >> $MOZCONFIG ac_add_options --with-system-nss EOF %endif %if %has_system_cairo cat << EOF >> $MOZCONFIG ac_add_options --enable-system-cairo EOF %endif %if %suse_version >= 1000 cat << EOF >> $MOZCONFIG ac_add_options --enable-dbus ac_add_options --enable-extensions="dbus default" EOF %endif %if %suse_version >= 1010 cat << EOF >> $MOZCONFIG ac_add_options --enable-startup-notification EOF %endif %if %milestone cat << EOF >> $MOZCONFIG ac_add_options --enable-official-branding EOF %endif make -f client.mk build %install make -C browser/installer STRIP=/bin/true # copy tree into RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{progdir} cp -rf $RPM_BUILD_DIR/mozilla/dist/firefox/* $RPM_BUILD_ROOT/%{progdir} # install additional locales %if %localize echo %defattr\(-,root,root\) > %{_tmppath}/translations.list for locale in $(awk '{ print $1; }' browser/locales/shipped-locales); do case $locale in ja-JP-mac|en-US) # broken locales, do not work ;; *) make -C browser/locales libs-$locale cp dist/xpi-stage/locale-$locale/chrome/$locale.jar \ $RPM_BUILD_ROOT/%{progdir}/chrome cp dist/xpi-stage/locale-$locale/chrome/$locale.manifest \ $RPM_BUILD_ROOT/%{progdir}/chrome echo %{progdir}/chrome/$locale.jar >> %{_tmppath}/translations.list echo %{progdir}/chrome/$locale.manifest >> %{_tmppath}/translations.list esac done %endif # overwrite the mozilla start-script and link it to /usr/bin mkdir --parents $RPM_BUILD_ROOT/usr/bin sed "s:%%PREFIX:%{_prefix}:g s:%%PROGDIR:%{progdir}:g s:%%APPNAME:%{progname}:g s:%%PROFILE:.mozilla/firefox:g" \ %{SOURCE3} > $RPM_BUILD_ROOT%{progdir}/%{progname}.sh chmod 755 $RPM_BUILD_ROOT%{progdir}/%{progname}.sh ln -sf ../..%{progdir}/%{progname}.sh $RPM_BUILD_ROOT/usr/bin/%{progname} # desktop definition %if %nld9 mkdir -p $RPM_BUILD_ROOT/opt/gnome/share/applications install -m 644 %{SOURCE6} \ $RPM_BUILD_ROOT/opt/gnome/share/applications/%{name}.desktop %else mkdir -p $RPM_BUILD_ROOT/usr/share/applications %if %suse_version < 1010 # no startup notification for 10.0 and older sed "s:StartupNotify=true:StartupNotify=false:g" \ %{SOURCE1} > $RPM_BUILD_ROOT/usr/share/applications/%{name}.desktop %else install -m 644 %{SOURCE1} \ $RPM_BUILD_ROOT/usr/share/applications %endif %endif mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime/packages cp %{SOURCE19} $RPM_BUILD_ROOT%{_datadir}/mime/packages/firefox.xml # SCHEMA File mkdir -p $RPM_BUILD_ROOT%{gnome_confdir}/gconf/schemas install -m 644 %{SOURCE18} \ $RPM_BUILD_ROOT/%{gnome_confdir}/gconf/schemas/ # Themes cp -a $RPM_BUILD_DIR/tango\@novell.com $RPM_BUILD_ROOT%{progdir}/extensions/ %if %broken cp -a $RPM_BUILD_DIR/\{4674e8a2-eb7e-4822-b517-b18328b3e8e8\} $RPM_BUILD_ROOT%{progdir}/extensions/ %endif # install add-plugins.sh sed "s:%%PROGDIR:%{progdir}:g s:%%APPNAME:%{progname}:g s:%%JAVA:%{JAVA}:g" \ %{SOURCE2} > $RPM_BUILD_ROOT%{progdir}/add-plugins.sh chmod 755 $RPM_BUILD_ROOT%{progdir}/add-plugins.sh # install man-page mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ cp %{SOURCE16} $RPM_BUILD_ROOT%{_mandir}/man1/ # apply SUSE defaults sed -e 's,RPM_VERSION,%{version}-%{release},g s,GSSAPI,%{libgssapi},g' \ %{SOURCE17} > suse-default-prefs cp suse-default-prefs $RPM_BUILD_ROOT/%{progdir}/defaults/pref/firefox-novell.js rm suse-default-prefs # use correct locale for useragent cat > $RPM_BUILD_ROOT%{progdir}/defaults/pref/firefox-l10n.js << EOF pref("general.useragent.locale", "chrome://global/locale/intl.properties"); EOF ########## # ADDONS # (cd $RPM_BUILD_ROOT%{progdir}/searchplugins ; tar xjf %{SOURCE5}) # browserconfig.properties sed "s;browser.startup.homepage=.*;browser.startup.homepage=%{default_home_page};g s;browser.startup.homepage_reset=.*;browser.startup.homepage_reset=%{default_home_page};g" \ dist/firefox/browserconfig.properties > $RPM_BUILD_ROOT%{progdir}/browserconfig.properties cat << EOF >> $RPM_BUILD_ROOT%{progdir}/browserconfig.properties startup.homepage_override_url=%{default_home_page} EOF mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/ %if %milestone cp -f other-licenses/branding/firefox/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/firefox.png mkdir -p $RPM_BUILD_ROOT%{gnome_dir}/share/icons/hicolor/48x48/apps/ install -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{gnome_dir}/share/icons/hicolor/48x48/apps/firefox.png ln -sf firefox.png $RPM_BUILD_ROOT/usr/share/pixmaps/firefox-gnome.png %else cp -f $RPM_BUILD_ROOT%{progdir}/icons/mozicon50.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/firefox.xpm %endif %suse_update_desktop_file %{name} Network WebBrowser X-Ximian-Main X-Ximian-Toplevel GTK %if %has_system_nspr && !%has_system_nss # modify provides and requires lists (don't export NSS) cat << EOF > %{my_provides} grep -vE "libnss3.so|libnssckbi.so|libsmime3.so|libsoftokn3.so|libssl3.so" | %{__find_provides} EOF chmod 755 %{my_provides} %define __find_provides %{my_provides} cat << EOF > %{my_requires} grep -vE "libnss3.so|libnssckbi.so|libsmime3.so|libsoftokn3.so|libssl3.so|firefox-bin" | %{__find_requires} EOF chmod 755 %{my_requires} %define __find_requires %{my_requires} %endif %if %suse_version > 1020 %find_gconf_schemas %fdupes $RPM_BUILD_ROOT%{progdir} %fdupes $RPM_BUILD_ROOT%{_datadir} %endif chmod -x $RPM_BUILD_ROOT%{_datadir}/pixmaps/firefox.png %clean rm -rf $RPM_BUILD_ROOT %if %has_system_nspr && !%has_system_nss rm -f %{my_provides} rm -f %{my_requires} %endif %if %suse_version > 1020 %pre -f %{name}.schemas_pre %preun -f %{name}.schemas_preun [ "$1" = "0" ] && rm -f %{progdir}/dictionaries/* exit 0 %else %preun [ "$1" = "0" ] && rm -f %{progdir}/dictionaries/* exit 0 %endif %post if [ -f usr/bin/update-mime-database ] ; then usr/bin/update-mime-database %{_datadir}/mime > /dev/null || : fi %if %suse_version >= 1030 if [ -f usr/bin/update-desktop-database ] ; then usr/bin/update-desktop-database > /dev/null || : fi %else if [ -f opt/gnome/bin/update-mime-database ] ; then opt/gnome/bin/update-mime-database > /dev/null || : fi %endif %if %suse_version >= 1010 # 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 %endif %if %suse_version <= 1020 if [ ! -f /.buildenv ]; then export GCONF_CONFIG_SOURCE=`%{gnome_dir}/bin/gconftool-2 --get-default-source` %{gnome_dir}bin/gconftool-2 --makefile-install-rule %{gnome_confdir}/gconf/schemas/firefox.schemas > /dev/null 2>&1 %if %suse_version <= 1000 # restart gconfd killall -HUP gconfd-2 2>&1 >/dev/null %endif fi %endif %{progdir}/add-plugins.sh > /dev/null 2>&1 exit 0 %postun if [ -f usr/bin/update-mime-database ] ; then usr/bin/update-mime-database %{_datadir}/mime > /dev/null || : fi %if %suse_version >= 1030 if [ -f usr/bin/update-desktop-database ] ; then usr/bin/update-desktop-database > /dev/null || : fi %else if [ -f opt/gnome/bin/update-mime-database ] ; then opt/gnome/bin/update-mime-database > /dev/null || : fi %endif %if %suse_version > 1020 %posttrans -f %{name}.schemas_posttrans %endif %triggerin -- myspell-dictionary %{progdir}/add-plugins.sh > /dev/null 2>&1 exit 0 %triggerpostun -- myspell-dictionary %{progdir}/add-plugins.sh > /dev/null 2>&1 exit 0 %if %suse_version <= 1000 %triggerin -- IBMJava2-JRE, java2-jre, java2, IBMJava2-SDK, BlackdownJava2-JRE, java-1_4_2-sun-plugin, java-1_5_0-sun-plugin %{progdir}/add-plugins.sh > /dev/null 2>&1 exit 0 %triggerpostun -- IBMJava2-JRE, java2-jre, java2, IBMJava2-SDK, BlackdownJava2-JRE, java-1_4_2-sun-plugin, java-1_5_0-sun-plugin if [ -L %{progdir}/plugins/libjavaplugin_oji.so -a ! -f %{progdir}/plugins/libjavaplugin_oji.so ]; then rm -f %{progdir}/plugins/libjavaplugin_oji.so fi %{progdir}/add-plugins.sh > /dev/null 2>&1 exit 0 %endif %if %suse_version > 1020 %files -f %{name}.schemas_list %else %files %endif %defattr(-,root,root) %if %suse_version < 1010 %dir /opt/MozillaFirefox %endif %dir %{progdir} %dir %{progdir}/chrome/ %{progdir}/chrome/browser.* %{progdir}/chrome/classic.* %{progdir}/chrome/comm.* %{progdir}/chrome/en-US.* %{progdir}/chrome/pippki.* %{progdir}/chrome/toolkit.* %{progdir}/chrome/reporter.* %{progdir}/chrome/icons %{progdir}/components/ %{progdir}/greprefs/ %{progdir}/defaults/ %{progdir}/dictionaries/ %{progdir}/extensions/ %{progdir}/icons/ #%{progdir}/init.d/ %dir %{progdir}/plugins %{progdir}/plugins/libnullplugin.so %{progdir}/res/ %{progdir}/searchplugins/ %{progdir}/add-plugins.sh %{progdir}/%{progname}-bin %attr(755,root,root) %{progdir}/%{progname}.sh %{progdir}/browserconfig.properties # NSPR %if ! %has_system_nspr %{progdir}/libnspr4.so %{progdir}/libplc4.so %{progdir}/libplds4.so %endif # NSS %if ! %has_system_nss %{progdir}/libnssckbi.so %{progdir}/libnss3.so %{progdir}/libsmime3.so %{progdir}/libsoftokn3.chk %{progdir}/libsoftokn3.so %{progdir}/libssl3.so %endif # %{progdir}/libmozjs.so %{progdir}/libxpcom.so %{progdir}/libxpcom_core.so %{progdir}/libxpcom_compat.so %{progdir}/libxpistub.so %{progdir}/mozilla-xremote-client %{progdir}/run-mozilla.sh %{progdir}/updater %{progdir}/updater.ini %{progdir}/xpicleanup %exclude %{progdir}/removed-files %exclude %{progdir}/firefox %{progdir}/readme.txt %if %nld9 /opt/gnome/share/applications/%{name}.desktop %else /usr/share/applications/%{name}.desktop %endif %{gnome_confdir}/gconf/schemas/firefox.schemas %{_datadir}/mime/packages/firefox.xml /usr/share/pixmaps/firefox* %if %milestone %{gnome_dir}/share/icons/hicolor/ %endif /usr/bin/%{progname} %doc %{_mandir}/man1/firefox.1.gz %if %localize %files translations -f %{_tmppath}/translations.list %defattr(-,root,root) %endif