d814979
# Define Variables that must exist
d814979
%{?!rhel:%define rhel 0}
d814979
%{?!fedora:%define fedora 0}
d814979
c122f8c
Name:           nimbus
c122f8c
Version:        0.1.4
a7962d5
Release:        2%{?dist}
c122f8c
Summary:        Desktop theme originally from Sun
69ef95b
c122f8c
Group:          User Interface/Desktops
c122f8c
License:        LGPLv2
c122f8c
URL:            https://nimbus.dev.java.net/
c122f8c
Source0:        http://dlc.sun.com/osol/jds/downloads/extras/nimbus/nimbus-%{version}.tar.bz2
c122f8c
Patch0:         nimbus-0.1.4-stock-icons.patch
69ef95b
c122f8c
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
37a5ecf
BuildRequires:  icon-naming-utils glib2-devel gtk2-devel gettext intltool
69ef95b
69ef95b
%description
c122f8c
Virtual package to collect all Nimbus related components.
69ef95b
c122f8c
%package -n     nimbus-theme-gnome
c122f8c
Summary:        Desktop theme from Sun
c122f8c
Group:          User Interface/Desktops
c122f8c
Requires:       gtk-nimbus-engine, nimbus-icon-theme, nimbus-metacity-theme
d814979
%if 0%{?fedora} >= 10
c122f8c
BuildArch:      noarch
d814979
%endif
d814979
69ef95b
69ef95b
%description -n nimbus-theme-gnome
c122f8c
The Nimbus theme pack for Gnome make use of Nimbus Metacity theme, Nimbus
c122f8c
GTK2 theme and icon set. It originates from OpenSolaris by Sun.
c122f8c
69ef95b
c122f8c
%package -n     gtk-nimbus-engine
c122f8c
Summary:        Gtk+ engine for %{name}
c122f8c
Group:          User Interface/Desktops
c122f8c
Requires:       gtk2-engines
69ef95b
69ef95b
%description -n gtk-nimbus-engine
c122f8c
GTK+ engine for %{name}.
69ef95b
c122f8c
c122f8c
%package -n     nimbus-icon-theme
c122f8c
Summary:        Icons for %{name}
c122f8c
Group:          User Interface/Desktops
d814979
%if 0%{?fedora} >= 10
c122f8c
BuildArch:      noarch
d814979
%endif
c122f8c
%if 0%{?fedora}
c122f8c
Requires:       fedora-logos
c122f8c
%endif
c122f8c
%if 0%{?rhel}
c122f8c
Requires:       redhat-artwork
d814979
%endif
69ef95b
69ef95b
%description -n nimbus-icon-theme
69ef95b
Icons for %{name}.
69ef95b
c122f8c
c122f8c
%package -n     nimbus-metacity-theme
c122f8c
Summary:        Metacity theme for %{name}
c122f8c
Group:          User Interface/Desktops
d814979
%if 0%{?fedora} >= 10
c122f8c
BuildArch:      noarch
d814979
%endif
c122f8c
Requires:       metacity
69ef95b
69ef95b
%description -n nimbus-metacity-theme
69ef95b
Theme for metacity as part of %{name}.
69ef95b
c122f8c
69ef95b
%prep
69ef95b
%setup -q -n nimbus-%{version}
c122f8c
%patch0 -p1 -b .stock-icons
69ef95b
c122f8c
# convert to utf-8
c122f8c
iconv --from=ISO-8859-1 --to=UTF-8 ChangeLog > ChangeLog.new && \
c122f8c
touch -r ChangeLog ChangeLog.new && \
c122f8c
mv ChangeLog.new ChangeLog
69ef95b
69ef95b
69ef95b
%build
69ef95b
%configure --disable-static
69ef95b
make %{?_smp_mflags}
69ef95b
69ef95b
%install
69ef95b
rm -rf $RPM_BUILD_ROOT
69ef95b
make install DESTDIR=$RPM_BUILD_ROOT
c122f8c
# remove libtool archives
69ef95b
find $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/ \( -name \*.la -o -name \*.a \) -delete
69ef95b
install -Dp -m 0644 index.theme \
d814979
	 $RPM_BUILD_ROOT%{_datadir}/themes/nimbus/index.theme
69ef95b
touch $RPM_BUILD_ROOT%{_datadir}/icons/nimbus/icon-theme.cache
69ef95b
c122f8c
# installed due to error in Makefile
c122f8c
rm -f $RPM_BUILD_ROOT%{_datadir}/themes/nimbus/dark-index.theme
c122f8c
rm -f $RPM_BUILD_ROOT%{_datadir}/themes/nimbus/light-index.theme
c122f8c
c122f8c
# removing OpenSolaris branding use vendor's start-here.png
d814979
%if 0%{?fedora}
d814979
%define theme_name Fedora
d814979
%else
d814979
%define theme_name Bluecurve
d814979
%endif
d814979
find $RPM_BUILD_ROOT%{_datadir}/icons/nimbus/ -name start-here.png \
d814979
	|while read FILENAME ; do
d814979
		NEWICON=$(echo $FILENAME \
d814979
		|sed -e "s!$RPM_BUILD_ROOT.*nimbus\(.*\)\$!\.\./\.\./\.\./%{theme_name}\1!")
d814979
%if 0%{?rhel}
d814979
		NEWICON=$(echo $NEWICON|sed -e 's/places/mimetypes/')
d814979
%endif
d814979
		ln -sf -v $NEWICON $FILENAME
d814979
	done
69ef95b
	
c122f8c
69ef95b
%clean
69ef95b
rm -rf $RPM_BUILD_ROOT
69ef95b
c122f8c
a7962d5
%post -n nimbus-icon-theme
69ef95b
touch --no-create %{_datadir}/icons/nimbus &>/dev/null || :
69ef95b
c122f8c
a7962d5
%postun -n nimbus-icon-theme
69ef95b
if [ $1 -eq 0 ] ; then
69ef95b
	 touch --no-create %{_datadir}/icons/nimbus &>/dev/null
69ef95b
	 gtk-update-icon-cache %{_datadir}/icons/nimbus &>/dev/null || :
69ef95b
fi
69ef95b
c122f8c
a7962d5
%posttrans -n nimbus-icon-theme
69ef95b
gtk-update-icon-cache %{_datadir}/icons/nimbus &>/dev/null || :
69ef95b
c122f8c
69ef95b
%files -n gtk-nimbus-engine
69ef95b
%defattr(-,root,root,-)
69ef95b
%doc AUTHORS ChangeLog COPYING gtk-engine/docs.txt
69ef95b
%{_libdir}/gtk-2.0/*/engines/libnimbus.so
69ef95b
%dir %{_datadir}/themes/nimbus/
c122f8c
%dir %{_datadir}/themes/nimbus/gtk-2.0/
c122f8c
%{_datadir}/themes/nimbus/gtk-2.0/gtkrc
c122f8c
%dir %{_datadir}/themes/dark-nimbus/
c122f8c
%dir %{_datadir}/themes/dark-nimbus/gtk-2.0/
c122f8c
%{_datadir}/themes/dark-nimbus/gtk-2.0/gtkrc
c122f8c
%dir %{_datadir}/themes/light-nimbus/
c122f8c
%dir %{_datadir}/themes/light-nimbus/gtk-2.0/
c122f8c
%{_datadir}/themes/light-nimbus/gtk-2.0/gtkrc
c122f8c
69ef95b
69ef95b
%files -n nimbus-metacity-theme
69ef95b
%defattr(-,root,root,-)
69ef95b
%doc AUTHORS ChangeLog COPYING
69ef95b
%dir %{_datadir}/themes/nimbus/
c122f8c
%{_datadir}/themes/nimbus/metacity-1/
c122f8c
%dir %{_datadir}/themes/dark-nimbus/
c122f8c
%{_datadir}/themes/dark-nimbus/metacity-1/
c122f8c
%dir %{_datadir}/themes/light-nimbus/
c122f8c
%{_datadir}/themes/light-nimbus/metacity-1/
c122f8c
69ef95b
69ef95b
%files -n nimbus-icon-theme
69ef95b
%defattr(-,root,root,-)
69ef95b
%doc AUTHORS ChangeLog COPYING
c122f8c
%dir %{_datadir}/icons/nimbus/
c122f8c
%{_datadir}/icons/nimbus/*x*
c122f8c
%{_datadir}/icons/nimbus/iconrc
69ef95b
%ghost %{_datadir}/icons/nimbus/icon-theme.cache
69ef95b
c122f8c
69ef95b
%files -n nimbus-theme-gnome
69ef95b
%defattr(-,root,root,-)
69ef95b
%{_datadir}/themes/nimbus/index.theme
c122f8c
%{_datadir}/themes/dark-nimbus/index.theme
c122f8c
%{_datadir}/themes/light-nimbus/index.theme
69ef95b
69ef95b
%changelog
a7962d5
* Sun Nov 22 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.1.4-2
a7962d5
- Fix srciptlets of nimbus-icon-theme
a7962d5
c122f8c
* Sun Nov 22 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.1.4-1
c122f8c
- Update to 0.1.4
c122f8c
c122f8c
* Fri Nov 13 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.0.17-8.1
c122f8c
- Remove reference to non existant notification engine (#537161)
c122f8c
d814979
* Wed Sep  9 2009 Matěj Cepl <mcepl@redhat.com> - 0.0.17-8
d814979
- use %%if and build both on RHEL and Fedora.
69ef95b
69ef95b
* Wed Aug  5 2009 Matěj Cepl <mcepl@redhat.com> - 0.0.17-6
69ef95b
- remove OpenSolaris branding
69ef95b
- add Requires for fedora-logos to nimbus-icon-theme
69ef95b
69ef95b
* Tue Aug  4 2009 Matěj Cepl <mcepl@redhat.com> - 0.0.17-5
69ef95b
- new version of nimbus-0.0.17-stock-icons.patch
69ef95b
- remove another unnecessary %%dir in %%files
69ef95b
69ef95b
* Sat May 16 2009 matej <mcepl@redhat.com> 0.0.17-4
69ef95b
- reogrganization of subpackages
69ef95b
- many changes in %%files
69ef95b
69ef95b
* Mon Apr 20 2009 Matej Cepl <mcepl@redhat.com> 0.0.17-3
69ef95b
- Packaging Review fixes
69ef95b
69ef95b
* Thu Mar 12 2009 Matej Cepl <mcepl@redhat.com> 0.0.17-2
69ef95b
- Fix License tag.
69ef95b
69ef95b
* Mon Mar 02 2009 Matej Cepl <mcepl@redhat.com> 0.0.17-1
69ef95b
- Initial affert to package