diff -r 4b7dcb9dae36 -r 8b7deb51c631 MozillaFirefox-branding-openSUSE.spec --- a/MozillaFirefox-branding-openSUSE.spec Mon Jul 20 11:18:22 2015 +0200 +++ b/MozillaFirefox-branding-openSUSE.spec Mon Oct 19 12:00:09 2015 +0200 @@ -1,7 +1,7 @@ # # spec file for package MozillaFirefox-branding-openSUSE # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2008-2013 Wolfgang Rosenauer # # All modifications and additions to the file contributed by third parties @@ -45,19 +45,32 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %define progdir %{_libdir}/firefox %define libgssapi libgssapi_krb5.so.2 +%if %suse_version == 1315 +# Leap 42 +%define suseversion 42.1 +%define distname openSUSE Leap +%else +# openSUSE <= 13.2 & Tumbleweed? %define suseversion %(echo -e "scale=1\\n%{suse_version}/100" | bc 2>/dev/null) -# HINT: default homepage is a property now included in susefox +%define distname openSUSE +%endif +%define homepage https://www.opensuse.org/searchPage/ +%define susefox 0 %description This package provides openSUSE Look and Feel for Firefox. %prep cp -a %{SOURCE6} COPYING +%if %susefox %setup -n susefox -q mv COPYING COPYING.susefox +%endif %build +%if %susefox ./build.sh +%endif %install install -d $RPM_BUILD_ROOT%{progdir} @@ -75,7 +88,9 @@ install -m0644 %{SOURCE7} $RPM_BUILD_ROOT%{progdir}/defaults/pref/ # distribution.ini install -d $RPM_BUILD_ROOT%{progdir}/distribution -sed -e 's,%VERSION%,%{suseversion},g' \ +sed -e 's,%VERSION%,%{suseversion},g +s,%HOMEPAGE%,%{homepage},g +s,%DIST%,%{distname},g' \ %{SOURCE5} > distribution.ini install -m 0644 distribution.ini $RPM_BUILD_ROOT%{progdir}/distribution/ # search plugins @@ -83,20 +98,25 @@ sed -e 's,%VERSION%,%{suseversion},g' \ %{SOURCE1} > $RPM_BUILD_ROOT%{progdir}/distribution/searchplugins/common/opensuse-software.xml cp %{SOURCE8} $RPM_BUILD_ROOT%{progdir}/distribution/searchplugins/common/ +%if %susefox # install the system extension mkdir susefox\@opensuse.org (cd susefox\@opensuse.org; unzip ../susefox.xpi) mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ cp -r susefox\@opensuse.org \ $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ +%endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) +%if %susefox %doc COPYING.susefox %doc ../COPYING +%{_datadir}/mozilla +%endif %dir %{progdir} %dir %{progdir}/defaults/ %dir %{progdir}/defaults/pref @@ -108,6 +128,5 @@ %{progdir}/browser/defaults/preferences/firefox-openSUSE.js %{progdir}/browser/defaults/profile/bookmarks.html %{progdir}/distribution -%{_datadir}/mozilla %changelog