File MozillaFirefox-branding-SLED.spec of Package MozillaFirefox-branding-SLED

#
# spec file for package MozillaFirefox-branding-SLED (Version 3.0.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

BuildRequires:  MozillaFirefox MozillaFirefox-branding-upstream

Name:           MozillaFirefox-branding-SLED
License:        BSD 3-Clause
Version:        3.0.3
Release:        2
Summary:        SLED branding of MozillaFirefox
Group:          Productivity/Networking/Web/Browsers
Source:         %{name}-COPYING
Source1:        search-addons.tar.bz2
Source2:        bookmarks.html.suse
Source3:        firefox-suse-default-prefs.js
Source4:        firefox.schemas
Provides:       MozillaFirefox-branding = %{version}
Conflicts:      otherproviders(MozillaFirefox-branding)
PreReq:         MozillaFirefox >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' MozillaFirefox)
Supplements:    packageand(MozillaFirefox:branding-SLED)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define default_home_page http://www.novell.com/linux/
%define progdir %{_prefix}/%_lib/firefox
%define libgssapi libgssapi_krb5.so.2
%if %suse_version > 1020
%define gnome_confdir %{_sysconfdir}
%gconf_schemas_prereq
%else
%define gnome_confdir %{_sysconfdir}/opt/gnome
%define gnome_dir     /opt/gnome
%endif

%description
This package provides SLED Look and Feel for MozillaFirefox.



Authors:
--------
    Wolfgang Rosenauer <wr@rosenauer.org>

%prep
cp -a %{SOURCE0} COPYING

%build

%install
install -d $RPM_BUILD_ROOT/%{progdir}
# custom bookmarks
install -d $RPM_BUILD_ROOT/%{progdir}/defaults/profile
install -m0644 %{SOURCE2} $RPM_BUILD_ROOT/%{progdir}/defaults/profile/bookmarks.html
# apply SUSE defaults
install -d $RPM_BUILD_ROOT/%{progdir}/defaults/preferences
sed -e 's,GSSAPI,%{libgssapi},g' \
   %{SOURCE3} > suse-default-prefs
install -m0644 suse-default-prefs $RPM_BUILD_ROOT/%{progdir}/defaults/preferences/firefox-SLED.js
rm suse-default-prefs
# search plugins
install -d $RPM_BUILD_ROOT/%{progdir}/searchplugins
(cd $RPM_BUILD_ROOT%{progdir}/searchplugins ; tar xjf %{SOURCE1})
# 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" \
  %{progdir}/browserconfig.properties > suse-browserconfig.properties
cat << EOF >> suse-browserconfig.properties
startup.homepage_override_url=%{default_home_page}
EOF
install -m0644 suse-browserconfig.properties $RPM_BUILD_ROOT%{progdir}/browserconfig.properties
rm suse-browserconfig.properties
# SCHEMA File
mkdir -p $RPM_BUILD_ROOT%{gnome_confdir}/gconf/schemas
install -m 644 %{SOURCE4} \
               $RPM_BUILD_ROOT/%{gnome_confdir}/gconf/schemas/
%if %suse_version > 1020
%find_gconf_schemas
%endif

%clean
rm -rf $RPM_BUILD_ROOT
%if %suse_version > 1020

%pre -f %{name}.schemas_pre

%preun -f %{name}.schemas_preun
%posttrans -f %{name}.schemas_posttrans
%endif
%if %suse_version <= 1020

%post
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
fi
%endif
%if %suse_version > 1020

%files -f %{name}.schemas_list
%defattr(-,root,root)
%else

%files
%defattr(-,root,root)
%{gnome_confdir}/gconf/schemas/firefox.schemas
%endif
%doc COPYING
%{progdir}/defaults/preferences/firefox-SLED.js
%{progdir}/defaults/profile/bookmarks.html
%{progdir}/browserconfig.properties
%{progdir}/searchplugins/*

%changelog
* Thu Nov 20 2008 maw@suse.de
- Review and approve changes.
* Fri Nov 14 2008 wr@rosenauer.org
- Make sure that the base package is installed before installing
  the branding packages (needed for gconf schema update)
  (bnc#444682)
* Fri Nov 07 2008 maw@suse.de
- Review and approve changes.
* Tue Nov 04 2008 wr@rosenauer.org
- Enable the use of system preferences for the lockdown. (bnc#439844)
- Added the Firefox Gconf schema for system prefs (bnc#441646)
* Wed Oct 22 2008 wr@rosenauer.org
- bumped version to 3.0.3
- removed browser.link.open_external override; we are opening
  everything in a new tab; that also caused UI misbehaviour
  (bnc#430077, bmo#457092)
- Set browser.identity.ssl_domain.display to 1 (bnc#426263)
* Mon Oct 06 2008 sbrabec@suse.cz
- Conflict with other branding providers (FATE#304881).
* Fri Sep 26 2008 vuntz@suse.de
- Add COPYING file (bnc#426320).
* Wed Sep 10 2008 vuntz@suse.de
- New package, branched from MozillaFirefox-branding-openSUSE.
- Add SLED documentation bookmark, and remove openSUSE-related
  stuff. (fate#305003)
openSUSE Build Service is sponsored by