From ad86248dd9ea1c99d252c74e4816f099178e4073 Mon Sep 17 00:00:00 2001 From: Gianluca Sforna Date: Fri, 24 Jun 2011 13:09:15 +0200 Subject: [PATCH] Fix missing icon (#558089) --- sysprof.spec | 26 ++++++++++++++++++++++++-- 1 file 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 1.1.6.3 +- Fix missing icon (#558089) + * Wed Feb 09 2011 Fedora Release Engineering - 1.1.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild