Sophie

Sophie

distrib > Mandriva > cs4.0 > i586 > by-pkgid > b3a1c02c94547d994ae9e5b92f36ff6a > files > 2

mandriva-theme-1.0.12.1-10mlcs4.src.rpm

# Edit in soft/theme CVS module
%define name mandriva-theme
%define theme Mandriva
%define version 1.0.12.1
%define release %mkrel 10
%define scriptdir %{_datadir}/bootsplash/scripts/
%define mdk_bg %{_datadir}/mdk/backgrounds/

Summary: The default Mandriva Linux theme for bootsplash and desktop background
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.bz2
Source1: my-background.xsetup
License: GPL
Group: System/Configuration/Theme
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{_prefix}
Prereq: bootsplash >= 3.1.10
BuildArch: noarch
Buildrequires: lilo
Requires: mandriva-theme-screensaver
Requires: xli
Conflicts: kdebase-common <= 1:3.4.2-29mdk
Conflicts: kdebase-konsole <= 1:3.4.2-37mdk
Obsoletes: mandrake_theme mandrake-theme mandrakelinux-theme
Provides: mandrake_theme
Provides: mandrake_theme
Provides: mandrakelinux-theme
Provides: mandriva_theme
Provides: mandriva_theme
Provides: mandrivalinux-theme

%description

This package contains the default bootsplash theme with its images and
configuration for different resolution as well as the lilo image and
the desktop background image.

%package screensaver
Summary: Mandriva default screensaver
Group: System/Configuration/Theme

%description screensaver
This package contains the screensaver associated with the Mandriva Linux default 
theme.

%prep
%setup -q

%install
rm -rf %{buildroot}

# the syslinux is not needed for the mandriva-theme package, but
# oftenly the installation syslinux image have to be done with
# the bootsplash theme.
#for i in Mandriva-Corporate ; do
#lilo-bmp2mdk file:$i/lilo/syslinux.bmp > $i/lilo/syslinux
#lilo-bmp2mdk file:$i/lilo/lilo.bmp > $i/lilo/message
#done

mkdir -p %{buildroot}/%_sysconfdir/X11/xsetup.d
cp %SOURCE1 %{buildroot}/%_sysconfdir/X11/xsetup.d

make THEMES="Mandriva-Corporate" install prefix=%{buildroot}

%post
if [ -z "$DURING_INSTALL" ]; then
  if [ -x %scriptdir/switch-themes ]; then 
    %scriptdir/switch-themes Mandriva-Corporate
  fi
else
  if [ -f %_sysconfdir/sysconfig/bootsplash ]; then
    perl -pi -e 's/^\s*SPLASH=.*/SPLASH=auto/; s/^\s*THEME=.*/THEME=Mandriva-Corporate/' %_sysconfdir/sysconfig/bootsplash
  fi
  ln -s Mandriva-Corporate %_sysconfdir/bootsplash/themes/current
fi
if [ ! -f %mdk_bg/default.png -o -L %mdk_bg/default.png ]; then 
  rm -f %mdk_bg/default.png
  ln -s Mandriva-Corporate-1600x1200.png %mdk_bg/default.png 
fi
if [ ! -f %mdk_bg/Mandriva.png -o -L %mdk_bg/Mandriva.png ]; then 
  rm -f %mdk_bg/Mandriva.png
  ln -s Mandriva-Corporate-1600x1200.png %mdk_bg/Mandriva.png 
fi
if [ -f %mdk_bg/Mandriva-root.png -a ! -f %mdk_bg/root/default.png -o -L %mdk_bg/root/default.png ]; then 
  rm -f %mdk_bg/root/default.png
  ln -s Mandriva-Corporate-root-1600x1200.png %mdk_bg/root/default.png 
fi

%preun
if [ "$1" == "0" ]; then
if [ -x %scriptdir/remove-theme ]; then 
  %scriptdir/remove-theme Mandriva-Corporate
fi 
  link=`readlink %mdk_bg/default.png`
  slink=${link:0:12}
  if [ "$slink" == "Mandriva-Corporate" ]; then rm -f %mdk_bg/default.png;fi
  link=`readlink %mdk_bg/Mandriva.png`
  slink=${link:0:12}
  if [ "$slink" == "Mandriva-Corporate" ]; then rm -f %mdk_bg/Mandriva.png;fi
  link=`readlink %mdk_bg/root/Mandriva.png`
  slink=${link:0:17}
  if [ "$slink" == "Mandriva-Corporate-root" ]; then rm -f %mdk_bg/root/default.png;fi
  link=`readlink %_sysconfdir/bootsplash/themes/current`
  if [ "$link" == "Mandriva-Corporate" ]; then rm -f %_sysconfdir/bootsplash/themes/current;fi
fi

%clean
rm -rf %{buildroot}

%files 
%defattr(-,root,root)
%_datadir/bootsplash/themes/Mandriva-Corporate
%config(noreplace) %_sysconfdir/bootsplash/themes/Mandriva-Corporate/*
%mdk_bg/Mandriva-Corporate-*
%_sysconfdir/X11/xsetup.d/my-background.xsetup

%files screensaver
%dir %_datadir/mdk/screensaver
%_datadir/mdk/screensaver/*.png

%changelog
* Mon Sep 11 2006 anne Nicolas <anne.nicolas@mandriva.com> 1.0.12.1-10mlcs4
- fix lilo splash parameters

* Wed Sep 6 2006 anne Nicolas <anne.nicolas@mandriva.com> 1.0.12.1-9mlcs4
- fix lilo splash

* Thu Aug 24 2006 Antoine Ginies <aginies@mandriva.com> 1.0.12.1-8mlcs4
- fix lilo splash