Blob Blame History Raw
Name:      nimbus
Version:   0.0.17
Release:   6%{?dist}
Summary:   Desktop theme originally from Sun

Group:      User Interface/Desktops
License:   LGPLv2

URL:      https://nimbus.dev.java.net/
# SHA1 0b984715e0c010ce034a32b7ba69e0582be65362
Source0:   http://dlc.sun.com/osol/jds/downloads/extras/nimbus-%{version}.tar.bz2
Patch0:     nimbus-0.0.17-stock-icons.patch

BuildRoot:   %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:   icon-naming-utils glib2-devel gtk2-devel
BuildRequires:   intltool automake libtool autoconf

%description
Just a virtual package to collect all Nimbus related components.

%package -n nimbus-theme-gnome
Summary: Desktop theme from Sun
Group: User Interface/Desktops
Requires:   gtk-nimbus-engine, nimbus-icon-theme, nimbus-metacity-theme
BuildArch: noarch

%description -n nimbus-theme-gnome
The nimbus Theme Pack for Gnome make use of nimbus Metacity theme, nimbus
gtk2 theme and Icon set. It originates from Opensolaris by Sun.

%package -n gtk-nimbus-engine
Summary: Gtk+ engine for %{name}
Group: User Interface/Desktops
Requires: gtk2-engines

%description -n gtk-nimbus-engine
Gtk+ engine for %{name}.

%package -n nimbus-icon-theme
Summary: Icons for %{name}
Group: User Interface/Desktops
BuildArch: noarch
Requires: fedora-logos

%description -n nimbus-icon-theme
Icons for %{name}.

%package -n nimbus-metacity-theme
Summary: Metacity theme for %{name}
Group: User Interface/Desktops
BuildArch: noarch
Requires:   metacity

%description -n nimbus-metacity-theme
Theme for metacity as part of %{name}.

%prep
%setup -q -n nimbus-%{version}
%patch0 -p1 -b .stok-icons

echo 'NotificationTheme=nimbus' >> index.theme
TMPFILE=$(mktemp rpmbuild-nimbus-XXXXXX)
iconv -f iso-8859-1 -t utf-8 ChangeLog >$TMPFILE
touch --reference=ChangeLog $TMPFILE
chmod --reference=ChangeLog $TMPFILE
mv $TMPFILE ChangeLog


%build
aclocal --force
libtoolize --copy --force --automake
intltoolize --automake --copy --force
autoconf --force
automake --copy --add-missing
%configure --disable-static
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
#no-la
find $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/ \( -name \*.la -o -name \*.a \) -delete
install -Dp -m 0644 index.theme \
   $RPM_BUILD_ROOT%{_datadir}/themes/nimbus/index.theme
touch $RPM_BUILD_ROOT%{_datadir}/icons/nimbus/icon-theme.cache

# removing OpenSolaris branding use start-here.png from Fedora
find $RPM_BUILD_ROOT%{_datadir}/icons/nimbus/ -name start-here.png \
     |while read FILENAME ; do
            NEWICON=$(echo $FILENAME \
            |sed -e "s!$RPM_BUILD_ROOT.*nimbus\(.*\)\$!\.\./\.\./\.\./Fedora\1!")
			  	ln -sf -v $NEWICON $FILENAME
	  done
	
%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/nimbus &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
	 touch --no-create %{_datadir}/icons/nimbus &>/dev/null
	 gtk-update-icon-cache %{_datadir}/icons/nimbus &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/nimbus &>/dev/null || :

%files -n gtk-nimbus-engine
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING gtk-engine/docs.txt
%{_libdir}/gtk-2.0/*/engines/libnimbus.so
%{_datadir}/themes/nimbus/gtk-2.0/gtkrc
%dir %{_datadir}/themes/nimbus/gtk-2.0/
%dir %{_datadir}/themes/nimbus/

%files -n nimbus-metacity-theme
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING
%{_datadir}/themes/nimbus/metacity-1/
%dir %{_datadir}/themes/nimbus/

%files -n nimbus-icon-theme
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING
%{_datadir}/icons/nimbus/
%ghost %{_datadir}/icons/nimbus/icon-theme.cache

%files -n nimbus-theme-gnome
%defattr(-,root,root,-)
%{_datadir}/themes/nimbus/index.theme

%changelog
* Wed Aug  5 2009 Matěj Cepl <mcepl@redhat.com> - 0.0.17-6
- remove OpenSolaris branding
- add Requires for fedora-logos to nimbus-icon-theme

* Tue Aug  4 2009 Matěj Cepl <mcepl@redhat.com> - 0.0.17-5
- new version of nimbus-0.0.17-stock-icons.patch
- remove another unnecessary %%dir in %%files

* Sat May 16 2009 matej <mcepl@redhat.com> 0.0.17-4
- reogrganization of subpackages
- many changes in %%files

* Mon Apr 20 2009 Matej Cepl <mcepl@redhat.com> 0.0.17-3
- Packaging Review fixes

* Thu Mar 12 2009 Matej Cepl <mcepl@redhat.com> 0.0.17-2
- Fix License tag.

* Mon Mar 02 2009 Matej Cepl <mcepl@redhat.com> 0.0.17-1
- Initial affert to package