Update icon cache scriptlet per packaging guidelines

http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache
This commit is contained in:
Christopher Aillon 2011-05-07 20:30:16 -07:00
parent 362413602b
commit efe6224c35

View File

@ -11,7 +11,7 @@
Summary: Network traffic analyzer Summary: Network traffic analyzer
Name: wireshark Name: wireshark
Version: 1.4.6 Version: 1.4.6
Release: 1%{?dist} Release: 2%{?dist}
License: GPL+ License: GPL+
Group: Applications/Internet Group: Applications/Internet
Source0: http://wireshark.org/download/src/%{name}-%{version}.tar.bz2 Source0: http://wireshark.org/download/src/%{name}-%{version}.tar.bz2
@ -243,22 +243,23 @@ getent group wireshark >/dev/null || groupadd -r wireshark
%post gnome %post gnome
update-desktop-database &> /dev/null ||: update-desktop-database &> /dev/null ||:
update-mime-database %{_datadir}/mime &> /dev/null || : update-mime-database %{_datadir}/mime &> /dev/null || :
touch --no-create %{_datadir}/icons/gnome || : touch --no-create %{_datadir}/icons/gnome &>/dev/null || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/gnome || : touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%postun gnome %postun gnome
update-desktop-database &> /dev/null ||: update-desktop-database &> /dev/null ||:
update-mime-database %{_datadir}/mime &> /dev/null || : update-mime-database %{_datadir}/mime &> /dev/null || :
if [ $1 -eq 0 ] ; then if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/gnome || : touch --no-create %{_datadir}/icons/gnome &>/dev/null
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/gnome || : gtk-update-icon-cache %{_datadir}/icons/gnome &>/dev/null || :
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi fi
if [ $1 -eq 0 ] ; then %posttrans
touch --no-create %{_datadir}/icons/hicolor || : gtk-update-icon-cache %{_datadir}/icons/gnome &>/dev/null || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%files %files
%defattr(-,root,root) %defattr(-,root,root)
@ -321,6 +322,9 @@ fi
%{_sbindir}/idl2wrs %{_sbindir}/idl2wrs
%changelog %changelog
* Sat May 07 2011 Christopher Aillon <caillon@redhat.com> - 1.4.6-2
- Update icon cache scriptlet
* Tue Apr 19 2011 Jan Safranek <jsafrane@redhat.com> - 1.4.6-1 * Tue Apr 19 2011 Jan Safranek <jsafrane@redhat.com> - 1.4.6-1
- upgrade to 1.4.6 - upgrade to 1.4.6
- see http://www.wireshark.org/docs/relnotes/wireshark-1.4.6.html - see http://www.wireshark.org/docs/relnotes/wireshark-1.4.6.html