[sysprof] Fix missing icon (#558089)

Gianluca Sforna giallu at fedoraproject.org
Fri Jun 24 11:09:34 UTC 2011


commit ad86248dd9ea1c99d252c74e4816f099178e4073
Author: Gianluca Sforna <giallu at gmail.com>
Date:   Fri Jun 24 13:09:15 2011 +0200

    Fix missing icon (#558089)

 sysprof.spec |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/sysprof.spec b/sysprof.spec
index 8d5c21e..961aa78 100644
--- a/sysprof.spec
+++ b/sysprof.spec
@@ -1,6 +1,6 @@
 Name:           sysprof
 Version:        1.1.6
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        A system-wide Linux profiler
 Group:          Development/System
 License:        GPLv2+
@@ -16,6 +16,7 @@ BuildRequires:  binutils-devel
 BuildRequires:  desktop-file-utils
 
 Requires:       kernel => 2.6.31
+Requires:       hicolor-icon-theme
 
 ExclusiveArch:  %{ix86} x86_64
 
@@ -43,6 +44,12 @@ make %{?_smp_mflags}
 rm -rf ${RPM_BUILD_ROOT}
 make install DESTDIR=${RPM_BUILD_ROOT}
 
+for size in 16 24 32 48; do
+    mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/${size}x${size}/apps
+    ln -s %{_datadir}/pixmaps/sysprof-icon-${size}.png \
+        ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/${size}x${size}/apps/sysprof-icon.png
+done
+
 desktop-file-install                                            \
         --dir ${RPM_BUILD_ROOT}%{_datadir}/applications         \
         %{SOURCE1}
@@ -51,6 +58,18 @@ desktop-file-install                                            \
 %clean
 rm -rf ${RPM_BUILD_ROOT}
 
+%post
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
 
 %files
 %defattr(-,root,root,-)
@@ -61,9 +80,12 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_datadir}/pixmaps/sysprof-*.png
 %{_datadir}/sysprof/
 %{_datadir}/applications/*.desktop
-
+%{_datadir}/icons/hicolor/*/*/*
 
 %changelog
+* Fri Jun 24 2011 Gianluca Sforna <giallu at gmail.com> 1.1.6.3
+- Fix missing icon (#558089)
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.6-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list