File desktop-data-SLED.spec of Package desktop-data-SLED

#
# spec file for package desktop-data-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/
#



Name:           desktop-data-SLED
Summary:        SLED Theme Files for KDE and GNOME
BuildRequires:  hicolor-icon-theme perl-RPC-XML update-desktop-files xdg-menu xdg-utils
BuildRequires:  fdupes
Version:        11
Release:        29
License:        GPL v2 or later
Group:          System/GUI/Other
Conflicts:      desktop-data-openSUSE desktop-data-openSUSE-extra
# SLES8
Obsoletes:      susewm <= 3.6.0
Provides:       susewm = 3.6.0
# SLES9
Obsoletes:      desktop-data-SLES <= 9
Provides:       desktop-data-SLES = 9
# SLED10
Obsoletes:      desktop-data-NLD <= 10.1
Provides:       desktop-data-NLD = 10.1
Provides:       desktop-data = %{version}
PreReq:         coreutils
PreReq:         %fillup_prereq
# BRANDING STUFF
Supplements:    branding-SLED
Provides:       desktop-branding = %{version}
# some soft Requires: Crystalcursors
Requires:       hicolor-icon-theme
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         desktop-data.tar.bz2
Source1:        %name.fillup
Source2:        COPYING
Source3:        update_rpm
BuildArch:      noarch

%description
This package contains the SUSE Linux Enterprise menu structure files
for KDE and GNOME.

%prep

%build

%install
mkdir -p $RPM_BUILD_ROOT/
tar -xjf %{SOURCE0} -C $RPM_BUILD_ROOT/ --no-same-owner --exclude=CVS --exclude=.cvsignore
mv $RPM_BUILD_ROOT/desktop-data/* $RPM_BUILD_ROOT/
rmdir $RPM_BUILD_ROOT/desktop-data
install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT/usr/share/doc/packages/desktop-data-SLED/COPYING
for i in $RPM_BUILD_ROOT/usr/share/desktop-directories/*.directory $RPM_BUILD_ROOT/usr/share/wallpapers/*.desktop
do
 if ! grep -q ^NoDisplay=true "$i" && ! grep -qi ^Hidden=true "$i" ; then
   %suse_update_desktop_file "$i"
 fi
done
#
# define default mouse cursor
#
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates/
install -m 0644 %SOURCE1 \
  $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.windowmanager-%name
#
# is it a valid menu ?
#
export XDG_DATA_DIRS=$RPM_BUILD_ROOT/usr/share/
export XDG_CONFIG_DIRS=$RPM_BUILD_ROOT/etc/xdg/
xdg_menu --die-on-error --format readable
#
# make call-browser executable, symlink
mkdir -p $RPM_BUILD_ROOT/usr/bin
ln -snf xdg-open $RPM_BUILD_ROOT/usr/bin/call-browser
ln -snf xdg-open $RPM_BUILD_ROOT/usr/bin/desktop-launch
#
# save some space, use fdupes
%fdupes -s $RPM_BUILD_ROOT/

%post
%{fillup_only -an windowmanager}
# clean up old susewm menus
/bin/rm -rf etc/opt/kde3/share/applnk/{Settings,SuSE,work}

%files
%defattr(-,root,root)
/usr/share/doc/packages/desktop-data-SLED
%dir /etc/xdg/menus
%config(noreplace) /etc/xdg/menus/*.menu
/usr/share/pixmaps/*
/usr/share/desktop-*
/usr/share/icons/DMZ-AA
/usr/share/icons/DMZ
/usr/share/icons/hicolor/*/*/*
/usr/share/icons/default
/usr/share/wallpapers
/etc/profile.d/desktop-data.*
/var/adm/fillup-templates/sysconfig.windowmanager-%name
/usr/bin/call-browser
/usr/bin/desktop-launch

%changelog
openSUSE Build Service is sponsored by