Package galaxy-themes: Specfile

%define _unpackaged_files_terminate_build 1

%def_enable gtk1
%define themename galaxy

Summary: Visual themes from MandrivaLinux
Summary(ru_RU.CP1251): \xd2\xe5\xec\xfb \xee\xf4\xee\xf0\xec\xeb\xe5\xed\xe8\xff \xf0\xe0\xe1\xee\xf7\xe5\xe3\xee \xf1\xf2\xee\xeb\xe0 \xe8\xe7 MandrivaLinux
Name: galaxy-themes
Version: 1.0.4
Release: alt2
License: GPL
Group: Graphical desktop/Other
Url: http://www.mandrivalinux.com/

Packager: Andrey Rahmatullin <wrar@altlinux.ru>

Source0: %themename-%version.tar.bz2
# from Mdk's kdebase-common-3.2-70mdk
Source1: Galaxy.kcsrc
Patch0: %themename-alt-ru.patch
Patch1: %themename-1.0.3-alt-makefile-fixes.patch

BuildPreReq: libqt3-devel libqt3-devel-cxx = %__gcc_version_base
BuildPreReq: kdelibs-devel kdelibs-devel-cxx = %__gcc_version_base

BuildPreReq: gcc-c++ libXext-devel libXt-devel
BuildPreReq: gdk-pixbuf-devel gtk+-devel
BuildPreReq: kdebase-devel libjpeg-devel xml-utils
BuildPreReq: libgtk+2-devel

%description
MandrivaLinux Galaxy themes for KDE & GNOME

%description -l ru_RU.CP1251
\xd2\xe5\xec\xfb \xee\xf4\xee\xf0\xec\xeb\xe5\xed\xe8\xff Galaxy \xe4\xeb\xff KDE \xe8 GNOME

%package -n libgtk-engine-%themename
Summary: MandrivaLinux Galaxy theme engine for Gtk+2
Group: Graphical desktop/GNOME
Obsoletes: gtk-engines-%themename

%description -n libgtk-engine-%themename
GTK2 theme engine from MandrivaLinux

%package -n gtk2-theme-%themename
Summary: Galaxy theme for GTK2 (from Mandriva)
Summary(ru_RU.CP1251): \xd2\xe5\xec\xe0 Galaxy \xe4\xeb\xff GTK2 (\xe8\xe7 Mandriva)
Group: Graphical desktop/GNOME
Requires: libgtk-engine-%themename
Obsoletes: gtk2-themes-%themename
Provides: gtk2-themes-%themename = %name-%version

%description -n gtk2-theme-%themename
GTK2 theme from MandrivaLinux

%description -n gtk2-theme-%themename -l ru_RU.CP1251
\xd2\xe5\xec\xe0 \xe4\xeb\xff GTK2 \xe8\xe7 MandrivaLinux


%if_enabled gtk1
%package -n gtk1-theme-%themename
Summary: Galaxy theme for GTK1 (from Mandriva)
Summary(ru_RU.CP1251): \xd2\xe5\xec\xe0 Galaxy \xe4\xeb\xff GTK1 (\xe8\xe7 Mandriva)
Group: Graphical desktop/GNOME
Obsoletes: gtk-engines-%themename
Obsoletes: gtk1-themes-%themename
Provides: gtk1-themes-%themename = %name-%version
#Conflicts: gtk-engines-%themename

%description -n gtk1-theme-%themename
GTK1 theme from MandrivaLinux

%description -n gtk1-theme-%themename -l ru_RU.CP1251
\xd2\xe5\xec\xe0 \xe4\xeb\xff GTK1 \xe8\xe7 MandrivaLinux
%endif


%package -n kde-styles-%themename
Summary: Galaxy style for KDE (from Mandriva)
Summary(ru_RU.CP1251): \xd1\xf2\xe8\xeb\xfc Galaxy \xe4\xeb\xff KDE (\xe8\xe7 Mandriva)
Group: Graphical desktop/KDE

%description -n kde-styles-%themename
KDE style from MandrivaLinux

%description -n kde-styles-%themename -l ru_RU.CP1251
\xd1\xf2\xe8\xeb\xfc KDE \xe8\xe7 MandrivaLinux

%package -n metacity-themes-%themename
Summary: Galaxy themes for Metacity (from Mandriva)
Summary(ru_RU.CP1251): \xd2\xe5\xec\xfb Galaxy \xe4\xeb\xff Metacity (\xe8\xe7 Mandriva)
Group: Graphical desktop/GNOME
Requires: metacity

%description -n metacity-themes-%themename
Metacity themes from MandrivaLinux

%description -n metacity-themes-%themename -l ru_RU.CP1251
\xd2\xe5\xec\xfb \xe4\xeb\xff Metacity \xe8\xe7 MandrivaLinux


%package -n gnome-themes-%themename
Summary: Galaxy themes for GNOME (from Mandriva)
Summary(ru_RU.CP1251): \xd2\xe5\xec\xfb Galaxy (\xc3\xe0\xeb\xe0\xea\xf2\xe8\xea\xe0) \xe4\xeb\xff GNOME (\xe8\xe7 Mandriva)
Group: Graphical desktop/GNOME
Requires: gtk2-theme-%themename
%if_enabled gtk1
Requires: gtk1-theme-%themename
%endif
Requires: metacity-themes-%themename
Conflicts: metacity-themes <= 1.0.1-alt1.1

%description -n gnome-themes-%themename
GNOME theme from MandrivaLinux

%description -n gnome-themes-%themename -l ru_RU.CP1251
\xd2\xe5\xec\xe0 \xe4\xeb\xff GNOME \xe8\xe7 MandrivaLinux


%prep
%setup -q -n %themename-%version
%patch0 -p1
%patch1 -p1
%__autoreconf

%build
%configure \
	--disable-rpath \
	--enable-final
%make_build

%install
%makeinstall

# use same config lib for all galaxy theme
#%%__ln_s %buildroot%_libdir/kde3/kwin_mandrake_config.la %buildroot%_libdir/kde3/kwin_mandrake2_config.la
#%%__ln_s %buildroot%_libdir/kde3/kwin_mandrake_config.so %buildroot%_libdir/kde3/kwin_mandrake2_config.so
#%%__ln_s %buildroot%_libdir/kde3/kwin_mandrake_config.la %buildroot%_libdir/kde3/kwin_mandrake3_config.la
#%%__ln_s %buildroot%_libdir/kde3/kwin_mandrake_config.so %buildroot%_libdir/kde3/kwin_mandrake3_config.so

pushd %buildroot%_libdir/kde3/
%__ln_s kwin_mandrake_config.la kwin_mandrake2_config.la
%__ln_s kwin_mandrake_config.so kwin_mandrake2_config.so
%__ln_s kwin_mandrake_config.la kwin_mandrake3_config.la
%__ln_s kwin_mandrake_config.so kwin_mandrake3_config.so
popd

%__mkdir_p %buildroot%_datadir/apps/kdisplay/color-schemes
%__install -p -m644 %SOURCE1 %buildroot%_datadir/apps/kdisplay/color-schemes/

%files -n libgtk-engine-%themename
%_libdir/gtk-2.0/*/engines/libgalaxy.la
%_libdir/gtk-2.0/*/engines/libgalaxy.so

%files -n gtk2-theme-%themename
%_datadir/themes/Galaxy/gtk-2.0/
%doc AUTHORS ChangeLog

%if_enabled gtk1
%files -n gtk1-theme-%themename
%_libdir/gtk/themes/engines/libgalaxy.la
%_libdir/gtk/themes/engines/libgalaxy.so
%_datadir/themes/Galaxy/gtk
%endif

%files -n metacity-themes-%themename
%_datadir/themes/Galaxy/metacity-1/
%_datadir/themes/Galaxy2/metacity-1/
%_datadir/themes/GalaxyClassic/metacity-1/
%_datadir/themes/GalaxySquared/metacity-1/
%dir %_datadir/themes/Galaxy
%dir %_datadir/themes/Galaxy2
%dir %_datadir/themes/GalaxySquared

%files -n kde-styles-%themename
%_libdir/kde3/kwin3_mandrake.la
%_libdir/kde3/kwin3_mandrake.so
%_libdir/kde3/kwin3_mandrake2.la
%_libdir/kde3/kwin3_mandrake2.so
%_libdir/kde3/kwin3_mandrake3.la
%_libdir/kde3/kwin3_mandrake3.so
%_libdir/kde3/kwin_mandrake_config.la
%_libdir/kde3/kwin_mandrake_config.so
%_libdir/kde3/kwin_mandrake2_config.la
%_libdir/kde3/kwin_mandrake2_config.so
%_libdir/kde3/kwin_mandrake3_config.la
%_libdir/kde3/kwin_mandrake3_config.so
%_libdir/kde3/plugins/styles/galaxy.la
%_libdir/kde3/plugins/styles/galaxy.so
%_datadir/apps/kwin/mandrake.desktop
%_datadir/apps/kwin/mandrake2.desktop
%_datadir/apps/kwin/mandrake3.desktop
%_datadir/apps/kstyle/themes/galaxy.themerc
%_datadir/apps/kdisplay/color-schemes/Galaxy.kcsrc

%files -n gnome-themes-%themename
%_datadir/themes/Galaxy2/index.theme
%_datadir/themes/GalaxyClassic/index.theme
%_datadir/themes/GalaxySquared/index.theme

%changelog
* Sun Nov 12 2006 Andrey Rahmatullin <wrar@altlinux.ru> 1.0.4-alt2
- 1.0.4-3mdv2007.0
- fix packaging witn new Gtk+2
- rename/split packages according to new policy

* Sun Jul 02 2006 Andrey Rahmatullin <wrar@altlinux.ru> 1.0.4-alt1.1
- rebuild with gcc4
- enable _unpackaged_files_terminate_build

* Sun May 28 2006 Andrey Rahmatullin <wrar@altlinux.ru> 1.0.4-alt1
- 1.0.4-1mdk

* Sat May 06 2006 Andrey Rahmatullin <wrar@altlinux.ru> 1.0.3-alt1
- 1.0.3-1mdk

* Sun Sep 04 2005 Andrey Rahmatullin <wrar@altlinux.ru> 1.0.2-alt4
- 1.0.2-17mdk

* Mon Jun 06 2005 Andrey Rahmatullin <wrar@altlinux.ru> 1.0.2-alt3
- 1.0.2-12mdk

* Sun Apr 03 2005 Andrey Rahmatullin <wrar@altlinux.ru> 1.0.2-alt2
- 1.0.2-9mdk

* Mon Oct 04 2004 Andrey Rahmatullin <wrar@altlinux.ru> 1.0.2-alt1
- 1.0.2-6mdk
- add Packager:

* Mon Sep 06 2004 Vyacheslav Dikonov <slava@altlinux.ru> 1.0.1-alt1.2
- GNOME related fixes

* Mon May 10 2004 Andrey Rahmatullin <wrar@altlinux.ru> 1.0.1-alt1.1
- fixed BuildReqs

* Thu May 06 2004 Andrey Rahmatullin <wrar@altlinux.ru> 1.0.1-alt1
- built for ALT
- separate packages for KDE/GTK/Metacity
- Mdk changelog dropped
- ALT-specific specfile changes

* Mon Apr 05 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 1.0.1-1mdk
- Release 1.0.1