[frogr] spec: add %post/%postun hooks
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] spec: add %post/%postun hooks
- Date: Tue, 31 May 2011 13:11:48 +0000 (UTC)
commit b589fff3cf8058fdf716cc0ac17bd67c7ee9a908
Author: Christophe Fergeau <cfergeau redhat com>
Date: Tue May 31 13:02:00 2011 +0200
spec: add %post/%postun hooks
They are needed because the .desktop file has a MimeType section
and because we install an icon in the hicolor theme.
frogr.spec | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/frogr.spec b/frogr.spec
index 163153c..c56236c 100644
--- a/frogr.spec
+++ b/frogr.spec
@@ -37,6 +37,22 @@ desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop
%find_lang %{name}
+%post
+update-desktop-database &> /dev/null || :
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+
+%postun
+update-desktop-database &> /dev/null || :
+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 -f %{name}.lang
%defattr(-,root,root,-)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]