LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File MozillaFirefox-branding-openSUSE.spec of Package MozillaFirefox-branding-openSUSE-Education (Project Education)

#
# spec file for package MozillaFirefox-branding-openSUSE (Version 4.0)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2008-2010 Wolfgang Rosenauer
#
# 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 bc gconf2-devel unzip zip

Name:           MozillaFirefox-branding-openSUSE
License:        BSD3c(or similar) ; GPLv2+
Version:        4.0
Release:        2
Summary:        openSUSE branding of MozillaFirefox
Group:          Productivity/Networking/Web/Browsers
Source:         susefox-20101026.tar.bz2
Source1:        search-addons.tar.bz2
Source2:        bookmarks.html.suse
Source3:        firefox-suse-default-prefs.js
Source4:        firefox.schemas
Source5:        distribution.ini.in
Source6:        %{name}-COPYING
Provides:       MozillaFirefox-branding = %{version}
PreReq:         MozillaFirefox >= 3.5
Conflicts:      otherproviders(MozillaFirefox-branding)
Supplements:    packageand(MozillaFirefox:branding-openSUSE)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define default_home_page http://www.opensuse.org/
%define progdir %{_prefix}/%_lib/firefox
%define libgssapi libgssapi_krb5.so.2
%define suseversion %(echo -e "scale=1\\n%{suse_version}/100" | bc 2>/dev/null)
%define gconf_confdir %{_sysconfdir}/gconf
%gconf_schemas_prereq

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


%prep
cp -a %{SOURCE6} COPYING
%setup -n susefox -q
mv COPYING COPYING.susefox

%build
./build.sh

%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-openSUSE.js
rm suse-default-prefs
# distribution.ini
install -d $RPM_BUILD_ROOT%{progdir}/distribution
sed -e 's,%VERSION%,%{suseversion},g' \
   %{SOURCE5} > distribution.ini
install -m 0644 distribution.ini $RPM_BUILD_ROOT%{progdir}/distribution/
# search plugins
install -d $RPM_BUILD_ROOT%{progdir}/searchplugins
(cd $RPM_BUILD_ROOT%{progdir}/searchplugins ; tar xjf %{SOURCE1})
# SCHEMA file
mkdir -p $RPM_BUILD_ROOT%{gconf_confdir}/schemas
install -m 644 %{SOURCE4} \
               $RPM_BUILD_ROOT%{gconf_confdir}/schemas/
%find_gconf_schemas
# browserconfig.properties
cat << EOF >> suse-browserconfig.properties
browser.startup.homepage=%{default_home_page}
browser.startup.homepage_reset=%{default_home_page}
EOF
install -m0644 suse-browserconfig.properties $RPM_BUILD_ROOT%{progdir}/browserconfig.properties
rm suse-browserconfig.properties
# 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}/

%clean
rm -rf $RPM_BUILD_ROOT

%pre -f %{name}.schemas_pre

%preun -f %{name}.schemas_preun

%posttrans -f %{name}.schemas_posttrans

%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc COPYING.susefox
%doc ../COPYING
%{progdir}/defaults/preferences/firefox-openSUSE.js
%{progdir}/defaults/profile/bookmarks.html
%{progdir}/browserconfig.properties
%{progdir}/searchplugins/*
%{progdir}/distribution
%{_datadir}/mozilla

%changelog