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