Fix %pre script

This commit is contained in:
Matthias Clasen 2010-04-02 05:27:02 +00:00
parent b9d699e504
commit 4e069bb75a

View File

@ -6,7 +6,7 @@ Summary: Color management tools for GNOME
Name: gnome-color-manager
Version: 2.30.0
#Release: 0.1.%{?alphatag}git%{?dist}
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://projects.gnome.org/gnome-color-manager/
@ -16,11 +16,9 @@ Source0: http://download.gnome.org/sources/gnome-color-manager/2.30/%{name}-%{
Requires: gnome-icon-theme
Requires: shared-mime-info
Requires: shared-color-profiles
Requires(post): scrollkeeper
Requires(pre): GConf2
Requires(post): GConf2
Requires(preun): GConf2
Requires(postun): scrollkeeper
BuildRequires: gtk2-devel >= 2.16.0
BuildRequires: scrollkeeper
@ -43,6 +41,7 @@ BuildRequires: sane-backends-devel
BuildRequires: libtiff-devel
BuildRequires: libcanberra-devel
BuildRequires: libnotify-devel
BuildRequires: GConf2
%description
gnome-color-manager is a session framework that makes it easy to manage, install
@ -67,15 +66,9 @@ done
%find_lang %name --with-gnome
%clean
rm -rf $RPM_BUILD_ROOT
%post
%gconf_schema_upgrade gnome-color-manager
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
gtk-update-icon-cache -q %{_datadir}/icons/hicolor &> /dev/null || :
fi
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database %{_datadir}/applications &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
@ -86,13 +79,16 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%gconf_schema_remove gnome-color-manager
%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
gtk-update-icon-cache -q %{_datadir}/icons/hicolor &> /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
update-desktop-database %{_datadir}/applications &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
@ -121,6 +117,10 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%dir %{_localstatedir}/lib/color
%changelog
* Fri Apr 2 2010 Matthias Clasen <mclasen@redhat.com> 2.30.0-4
- BR GConf to make the macros work
- Modernize icon cache handling
* Wed Mar 31 2010 Richard Hughes <richard@hughsie.com> 2.30.0-3
- Fix up a scriptlet problem.
- Resolves: #578611