File gconf2-branding-SLED.spec of Package gconf2-branding-openSUSE
#
# spec file for package gconf2-branding-SLED
#
# 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 1
%define build_SLES 0
%if %build_openSUSE
%define branding_name openSUSE
%define desktop_data openSUSE
%define dynamic_file stripes/stripes.xml
%define desktop_data_ver 11.4
%define wallpaper_file openSUSE-default.xml
%endif # %%build_openSUSE
%if %build_SLED
%define branding_name SLED
%define desktop_data SLED
%define desktop_data_ver 11
%define dynamic_file nonexisting
%define wallpaper_file SLED110-1600x1200.png
%endif
%if %build_SLES
%define branding_name SLES
%define desktop_data SLED
%define desktop_data_ver 11
%define dynamic_file nonexisting
%define wallpaper_file SLED110-1600x1200.png
%endif
# Do not edit this auto generated file! Edit gconf2-branding.spec.in.
Name: gconf2-branding-SLED
License: BSD3c(or similar)
Group: System/GUI/GNOME
Summary: SLED defaults for the GNOME configuration system
Version: %{desktop_data_ver}
Release: 8.<RELEASE4>
Source: gconf2-branding_spec-prepare.sh
# panel-default-setup.entries from gnome-panel (patched version):
Source2: panel-default-setup.entries
Source3: gconf2-branding-COPYING
%if %build_openSUSE
# Launchers on the desktop
Source10: GnomeOnlineHelp.desktop
Source11: suse-help.svg
%endif
%if %build_openSUSE
# Dynamic wallpapers
Source20: gnome-wallpaper-11.0.2.tar.bz2
Source21: gnome-wallpaper-11.1.tar.bz2
Source22: gnome-wallpaper-11.2.tar.bz2
Source23: gnome-wallpaper-11.3.tar.bz2
Source24: gnome-wallpaper-11.4.tar.bz2
%endif
%if %build_SLED || %build_SLES
# Novell sound theme
Source30: novell-sound-index.theme
Source31: novell-sound-desktop-login.ogg
%endif
Source99: HACKING
# PATCH-FEATURE-OPENSUSE gnome-panel-layout.patch -- panel-default-setup.entries patch for gnome-panel:
Patch0: gnome-panel-layout.patch
# PATCH-FEATURE-OPENSUSE gnome-panel-layout-SLES.patch -- panel-default-setup.entries patch for gnome-panel:
Patch1: gnome-panel-layout-SLES.patch
BuildRequires: desktop-data-%{desktop_data}
BuildRequires: gconf2
%define gconf2_version %(rpm -q --qf '%%{version}-%%{release}' gconf2)
BuildRequires: gnome-panel
%define gnome_panel_version %(rpm -q --qf '%%{version}-%%{release}' gnome-panel)
Provides: gconf2-branding = %{gconf2_version}
Conflicts: otherproviders(gconf2-branding)
Supplements: packageand(gnome-session:branding-SLED)
# For directory ownership of %{_datadir}/backgrounds:
# BuildRequires: gnome-themes
#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.
PreReq: gconf2
# Wallpaper
Requires: desktop-data-%{desktop_data} = %{desktop_data_ver}
# Icon theme
Requires: sonar-icon-theme
# Metacity and gtk+ theme
Requires: gtk2-metatheme-sonar
# Cursor theme
Requires: dmz-icon-theme-cursors
# Window title font
Requires: fifth-leg-font
%if %build_SLED || %build_SLES
# Sound theme
Requires: novell-sound-theme
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
This package provides SLED defaults for configurations based
on GConf database system.
%if %build_openSUSE
%package -n SLED-dynamic-wallpaper
License: BSD3c(or similar)
Summary: Dynamic wallpaper for GNOME, with SLED Look
Group: System/GUI/GNOME
Requires(post): update-alternatives
Requires(postun): update-alternatives
Supplements: packageand(desktop-data-%{desktop_data}:gnome-settings-daemon)
Provides: desktop-data-SLED-extra-gnome = %{version}
Obsoletes: desktop-data-SLED-extra-gnome < %{version}
%description -n SLED-dynamic-wallpaper
This package contains a dynamic wallpaper with SLED look.
A dynamic wallpaper changes depending on the time of the day: it is
generally bright during the day, and dark during the night.
%package -n SLED-dynamic-wallpapers-old
License: BSD3c(or similar)
Summary: Dynamic wallpapers for GNOME, from previous versions of SLED
Group: System/GUI/GNOME
Enhances: SLED-dynamic-wallpaper
%description -n SLED-dynamic-wallpapers-old
This package contains dynamic wallpapers from previous versions of
SLED.
A dynamic wallpaper changes depending on the time of the day: it is
generally bright during the day, and dark during the night.
%endif
%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
%if ! %build_SLES
%package -n gnome-panel-branding-SLED
License: BSD3c(or similar)
Summary: SLED branding of gnome-panel
Group: System/GUI/GNOME
Requires: tomboy
Provides: gnome-panel-branding = %{gnome_panel_version}
Conflicts: otherproviders(gnome-panel-branding)
Supplements: packageand(gnome-panel:branding-SLED)
Supplements: packageand(gnome-panel:gconf2-branding-SLED)
BuildArch: noarch
%description -n gnome-panel-branding-SLED
This package provides SLED Look and Feel for the GNOME
panel.
%endif
%prep
%if %build_openSUSE
%setup -q -T -a20 -a21 -a22 -a23 -a24 -c %{name}-%{version}
%else
%setup -q -T -c %{name}-%{version}
%endif
cp -a %{S:2} .
cp -a %{S:3} COPYING
%patch0
%if %build_SLES
%patch1
%endif
%build
%if %suse_version < 1140
echo "Sorry, the setup to install the default background only works on 11.4 and later when building this package."
false
%endif
%install
# dynamic backgrounds
%if %build_openSUSE
# Here's the setup we use (assuming openSUSE for branding in this example):
# - /usr/share/wallpapers/openSUSE-default.xml is the default background
# - /usr/share/wallpapers/openSUSE-default.xml is a symlink (via
# update-alternatives) to either the background from desktop-data-openSUSE or
# /usr/share/wallpapers/openSUSE-default-dynamic.xml from openSUSE-dynamic-background
# - /usr/share/wallpapers/openSUSE-default-dynamic.xml is a symlink to the
# dynamic background matching the default background of the distribution we
# build against
#
# WARNING WARNING WARNING
# If we ever remove the dynamic background, then the
# SLED-default-dynamic.xml file should still be shipped, as a
# symlink to SLED-default-static.xml.
#
install -d $RPM_BUILD_ROOT%{_datadir}/backgrounds $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties $RPM_BUILD_ROOT%{_datadir}/wallpapers
ln -s %{_datadir}/backgrounds/%{dynamic_file} $RPM_BUILD_ROOT%{_datadir}/wallpapers/SLED-default-dynamic.xml
touch $RPM_BUILD_ROOT%{_datadir}/wallpapers/SLED-default.xml
# install dynamic backgrounds
cp -a grass $RPM_BUILD_ROOT%{_datadir}/backgrounds/
install -m0644 desktop-backgrounds-grass.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-SLED-11.0-extra-gnome.xml
cp -a glass $RPM_BUILD_ROOT%{_datadir}/backgrounds/
install -m0644 desktop-backgrounds-glass.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-SLED-11.1-extra-gnome.xml
cp -a daft $RPM_BUILD_ROOT%{_datadir}/backgrounds/
install -m0644 desktop-backgrounds-daft.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-SLED-11.2-extra-gnome.xml
cp -a gnome-wallpaper-11.3/IK $RPM_BUILD_ROOT%{_datadir}/backgrounds/
install -m0644 gnome-wallpaper-11.3/desktop-backgrounds-IK.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-SLED-11.3-extra-gnome.xml
cp -a stripes $RPM_BUILD_ROOT%{_datadir}/backgrounds/
# Do not install the xml file of current dynamic background for gnome-control-center; instead create one based on the static background
sed "s:SLED-default-static.xml:SLED-default-dynamic.xml:g" %{_datadir}/gnome-background-properties/desktop-data-SLED.xml > $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/SLED-dynamic-wallpaper.xml
###install -m0644 desktop-backgrounds-stripes.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/SLED-11.4-extra-gnome.xml
%endif
#
# 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
%define gconf_load %gconf_call --load
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.vendor
# Set actions list differently from upstream:
# Note: please keep in sync the strings here with the strings added by
# gnome-control-center-shell-common-tasks-i18n.patch in gnome-control-center.
# Else, they won't be translated.
%gconf_set /apps/control-center/cc_actions_list --type=list --list-type=string "[Change Look and Feel;gnome-appearance-properties.desktop,Set Preferred Applications;default-applications.desktop,Configure Printer;system-config-printer.desktop,Configure Network;nm-connection-editor.desktop,Edit Personal Information;gnome-about-me.desktop,Add User;YaST2/users.desktop,Open Administrator Settings;YaST.desktop]"
# Change epiphany homepage:
%if %build_openSUSE
%gconf_set /apps/epiphany/general/homepage --type=string "http://www.opensuse.org/"
%endif
%if %build_SLED || %build_SLES
%gconf_set /apps/epiphany/general/homepage --type=string "http://www.novell.com/linux/11/"
%endif
# Display all workspaces in the gnome-panel window list applet:
# FIXME: This key has no applyto and it cannot work. But it is now the default.
#%gconf_set /schemas/apps/window_list_applet/prefs/display_all_workspaces --type=bool "true"
# 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
# Check if hardware drivers should be installed
%gconf_set /apps/gnome-packagekit/enable_check_hardware --type=bool "true"
# Depends on the gnome-power-manager-notify-idle-sleep.patch in g-p-m
%gconf_set /apps/gnome-power-manager/notify/idle_sleep --type=bool "true"
# Enable Energy Star compliant default configuration
%gconf_set /apps/gnome-power-manager/actions/sleep_type_battery --type=string "suspend"
%gconf_set /apps/gnome-power-manager/timeout/sleep_display_ac --type=int 300
# To complete Energy Star compliant default configuration, you should enable this too:
# (disabled by default because suspending is not working fine in all cases)
#%gconf_set /apps/gnome-power-manager/timeout/sleep_computer_battery --type=int 1200
#%gconf_set /apps/gnome-power-manager/timeout/sleep_computer_ac --type=int 1200
# Use gnome-wm as default window manager:
%gconf_set /desktop/gnome/session/required_components/windowmanager --type=string "gnome-wm"
# The PackageKit gtk+ module is too spammy, fdo#23917
%gconf_set /apps/gnome_settings_daemon/gtk-modules/pk-gtk-module --type=bool "false"
# Define default keybinding of gnome-settings-daemon:
# FIX-OPENSUSE bnc#462640 vuntz@novell.com -- mute button always mute, instead of toggling
%gconf_set /apps/gnome_settings_daemon/toggle_mute --type=bool "FALSE"
# FIX-OPENSUSE gnome-settings-daemon-default-config.patch
%gconf_set /apps/gnome_settings_daemon/keybindings/help --type=string "XF86Help"
# Set keyboard layout global per session instead of per window
# FIX-OPENSUSE bnc#540014 dimstar@opensuse.org -- Global keyboard layout instead of per window.
%gconf_set /desktop/gnome/peripherals/keyboard/general/groupPerWindow --type=bool "false"
# Enable xrandr notification by default bnc#440868 rodrigo@novell.com
%gconf_set /apps/gnome_settings_daemon/xrandr/show_notification_icon --type=bool "TRUE"
# Do not show process 'estimated memory usage' column on startup:
# FIX-UPSTREAM gnome-system-monitor-resident-schema.patch bnc157022 bgo336376 joeshaw@novell.com -- Probably need to really show Resident by default
%gconf_set /apps/procman/proctree/col_15_visible --type=bool "FALSE"
%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"
# Use firefox, not epiphany for all apps handled by gnome-vfs2 and libgnome (keep inactive for ftp). 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"
%gconf_set /desktop/gnome/url-handlers/ftp/command --type=string "firefox %s"
%gconf_set /desktop/gnome/applications/browser/exec --type=string "firefox"
# 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"
# Change default look of GNOME in libgnome:
# Change default background (scriptlets may alter this value):
test -f %{_datadir}/wallpapers/%{wallpaper_file}
# WARNING: Don't forget to change value in scriptlets below:
%gconf_set /desktop/gnome/background/picture_filename --type=string "%{_datadir}/wallpapers/%{wallpaper_file}"
%gconf_set /desktop/gnome/background/picture_options --type=string "stretched"
%gconf_set /desktop/gnome/background/primary_color --type=string "#258c06"
%gconf_set /desktop/gnome/background/secondary_color --type=string "#258c06"
%gconf_set /desktop/gnome/file_views/icon_theme --type=string "Sonar"
%gconf_set /desktop/gnome/interface/accessibility --type=bool "false"
%gconf_set /desktop/gnome/interface/icon_theme --type=string "Sonar"
# WARNING: gtk2-branding-SLED must contain the same, otherwise it
# will change when gnome-settings-daemon starts:
%gconf_set /desktop/gnome/interface/gtk_theme --type=string "Sonar"
# WARNING: make sure this is the default theme that is also used in /var/adm/fillup-templates/sysconfig.windowmanager-desktop-data-openSUSE from desktop-data-openSUSE
%gconf_set /desktop/gnome/peripherals/mouse/cursor_theme --type=string "DMZ"
# Enable sound events by default in libgnome:
%gconf_set /desktop/gnome/sound/enable_esd --type=bool "false"
%gconf_set /desktop/gnome/sound/event_sounds --type=bool "true"
%if %build_SLED || %build_SLES
%gconf_set /desktop/gnome/sound/theme_name --type=string "novell"
%endif
# 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
# 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"
# Never preview sounds when mousing over an icon:
%gconf_set /apps/nautilus/preferences/preview_sound --type=string "never"
# Computer icon invisible on desktop:
%gconf_set /apps/nautilus/desktop/computer_icon_visible --type=bool "false"
# Change notification-daemon theme used when displaying notifications:
%gconf_set /apps/notification-daemon/popup_location --type=string "bottom_right"
%gconf_set /apps/notification-daemon/theme --type=string "slider"
#
# And generate default GNOME panel layout:
export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
%gconf_load panel-default-setup.entries
#
# 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
%if %build_openSUSE
%post -n SLED-dynamic-wallpaper
update-alternatives --install %{_datadir}/wallpapers/SLED-default.xml SLED-default.xml %{_datadir}/wallpapers/SLED-default-dynamic.xml 10
%postun -n SLED-dynamic-wallpaper
# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed
if [ ! -f %{_datadir}/wallpapers/SLED-default-dynamic.xml ]; then
update-alternatives --remove SLED-default.xml %{_datadir}/wallpapers/SLED-default-dynamic.xml
fi
%endif # %%build_openSUSE
%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_openSUSE
%files -n SLED-dynamic-wallpaper
%defattr(-,root,root)
%doc COPYING
# FIXME: Should be owned by a different package:
%dir %{_datadir}/backgrounds
%dir %{_datadir}/gnome-background-properties
%{_datadir}/backgrounds/stripes/
%{_datadir}/gnome-background-properties/SLED-dynamic-wallpaper.xml
%dir %{_datadir}/wallpapers
%ghost %{_datadir}/wallpapers/SLED-default.xml
%{_datadir}/wallpapers/SLED-default-dynamic.xml
%files -n SLED-dynamic-wallpapers-old
%defattr(-,root,root)
%doc COPYING
%{_datadir}/backgrounds/grass/
%{_datadir}/gnome-background-properties/desktop-data-SLED-11.0-extra-gnome.xml
%{_datadir}/backgrounds/glass/
%{_datadir}/gnome-background-properties/desktop-data-SLED-11.1-extra-gnome.xml
%{_datadir}/backgrounds/daft/
%{_datadir}/gnome-background-properties/desktop-data-SLED-11.2-extra-gnome.xml
%{_datadir}/backgrounds/IK/
%{_datadir}/gnome-background-properties/desktop-data-SLED-11.3-extra-gnome.xml
# FIXME: Should be owned by a different package:
%dir %{_datadir}/backgrounds
%dir %{_datadir}/gnome-background-properties
%endif
%if %build_SLED || %build_SLES
%files -n novell-sound-theme
%defattr(-,root,root)
%doc COPYING
%{_datadir}/sounds/novell/
%endif
%if ! %build_SLES
%files -n gnome-panel-branding-SLED
%defattr(-,root,root)
%doc COPYING
%endif
%changelog