[xterm/f18: 5/8] install icon to hicolor theme and use it in desktop file (#804279)

Miroslav Lichvar mlichvar at fedoraproject.org
Wed Oct 10 15:48:11 UTC 2012


commit 53b95ab0700df6706c2eb2229a737e349232446c
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date:   Wed Oct 10 17:29:24 2012 +0200

    install icon to hicolor theme and use it in desktop file (#804279)

 xterm-desktop.patch |    2 +-
 xterm.spec          |   16 +++++++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/xterm-desktop.patch b/xterm-desktop.patch
index c44c19a..52c05d1 100644
--- a/xterm-desktop.patch
+++ b/xterm-desktop.patch
@@ -13,5 +13,5 @@ diff -up xterm-283/xterm.desktop.desk xterm-283/xterm.desktop
  Type=Application
  Encoding=UTF-8
 -Icon=xterm-color_48x48
-+Icon=gnome-xterm
++Icon=xterm-color
  Categories=System;TerminalEmulator;
diff --git a/xterm.spec b/xterm.spec
index 00ed16e..c49f103 100644
--- a/xterm.spec
+++ b/xterm.spec
@@ -49,7 +49,8 @@ done
 	--enable-warnings \
 	--enable-wide-chars \
 	--with-app-defaults=%{x11_app_defaults_dir} \
-	--with-icondir=%{_datadir}/pixmaps \
+	--with-icon-theme=hicolor \
+	--with-icondir=%{_datadir}/icons \
 	--with-utempter \
 	--with-tty-group=tty \
 	--disable-full-tgetent
@@ -69,6 +70,18 @@ desktop-file-install --vendor=fedora \
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+
 %files
 %defattr(-,root,root,-)
 %doc xterm.log.html ctlseqs.txt 16colors.txt README.i18n THANKS
@@ -81,6 +94,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/uxterm.1*
 %{_mandir}/man1/xterm.1*
 %{_datadir}/applications/fedora-xterm.desktop
+%{_datadir}/icons/hicolor/*/apps/xterm*
 %{_datadir}/pixmaps/*xterm*.xpm
 %{x11_app_defaults_dir}/KOI8RXTerm*
 %{x11_app_defaults_dir}/UXTerm*


More information about the scm-commits mailing list