%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}

Summary:        Theme engines for GTK+ 2.x
Summary(ja):    GTK+ 2.x 用テーマエンジン
Name:           gtk2-engines
Version:        2.20.1
Release:	1%{?_dist_release}
License:        GPL
Group:          System Environment/Libraries
Source:		ftp://ftp.gnome.org/pub/gnome/sources/gtk-engines/2.18/gtk-engines-%{version}.tar.bz2

Requires:       gtk2 >= 2.20.0
BuildRequires:  gtk2-devel >= 2.20.0
Conflicts:	gnome-themes < 2.8.2-0vl1
Conflicts:	gnome-themes-extras < 0.8-0vl2

URL:            http://www.gnome.org/

BuildRoot:      %{_tmppath}/%{name}-%{version}-root

%description
The gtk2-engines package contains shared objects and configuration
files that implement a number of GTK+ theme engines. Theme engines
provide different looks for GTK+, some of which resemble other
toolkits or operating systems. This package is for GTK+ 2.0, 
the gtk+-engines package is for GTK+ 1.2.

# compat32
%package -n compat32-%{name}
Summary:        Theme engines for GTK+ 2.x
Summary(ja):    GTK+ 2.x 用テーマエンジン
Group:          System Environment/Libraries
Requires:       %{name} = %{version}-%{release}

%description -n compat32-%{name}
The gtk2-engines package contains shared objects and configuration
files that implement a number of GTK+ theme engines. Theme engines
provide different looks for GTK+, some of which resemble other
toolkits or operating systems. This package is for GTK+ 2.0, 
the gtk+-engines package is for GTK+ 1.2.

%prep
%setup -q -n gtk-engines-%{version}

%build

%configure
%__make

%install
rm -rf $RPM_BUILD_ROOT

%makeinstall

# remove backup files that shouldn't be here.  Fix me.
find $RPM_BUILD_ROOT%{_datadir}/themes -name \*~ | xargs rm -rvf

# No, we don't need to package these either
find $RPM_BUILD_ROOT%{_datadir}/themes -type d -name ".xvpics" | xargs rm -rvf

# sanitize permissions
find $RPM_BUILD_ROOT%{_datadir}/themes -type d -exec chmod 755 {} \;
find $RPM_BUILD_ROOT%{_datadir}/themes -type f -name "*.png" -exec chmod 644 {} \;
find $RPM_BUILD_ROOT%{_datadir}/themes -name "gtkrc*" -perm +111 -exec chmod 644 {} \;

# remove unpackaged files
rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/engines/lib*.la

%clean
rm -rf $RPM_BUILD_ROOT

%files 
%defattr(644, root, root, 755)
%doc COPYING README ChangeLog
%attr (755, root, root) %{_libdir}/gtk-2.0/*/engines/*.so
%dir %{_libdir}/gtk-2.0
%dir %{_libdir}/gtk-2.0/*
%dir %{_libdir}/gtk-2.0/*/engines
%{_datadir}/themes/*
%{_datadir}/gtk-engines/*.xml
%{_datadir}/locale
%{_libdir}/pkgconfig/*

# compat32
%if %{build_compat32}
%files -n compat32-%{name}
%defattr(644, root, root, 755)
%attr (755, root, root) %{_libdir}/gtk-2.0/*/engines/*.so
%dir %{_libdir}/gtk-2.0
%dir %{_libdir}/gtk-2.0/*
%dir %{_libdir}/gtk-2.0/*/engines
%{_libdir}/pkgconfig/*
%endif

%changelog
* Sat May 01 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 2.20.1-1
- new upstream release

* Wed Mar 31 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 2.20.0-1
- new upstream release

* Fri Oct  9 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.18.4-1
- new upstream release

* Sun Jun 28 2009 NAKAMURA Kenta <kenta@vinelinux.org> 2.18.2-2
- added compat32 package for x86_64 arch support.

* Thu May 28 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.2-1
- new upstream release

* Sat Apr 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.1-1
- new upstream release

* Thu Mar 19 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.0-1
- new upstream release

* Wed Oct 28 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.16.1-1
- new upstream release

* Thu Sep 25 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.16.0-1
- new upstream release

* Fri Sep 05 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.15.4-1
- new upstream release

* Fri May 30 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.2-1
- new upstream release

* Sat Mar 22 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.0-1vl5
- new upstream release

* Sat Nov 17 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.12.2-0vl1
- new upstream release
- build with gtk+-2.12

* Tue Apr 24 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.1-0vl1
- new upstream release
- build with gtk+-2.10

* Tue Mar 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.4-0vl1
- new upstream release

* Tue Jan 10 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.2-0vl1
- new upstream release

* Sat Dec 03 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.0-0vl1
- new upstream release
- use License tag instead of Copyright

* Wed Nov 30 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.6-0vl1
- new upstream release

* Wed Aug 24 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.5-0vl1
- new upstream release

* Thu Apr 13 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.3-0vl1
- new upstream release

* Sun Mar 20 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.2-0vl1
- new upstream version

* Mon Jan 10 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.0-0vl1
- new upstream release
- add Conflicts: gnome-themes < 2.8.2-0vl1, gnome-themes-extras < 0.8-0vl2

* Fri Mar 19 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-0vl5
- rebuild with gtk+-2.4.0

* Sat Feb  2 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-0vl4
- remove all additional engines and move it to gnome-themes.

* Sat Feb  2 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-0vl3
- add missing files.

* Wed Jan 22 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-0vl2
- add gtk-mist-engines

* Sun Jan 19 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-0vl1
- new upstream release

* Wed Jan  8 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.0-0vl2
- fixed to make and install addon engines correctly.
- remove gnuaquase

* Wed Dec 25 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.9.0-0vl1
- build for Vine Linux
- add some theme (gtk-xfce, lighthouseblue, gnuaquase)

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 02 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Thu Apr 25 2002 Havoc Pennington <hp@redhat.com>
- converted to gtk2-engines package

* Mon Apr 15 2002 Alex Larsson <alexl@redhat.com>
- Added Adept-Raleigh theme

* Thu Apr 11 2002 Owen Taylor <otaylor@redhat.com>
- Fix major pixmap leak that occurred with certain theme/app 
  combinations (#59528)

* Wed Mar 13 2002 Owen Taylor <otaylor@redhat.com>
- Add gtk-hicontrast theme
- Un-automake-1.4

* Thu Jan 24 2002 Havoc Pennington <hp@redhat.com>
- remove acinclude.m4 to avoid funky libtool crackrock

* Tue Jan 22 2002 Havoc Pennington <hp@redhat.com>
- automake14

* Thu Aug  9 2001 Owen Taylor <otaylor@redhat.com>
- Install %{_sysconfdir}/skel/.gtkrc as /root/.gtkrc as well, or we 
  don't get Raleigh for our nice config tools

* Sat Jul 21 2001 Owen Taylor <otaylor@redhat.com>
- Add BuildPrereq on imlib-devel (#49478)

* Tue Jul 10 2001 Owen Taylor <otaylor@redhat.com>
- Version 0.11
- Install a %{_sysconfdir}/skel/.gtkrc

* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
- Bump release + rebuild.

* Sat Feb 10 2001 Owen Taylor <otaylor@redhat.com>
- New, slightly improved version of Raleigh

* Sun Feb 04 2001 Owen Taylor <otaylor@redhat.com>
- Require as well as BuildPrereq a sufficiently new GTK+ package.

* Wed Jan 17 2001 Owen Taylor <otaylor@redhat.com>
- remove references to /home/raster from a couple of themes

* Tue Nov 21 2000 Owen Taylor <otaylor@redhat.com>
- Add 'Raleigh' theme

* Fri Aug 11 2000 Jonathan Blandford <jrb@redhat.com>
- Up Epoch and release

* Thu Jul 13 2000 Owen Taylor <otaylor@redhat.com>
- Go back to real gtk-engines-0.10.tar.gz instead of hosed
  cvs snapshot that someone had inserted.

* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Mon Jun 19 2000 Dave Mason <dcm@redhat.com>
- Removed many themes to speed up control center and get rid of ugly themes

* Sat Jun 17 2000 Matt Wilson <msw@redhat.com>
- defattr files 644 and dirs 755, list attr of 755 for libraries explicitly
- use %%makeinstall
- remove spec file stupidism (defining docdir, using own prefix macro, rel, ver, etc)

* Tue May 16 2000 Dave Mason <dcm@redhat.com>
- fixed Tiger, RatsTheme, OldWood, and LCD themes as they had no gtk subdirectory

* Tue Feb 22 2000 Bill Nottingham <notting@redhat.com>
- sanitize various things (permissions, .xv thumbnails)

* Thu Feb 10 2000 Preston Brown <pbrown@redhat.com>
- remove backup files from package

* Tue Jan 25 2000 Owen Taylor <otaylor@redhat.com>
- Update to 0.10 (fixing problem with text in eventboxes
  becoming garbled)

* Wed Sep 15 1999 Elliot Lee <sopwith@redhat.com>
- Misc fixes from DrMike suggestions

* Thu Sep 09 1999 Elliot Lee <sopwith@redhat.com>
- Update to 0.6, etc.

* Wed Apr 14 1999 Michael Fulbright <drmike@redhat.com>
- removed Odo (has issues)

* Fri Apr 9 1999 The Rasterman <raster@redhat.com>
- patched metal theme - fixed handlebox redraw.

* Wed Mar 31 1999 Michael Fulbright <drmike@redhat.com>
- removed some themes that were misbehaving

* Tue Mar 16 1999 Michael Fulbright <drmike@redhat.com>
- removed enlightened themes, seems to be defective

* Thu Mar 11 1999 Michael Fulbright <drmike@redhat.com>
- removed Default theme data, this comes with gtk+ package

* Wed Mar 10 1999 Michael Fulbright <drmike@redhat.com>
- added extra gtk themes

* Thu Mar 04 1999 Michael Fulbright <drmike@redhat.com>
- version 0.5

* Fri Feb 12 1999 Michael Fulbright <drmike@redhat.com>
- version 0.4

* Wed Feb 03 1999 Michael Fulbright <drmike@redhat.com>
- version 0.3

* Mon Dec 18 1998 Michael Fulbright <drmike@redhat.com>
- version 0.2

* Wed Dec 16 1998 Michael Fulbright <drmike@redhat.com>
- rebuild because gtk+ version changed

* Wed Dec 16 1998 Michael Fulbright <drmike@redhat.com>
- in preparation for GNOME freeze

* Fri Nov 20 1998 Michael Fulbright <drmike@redhat.com>
- First try at a spec file
