1
0

Accepting request 257650 from home:Vindex17:branches:mozilla:Factory

OBS-URL: https://build.opensuse.org/request/show/257650
OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=404
This commit is contained in:
Wolfgang Rosenauer 2014-10-19 19:40:39 +00:00 committed by Git OBS Bridge
parent 3d4d28e3ed
commit 159486ad08
2 changed files with 100 additions and 95 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Oct 19 12:59:28 UTC 2014 - vindex17@outlook.it
- restore the default "-O2" flag for x86_64 CPUs
- specfile cleanup
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Oct 15 08:05:33 UTC 2014 - wr@rosenauer.org Wed Oct 15 08:05:33 UTC 2014 - wr@rosenauer.org

View File

@ -20,9 +20,37 @@
%define major 33 %define major 33
%define mainver %major.0 %define mainver %major.0
%define update_channel release %define update_channel release
%define releasedate 2014101000
%if %suse_version > 1210 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
%if %suse_version > 1310 %define _use_internal_dependency_generator 0
%define __find_requires sh %{SOURCE4}
%global provfind sh -c "grep -v '.so' | %__find_provides"
%global __find_provides %provfind
%define progname firefox
%define progdir %{_prefix}/%_lib/%{progname}
%define gnome_dir %{_prefix}
%if 0%{?suse_version} > 1130
%define desktop_file_name firefox
%else
%define desktop_file_name %{name}
%endif
### build options
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
# Note: these are for the openSUSE Firefox builds ONLY. For your own distribution,
# please get your own set of keys.
%define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q
%define branding 1
%define localize 1
%ifarch aarch64 ppc ppc64 ppc64le s390 s390x ia64 %arm
%define crashreporter 0
%else
%define crashreporter 1
%endif
### build options end
%if 0%{?suse_version} > 1210
%if 0%{?suse_version} > 1310
%define gstreamer_ver 1.0 %define gstreamer_ver 1.0
%define gstreamer 1 %define gstreamer 1
%else %else
@ -48,7 +76,7 @@ BuildRequires: update-desktop-files
BuildRequires: xorg-x11-libXt-devel BuildRequires: xorg-x11-libXt-devel
BuildRequires: yasm BuildRequires: yasm
BuildRequires: zip BuildRequires: zip
%if %suse_version > 1110 %if 0%{?suse_version} > 1110
BuildRequires: libiw-devel BuildRequires: libiw-devel
BuildRequires: libproxy-devel BuildRequires: libproxy-devel
%else %else
@ -58,7 +86,7 @@ BuildRequires: mozilla-nspr-devel >= 4.10.7
BuildRequires: mozilla-nss-devel >= 3.17.1 BuildRequires: mozilla-nss-devel >= 3.17.1
BuildRequires: nss-shared-helper-devel BuildRequires: nss-shared-helper-devel
BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libpulse)
%if %suse_version > 1210 %if 0%{?suse_version} > 1210
BuildRequires: pkgconfig(gstreamer-%gstreamer_ver) BuildRequires: pkgconfig(gstreamer-%gstreamer_ver)
BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver) BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver)
BuildRequires: pkgconfig(gstreamer-plugins-base-%gstreamer_ver) BuildRequires: pkgconfig(gstreamer-plugins-base-%gstreamer_ver)
@ -74,7 +102,6 @@ Recommends: gstreamer-0_10-plugins-ffmpeg
%endif %endif
Version: %{mainver} Version: %{mainver}
Release: 0 Release: 0
%define releasedate 2014101000
Provides: firefox = %{mainver} Provides: firefox = %{mainver}
Provides: firefox = %{version}-%{release} Provides: firefox = %{version}-%{release}
Provides: web_browser Provides: web_browser
@ -131,35 +158,9 @@ Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
Recommends: libcanberra0 Recommends: libcanberra0
Recommends: libpulse0 Recommends: libpulse0
# libproxy's mozjs pacrunner crashes FF (bnc#759123) # libproxy's mozjs pacrunner crashes FF (bnc#759123)
%if %suse_version < 1220 %if 0%{?suse_version} < 1220
Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7 Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7
%endif %endif
%define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
%define _use_internal_dependency_generator 0
%define __find_requires sh %{SOURCE4}
%global provfind sh -c "grep -v '.so' | %__find_provides"
%global __find_provides %provfind
%define progname firefox
%define progdir %{_prefix}/%_lib/%{progname}
%define gnome_dir %{_prefix}
%if %suse_version > 1130
%define desktop_file_name firefox
%else
%define desktop_file_name %{name}
%endif
### build options
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
# Note: these are for the openSUSE Firefox builds ONLY. For your own distribution,
# please get your own set of keys.
%define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q
%define branding 1
%define localize 1
%ifarch aarch64 ppc ppc64 ppc64le s390 s390x ia64 %arm
%define crashreporter 0
%else
%define crashreporter 1
%endif
### build options end
%description %description
Mozilla Firefox is a standalone web browser, designed for standards Mozilla Firefox is a standalone web browser, designed for standards
@ -248,14 +249,14 @@ cd $RPM_BUILD_DIR/mozilla
%patch7 -p1 %patch7 -p1
%patch8 -p1 %patch8 -p1
%patch9 -p1 %patch9 -p1
%if %suse_version < 1120 %if 0%{?suse_version} < 1120
%patch10 -p1 %patch10 -p1
%endif %endif
%patch11 -p1 %patch11 -p1
%patch12 -p1 %patch12 -p1
# Firefox # Firefox
%patch101 -p1 %patch101 -p1
%if %suse_version >= 1140 %if 0%{?suse_version} >= 1140
%patch102 -p1 %patch102 -p1
%endif %endif
%patch103 -p1 %patch103 -p1
@ -284,7 +285,11 @@ export MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1 export BUILD_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1 export MOZ_TELEMETRY_REPORTING=1
export MOZ_GOOGLE_API_KEY=%{_google_api_key} export MOZ_GOOGLE_API_KEY=%{_google_api_key}
%ifarch x86_64
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%else
export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing"
%endif
%ifarch %arm %ifarch %arm
export CFLAGS="${CFLAGS/-g / }" export CFLAGS="${CFLAGS/-g / }"
%endif %endif
@ -307,7 +312,7 @@ ac_add_options --includedir=%{_includedir}
ac_add_options --enable-release ac_add_options --enable-release
ac_add_options --enable-stdcxx-compat ac_add_options --enable-stdcxx-compat
%ifarch %ix86 %ifarch %ix86
%if %suse_version > 1230 %if 0%{?suse_version} > 1230
ac_add_options --disable-optimize ac_add_options --disable-optimize
%endif %endif
%endif %endif
@ -332,17 +337,17 @@ ac_add_options --enable-update-channel=%{update_channel}
%if 0%{?gstreamer} == 1 %if 0%{?gstreamer} == 1
ac_add_options --enable-gstreamer=1.0 ac_add_options --enable-gstreamer=1.0
%endif %endif
%if %suse_version > 1130 %if 0%{?suse_version} > 1130
ac_add_options --disable-gnomevfs ac_add_options --disable-gnomevfs
ac_add_options --enable-gio ac_add_options --enable-gio
%endif %endif
%if %suse_version < 1220 %if 0%{?suse_version} < 1220
ac_add_options --disable-gstreamer ac_add_options --disable-gstreamer
%endif %endif
%if %branding %if %branding
ac_add_options --enable-official-branding ac_add_options --enable-official-branding
%endif %endif
%if %suse_version > 1110 %if 0%{?suse_version} > 1110
ac_add_options --enable-libproxy ac_add_options --enable-libproxy
%endif %endif
%if ! %crashreporter %if ! %crashreporter
@ -375,18 +380,18 @@ make -C browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0
#DEBUG (break the build if searchplugins are missing / temporary) #DEBUG (break the build if searchplugins are missing / temporary)
grep amazondotcom dist/firefox/browser/omni.ja grep amazondotcom dist/firefox/browser/omni.ja
# copy tree into RPM_BUILD_ROOT # copy tree into RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{progdir} mkdir -p %{buildroot}%{progdir}
cp -rf $RPM_BUILD_DIR/obj/dist/firefox/* $RPM_BUILD_ROOT%{progdir} cp -rf $RPM_BUILD_DIR/obj/dist/firefox/* %{buildroot}%{progdir}
mkdir -p $RPM_BUILD_ROOT%{progdir}/distribution/extensions mkdir -p %{buildroot}%{progdir}/distribution/extensions
mkdir -p $RPM_BUILD_ROOT%{progdir}/browser/searchplugins mkdir -p %{buildroot}%{progdir}/browser/searchplugins
mkdir -p $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/ mkdir -p %{buildroot}%{progdir}/browser/defaults/preferences/
# install kde.js # install kde.js
install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/kde.js install -m 644 %{SOURCE6} %{buildroot}%{progdir}/browser/defaults/preferences/kde.js
install -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/firefox.js install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js
# install add-plugins.sh # install add-plugins.sh
sed "s:%%PROGDIR:%{progdir}:g" \ sed "s:%%PROGDIR:%{progdir}:g" \
%{SOURCE13} > $RPM_BUILD_ROOT%{progdir}/add-plugins.sh %{SOURCE13} > %{buildroot}%{progdir}/add-plugins.sh
chmod 755 $RPM_BUILD_ROOT%{progdir}/add-plugins.sh chmod 755 %{buildroot}%{progdir}/add-plugins.sh
# install additional locales # install additional locales
%if %localize %if %localize
rm -f %{_tmppath}/translations.* rm -f %{_tmppath}/translations.*
@ -404,10 +409,10 @@ for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales);
LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \ LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \
make -C browser/locales langpack-$locale make -C browser/locales langpack-$locale
cp -rL dist/xpi-stage/locale-$locale \ cp -rL dist/xpi-stage/locale-$locale \
$RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org
# remove prefs, profile defaults, and hyphenation from langpack # remove prefs, profile defaults, and hyphenation from langpack
rm -rf $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults
rm -rf $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation
# check against the fixed common list and sort into the right filelist # check against the fixed common list and sort into the right filelist
_matched=0 _matched=0
for _match in ar ca cs da de en-GB el es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do for _match in ar ca cs da de en-GB el es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do
@ -420,7 +425,7 @@ for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales);
done done
%endif %endif
# remove some executable permissions # remove some executable permissions
find $RPM_BUILD_ROOT%{progdir} \ find %{buildroot}%{progdir} \
-name "*.js" -o \ -name "*.js" -o \
-name "*.jsm" -o \ -name "*.jsm" -o \
-name "*.rdf" -o \ -name "*.rdf" -o \
@ -430,63 +435,63 @@ find $RPM_BUILD_ROOT%{progdir} \
-name "*.xml" -o \ -name "*.xml" -o \
-name "*.css" | xargs chmod a-x -name "*.css" | xargs chmod a-x
# remove mkdir.done files from installed base # remove mkdir.done files from installed base
find $RPM_BUILD_ROOT%{progdir} -name ".mkdir.done" | xargs rm find %{buildroot}%{progdir} -name ".mkdir.done" | xargs rm
# overwrite the mozilla start-script and link it to /usr/bin # overwrite the mozilla start-script and link it to /usr/bin
mkdir --parents $RPM_BUILD_ROOT/usr/bin mkdir --parents %{buildroot}/usr/bin
sed "s:%%PREFIX:%{_prefix}:g sed "s:%%PREFIX:%{_prefix}:g
s:%%PROGDIR:%{progdir}:g s:%%PROGDIR:%{progdir}:g
s:%%APPNAME:firefox:g s:%%APPNAME:firefox:g
s:%%PROFILE:.mozilla/firefox:g" \ s:%%PROFILE:.mozilla/firefox:g" \
%{SOURCE3} > $RPM_BUILD_ROOT%{progdir}/%{progname}.sh %{SOURCE3} > %{buildroot}%{progdir}/%{progname}.sh
chmod 755 $RPM_BUILD_ROOT%{progdir}/%{progname}.sh chmod 755 %{buildroot}%{progdir}/%{progname}.sh
ln -sf ../..%{progdir}/%{progname}.sh $RPM_BUILD_ROOT%{_bindir}/%{progname} ln -sf ../..%{progdir}/%{progname}.sh %{buildroot}%{_bindir}/%{progname}
# desktop definition # desktop definition
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications mkdir -p %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE1} \ install -m 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_datadir}/applications/%{desktop_file_name}.desktop %{buildroot}%{_datadir}/applications/%{desktop_file_name}.desktop
# additional mime-types # additional mime-types
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime/packages mkdir -p %{buildroot}%{_datadir}/mime/packages
cp %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/mime/packages/%{progname}.xml cp %{SOURCE8} %{buildroot}%{_datadir}/mime/packages/%{progname}.xml
# appdata # appdata
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata mkdir -p %{buildroot}%{_datadir}/appdata
cp %{SOURCE15} $RPM_BUILD_ROOT%{_datadir}/appdata/%{desktop_file_name}.appdata.xml cp %{SOURCE15} %{buildroot}%{_datadir}/appdata/%{desktop_file_name}.appdata.xml
# install man-page # install man-page
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ mkdir -p %{buildroot}%{_mandir}/man1/
cp %{SOURCE11} $RPM_BUILD_ROOT%{_mandir}/man1/%{progname}.1 cp %{SOURCE11} %{buildroot}%{_mandir}/man1/%{progname}.1
########## ##########
# ADDONS # ADDONS
# #
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_appid} mkdir -p %{buildroot}%{_datadir}/mozilla/extensions/%{firefox_appid}
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{firefox_appid} mkdir -p %{buildroot}%{_libdir}/mozilla/extensions/%{firefox_appid}
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/ mkdir -p %{buildroot}/usr/share/pixmaps/
ln -sf %{progdir}/browser/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}.png ln -sf %{progdir}/browser/icons/mozicon128.png %{buildroot}/usr/share/pixmaps/%{progname}.png
ln -sf %{progdir}/browser/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}-gnome.png ln -sf %{progdir}/browser/icons/mozicon128.png %{buildroot}/usr/share/pixmaps/%{progname}-gnome.png
%if %branding %if %branding
for size in 16 22 24 32 48 256; do for size in 16 22 24 32 48 256; do
%else %else
for size in 16 32 48; do for size in 16 32 48; do
%endif %endif
mkdir -p $RPM_BUILD_ROOT%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/ mkdir -p %{buildroot}%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/
ln -sf %{progdir}/browser/chrome/icons/default/default$size.png \ ln -sf %{progdir}/browser/chrome/icons/default/default$size.png \
$RPM_BUILD_ROOT%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/%{progname}.png %{buildroot}%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/%{progname}.png
done done
%suse_update_desktop_file %{desktop_file_name} Network WebBrowser GTK %suse_update_desktop_file %{desktop_file_name} Network WebBrowser GTK
# excludes # excludes
rm -f $RPM_BUILD_ROOT%{progdir}/updater.ini rm -f %{buildroot}%{progdir}/updater.ini
rm -f $RPM_BUILD_ROOT%{progdir}/removed-files rm -f %{buildroot}%{progdir}/removed-files
rm -f $RPM_BUILD_ROOT%{progdir}/README.txt rm -f %{buildroot}%{progdir}/README.txt
rm -f $RPM_BUILD_ROOT%{progdir}/old-homepage-default.properties rm -f %{buildroot}%{progdir}/old-homepage-default.properties
rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh rm -f %{buildroot}%{progdir}/run-mozilla.sh
rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE rm -f %{buildroot}%{progdir}/LICENSE
rm -f $RPM_BUILD_ROOT%{progdir}/precomplete rm -f %{buildroot}%{progdir}/precomplete
rm -f $RPM_BUILD_ROOT%{progdir}/dictionaries/en-US* rm -f %{buildroot}%{progdir}/dictionaries/en-US*
rm -f $RPM_BUILD_ROOT%{progdir}/update-settings.ini rm -f %{buildroot}%{progdir}/update-settings.ini
# devel # devel
mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_bindir}
install -m 755 %SOURCE12 %{buildroot}%{_bindir} install -m 755 %SOURCE12 %{buildroot}%{_bindir}
# inspired by mandriva # inspired by mandriva
mkdir -p %{buildroot}/etc/rpm mkdir -p %{buildroot}%{_sysconfdir}/rpm
cat <<'FIN' >%{buildroot}/etc/rpm/macros.%{progname} cat <<'FIN' >%{buildroot}%{_sysconfdir}/rpm/macros.%{progname}
# Macros from %{name} package # Macros from %{name} package
%%firefox_major %{major} %%firefox_major %{major}
%%firefox_version %{version} %%firefox_version %{version}
@ -509,8 +514,8 @@ FIN
# cp "%%1" "$extdir" \ # cp "%%1" "$extdir" \
# %%{nil} # %%{nil}
# fdupes # fdupes
%fdupes $RPM_BUILD_ROOT%{progdir} %fdupes %{buildroot}%{progdir}
%fdupes $RPM_BUILD_ROOT%{_datadir} %fdupes %{buildroot}%{_datadir}
# create breakpad debugsymbols # create breakpad debugsymbols
%if %crashreporter %if %crashreporter
SYMBOLS_NAME="firefox-%{version}-%{release}.%{_arch}-%{suse_version}-symbols" SYMBOLS_NAME="firefox-%{version}-%{release}.%{_arch}-%{suse_version}-symbols"
@ -519,20 +524,14 @@ make buildsymbols \
SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \ SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \
SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME" SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME"
if [ -e dist/*symbols.zip ]; then if [ -e dist/*symbols.zip ]; then
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/ mkdir -p %{buildroot}%{_datadir}/mozilla/
cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/ cp dist/*symbols.zip %{buildroot}%{_datadir}/mozilla/
fi fi
%endif %endif
%clean
rm -rf $RPM_BUILD_ROOT
%if %localize
rm -rf %{_tmppath}/translations.*
%endif
%post %post
# update mime and desktop database # update mime and desktop database
%if %suse_version > 1130 %if 0%{?suse_version} > 1130
%mime_database_post %mime_database_post
%desktop_database_post %desktop_database_post
%icon_theme_cache_post %icon_theme_cache_post
@ -548,7 +547,7 @@ fi
exit 0 exit 0
%postun %postun
%if %suse_version > 1130 %if 0%{?suse_version} > 1130
%icon_theme_cache_postun %icon_theme_cache_postun
%desktop_database_postun %desktop_database_postun
%mime_database_postun %mime_database_postun
@ -628,7 +627,7 @@ exit 0
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/mozilla-get-app-id %{_bindir}/mozilla-get-app-id
%config /etc/rpm/macros.%{progname} %config %{_sysconfdir}/rpm/macros.%{progname}
%if %localize %if %localize