File gconf2-branding-SLES.spec of Package gconf2-branding-openSUSE.openSUSE_12.1_Update
#
# spec file for package gconf2-branding-SLES
#
# Copyright (c) 2011 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
%define         build_openSUSE 0
%define         build_SLED 0
%define         build_SLES 1
%if %build_openSUSE
%define         branding_name openSUSE
%define         pkg_version   12.1
%endif # %%build_openSUSE
%if %build_SLED
%define         branding_name SLED
%define         pkg_version   11
%endif
%if %build_SLES
%define         branding_name SLES
%define         pkg_version   11
%endif
# Do not edit this auto generated file! Edit gconf2-branding.spec.in.
Name:           gconf2-branding-SLES
License:        BSD3c(or similar)
Group:          System/GUI/GNOME
Summary:        SLES defaults for the GNOME configuration system
Version:        %{pkg_version}
Release:        1
Url:            http://projects.gnome.org/gconf/
Source:         gconf2-branding_spec-prepare.sh
Source3:        gconf2-branding-COPYING
%if %build_openSUSE
# Launchers on the desktop
Source10:       GnomeOnlineHelp.desktop
Source11:       suse-help.svg
%endif
%if %build_SLED || %build_SLES
# Novell sound theme
Source30:       novell-sound-index.theme
Source31:       novell-sound-desktop-login.ogg
%endif
Source99:       HACKING
BuildRequires:  gconf2
# For directory ownership of %{_datadir}/backgrounds:
# BuildRequires:  gnome-themes
%define gconf2_version %(rpm -q --qf '%%{version}' gconf2)
Requires:       gconf2 = %{gconf2_version}
Provides:       gconf2-branding = %{gconf2_version}
Conflicts:      otherproviders(gconf2-branding)
Supplements:    packageand(gconf2:branding-SLES)
#BRAND: gconf2-branding-openSUSE provides branding Look and Feel using
#BRAND: gconf schemas. All referenced files must be present in this
#BRAND: package or in required packages.
%if %build_SLED || %build_SLES
# Sound theme
Requires:       novell-sound-theme
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%description
This package provides SLES defaults for configurations based
on GConf database system.
%if %build_SLED || %build_SLES
%package -n novell-sound-theme
License:        BSD3c(or similar)
Summary:        Novell Sound Theme
Group:          System/GUI/GNOME
# the sound theme inherits from the freedesktop one
Requires:       sound-theme-freedesktop
%description -n novell-sound-theme
This packages provides the default sound theme by Novell.
%endif
%prep
%setup -q -T -c %{name}-%{version}
cp -a %{S:3} COPYING
%build
%install
#
# sound theme
%if %build_SLED || %build_SLES
install -d $RPM_BUILD_ROOT%{_datadir}/sounds/novell/stereo
install -m0644 %{S:30} $RPM_BUILD_ROOT%{_datadir}/sounds/novell/index.theme
install -m0644 %{S:31} $RPM_BUILD_ROOT%{_datadir}/sounds/novell/stereo/desktop-login.ogg
%endif
#
# http://en.opensuse.org/GNOME/Projects/SchemasChanges
# Only vendor preferences are allowed here.
# Stuff to "Make OpenSUSE working must remain in particular packages!
%define gconf_call gconftool-2 --direct --config-source=xml::$RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.vendor
%define gconf_set %gconf_call --set
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.vendor
# Icon used on gdm greeter
%gconf_set /apps/gdm/simple-greeter/logo_icon_name --type=string "distributor"
# No user list in GDM for SLED/SLES
%if %build_SLED || %build_SLES
%gconf_set /apps/gdm/simple-greeter/disable_user_list --type=bool "true"
%endif
%gconf_set /apps/gnome-terminal/global/use_mnemonics --type=bool "false"
%gconf_set /apps/gnome-terminal/global/use_menu_accelerators --type=bool "false"
# Do not retain PK authorizations by default (bnc#431569) lnussel@suse.de
%gconf_set /desktop/gnome/policykit/auth_dialog_retain_authorization --type=bool "false"
# This is not needed anymore strictly speaking, with the move to x-scheme-handler, but Firefox still checks for those keys and some apps might do the same:
%gconf_set /desktop/gnome/url-handlers/http/command --type=string "firefox %s"
%gconf_set /desktop/gnome/url-handlers/https/command --type=string "firefox %s"
# Use xchat for irc
%gconf_set /desktop/gnome/url-handlers/irc/command --type=string "xchat --existing --url=%s"
%gconf_set /desktop/gnome/url-handlers/irc/enabled --type=bool "true"
# Disable audible bell in metacity:
%gconf_set /apps/metacity/general/audible_bell --type=bool "false"
%if %build_SLED || %build_SLES
# Enable Windows flag keys to show the panel's main menu in SLED:
%gconf_set /apps/metacity/global_keybindings/panel_main_menu_list --type=list --list-type=string "[Super_L,Super_R]"
%endif
# We want to use pulseaudio by default; this makes empathy calls work better
%gconf_set /system/gstreamer/0.10/default/audiosrc --type=string "pulsesrc"
## Disabled since we don't have any other good theme than the upstream one for GNOME 3
# Change default theme in Metacity:
#%%gconf_set /apps/metacity/general/theme --type=string "Sonar"
#%%gconf_set /apps/metacity/general/titlebar_font --type=string "FifthLeg Bold 12"
# Change default theme in GNOME Shell:
#%%gconf_set /desktop/gnome/shell/windows/theme --type=string "Sonar"
#
# Merge is optional, but one larger file is better than many small files:
gconf-merge-tree $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.vendor
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.vendor/*/*
rmdir $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.vendor/* 2>/dev/null || :
# This is deliberately done after the merge. We may want to modify it in scriptlets.
#
# Set up .desktop files to be shown in users' desktops
%gconf_set /apps/nautilus/desktop/predefined_items_dir --type=string /usr/share/dist/desktop-files
install -d $RPM_BUILD_ROOT%{_datadir}/dist/desktop-files
install -d $RPM_BUILD_ROOT%{_datadir}/dist/icons
%if %build_openSUSE
install -m 0644 %{S:10} $RPM_BUILD_ROOT%{_datadir}/dist/desktop-files/
# Compatibility: We cannot move these icons to another location without
# providing an homedir update process:
install -m 0644 %{S:11} $RPM_BUILD_ROOT%{_datadir}/dist/icons/
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc COPYING
%verify(not md5 size mtime) %{_sysconfdir}/gconf/gconf.xml.vendor/*
%dir %{_datadir}/dist
%dir %{_datadir}/dist/desktop-files
%dir %{_datadir}/dist/icons
%if %build_openSUSE
%{_datadir}/dist/desktop-files/*
%{_datadir}/dist/icons/*
%endif
%if %build_SLED || %build_SLES
%files -n novell-sound-theme
%defattr(-,root,root)
%doc COPYING
%{_datadir}/sounds/novell/
%endif
%changelog