File gnome-utils.spec of Package gnome-utils

#
# spec file for package gnome-utils
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           gnome-utils
Version:        2.32.0
Release:        3
License:        GPLv2+
Summary:        Utilities for GNOME
Url:            http://www.gnome.org
Group:          System/GUI/GNOME
Source:         ftp://ftp.gnome.org/pub/gnome/sources/gnome-utils/2.16/%{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE gnome-utils-logview-run-as-root.patch
Patch15:        gnome-utils-logview-run-as-root.patch
# PATCH-NEEDS-REBASE gnome-utils-screenshot-abspath.patch bgo543641 - Now using GIO, so unclear if it's still needed (see bug report)
Patch23:        gnome-utils-screenshot-abspath.patch
# PATCH-FIX-UPSTREAM gnome-utils-179040-screenshot-uri.patch bgo570425
Patch25:        gnome-utils-179040-screenshot-uri.patch
# PATCH-FIX-OPENSUSE gnome-utils-no-docpath-in-search-tool.patch vuntz@novell.com -- Remove DocPath from the .desktop file (so that it doesnt appear in yelp toc)
Patch31:        gnome-utils-no-docpath-in-search-tool.patch
# PATCH-FIX-OPENSUSE gnome-utils-desktop-icons.patch vuntz@novell.com -- We need the icons in hicolor, so we'll have to copy them
Patch32:        gnome-utils-desktop-icons.patch
BuildRequires:  fdupes
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gnome-icon-theme
BuildRequires:  gnome-panel-devel
BuildRequires:  gnome-patch-translation
BuildRequires:  libcanberra-devel
BuildRequires:  libgtop-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
Requires:       gnome-icon-theme
Requires:       tango-icon-theme
# We need xdg-su for gnome-utils-logview-run-as-root.patch
Requires:       xdg-utils
Recommends:     %{name}-lang
Provides:       gnome-utils2
Obsoletes:      gnome-utils2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq

%description
This package contains some utilities for GNOME, such as a disk usage
analyzer, a screenshot tool and a dictionary.

%package -n gnome-search-tool
License:        GPLv2+
Summary:        GNOME Search Tool
Group:          System/GUI/GNOME
# Help files
Recommends:     gnome-search-tool-lang
# Translations are in the common po files, unfortunately
Recommends:     %{name}-lang

%description -n gnome-search-tool
This is the GNOME Seach Tool as shipped with the GNOME utilities. It uses
command-line tools such as find and locate to get results.

%package -n gnome-panel-applet-dictionary
License:        GPLv2+
Summary:        A GNOME panel applet to look up words in dictionary sources
Group:          System/GUI/GNOME
# Some files are shared between the main gnome-dictionary tool and the applet
Requires:       %{name} = %{version}
Supplements:    packageand(%{name}:gnome-panel}

%description -n gnome-panel-applet-dictionary
This package contains a panel applet to look up words in dictionary
sources.

%package -n libgdict-1_0-6
License:        LGPLv2+
Summary:        Library to look up words in dictionary sources
Group:          System/Libraries
# Translations are in the common po files, unfortunately
Recommends:     %{name}-lang

%description -n libgdict-1_0-6
The Gdict library is an engine to look up words in dictionary sources.

%package -n libgdict-devel
License:        LGPLv2+
Summary:        Library to look up words in dictionary sources -- Development Files
Group:          Development/Libraries/C and C++
Requires:       libgdict-1_0-6 = %{version}
Provides:       gnome-utils-doc = %{version}
Obsoletes:      gnome-utils-doc <= %{version}
# Name changed during development of 11.4
Provides:       %{name}-devel = %{version}
Obsoletes:      %{name}-devel < %{version}

%description -n libgdict-devel
The Gdict library is an engine to look up words in dictionary sources.

%lang_package
%lang_package -n gnome-search-tool
%prep
%setup -q
translation-update-upstream
%patch15 -p0
#%patch23
%patch25 -p0
%patch31 -p0
%patch32 -p0

%build
%configure\
    --disable-static \
    --disable-scrollkeeper
make %{?jobs:-j%jobs}

%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
for size in 8x8 16x16 22x22 24x24 32x32 48x48; do
	# will be fixed when bgo#569049 is fixed
	if test -f %{_datadir}/icons/gnome/$size/apps/logviewer.png; then
		mkdir -p %{buildroot}%{_datadir}/icons/hicolor/$size/apps
		cp -a %{_datadir}/icons/gnome/$size/apps/logviewer.png %{buildroot}%{_datadir}/icons/hicolor/$size/apps/logviewer.png
	fi
	# will be fixed when bgo#569048 is fixed
	if test -f %{_datadir}/icons/gnome/$size/apps/applets-screenshooter.png; then
		mkdir -p %{buildroot}%{_datadir}/icons/hicolor/$size/apps
		cp -a %{_datadir}/icons/gnome/$size/apps/applets-screenshooter.png %{buildroot}%{_datadir}/icons/hicolor/$size/apps/applets-screenshooter.png
	fi
	if test -f %{_datadir}/icons/gnome/$size/actions/system-search.png; then
		mkdir -p %{buildroot}%{_datadir}/icons/hicolor/$size/apps
		cp -a %{_datadir}/icons/gnome/$size/actions/system-search.png %{buildroot}%{_datadir}/icons/hicolor/$size/apps/gnome-search-tool.png
	fi
done
%suse_update_desktop_file gnome-dictionary
%suse_update_desktop_file -G "GNOME Search Tool" gnome-search-tool Filesystem
%suse_update_desktop_file gnome-system-log
%suse_update_desktop_file gnome-screenshot X-SuSE-DesktopUtility
%suse_update_desktop_file baobab Monitor
%find_lang %{name}-2.0 %{?no_lang_C}
# Add help files
%find_lang baobab %{?no_lang_C} %{name}-2.0.lang
%find_lang gnome-dictionary %{?no_lang_C} %{name}-2.0.lang
%find_lang gnome-system-log %{?no_lang_C} %{name}-2.0.lang
%find_lang gnome-search-tool %{?no_lang_C}
# schemas for main package
%def_gconf_schemas %{name}
%add_gconf_schemas baobab
%add_gconf_schemas gnome-dictionary
%add_gconf_schemas gnome-screenshot
%add_gconf_schemas gnome-system-log
# schemas for other subpackages
%def_gconf_schemas gnome-search-tool
%add_gconf_schemas gnome-search-tool
%end_gconf_schemas
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%pre -f %{name}.schemas_pre

%post
%desktop_database_post
%icon_theme_cache_post

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%postun
%desktop_database_postun
%icon_theme_cache_postun

%pre -n gnome-search-tool -f gnome-search-tool.schemas_pre

%post -n gnome-search-tool
%desktop_database_post
%icon_theme_cache_post

%posttrans -n gnome-search-tool -f gnome-search-tool.schemas_posttrans

%preun -n gnome-search-tool -f gnome-search-tool.schemas_preun

%postun -n gnome-search-tool
%desktop_database_postun
%icon_theme_cache_postun

%post -n libgdict-1_0-6 -p /sbin/ldconfig

%postun -n libgdict-1_0-6 -p /sbin/ldconfig

%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/omf/
# baobab
%dir %{_datadir}/gnome/help/baobab/
%doc %{_datadir}/gnome/help/baobab/C/
%dir %{_datadir}/omf/baobab/
%doc %{_datadir}/omf/baobab/baobab-C.omf
%{_bindir}/baobab
%{_datadir}/applications/baobab.desktop
%{_datadir}/baobab/
%{_datadir}/icons/hicolor/*/apps/baobab.png
%{_datadir}/icons/hicolor/*/apps/baobab.svg
%{_mandir}/man1/baobab.1*
# gnome-dictionary
%dir %{_datadir}/gnome/help/gnome-dictionary/
%doc %{_datadir}/gnome/help/gnome-dictionary/C/
%dir %{_datadir}/omf/gnome-dictionary/
%doc %{_datadir}/omf/gnome-dictionary/gnome-dictionary-C.omf
%{_bindir}/gnome-dictionary
%{_datadir}/applications/gnome-dictionary.desktop
%{_datadir}/gnome-dictionary/
%{_mandir}/man1/gnome-dictionary.1*
# gnome-screenshot
%{_bindir}/gnome-panel-screenshot
%{_bindir}/gnome-screenshot
%{_datadir}/applications/gnome-screenshot.desktop
%{_datadir}/gnome-screenshot/
%{_datadir}/icons/hicolor/*/apps/applets-screenshooter.png
%{_mandir}/man1/gnome-screenshot.1*
# gnome-system-log
%dir %{_datadir}/gnome/help/gnome-system-log/
%doc %{_datadir}/gnome/help/gnome-system-log/C/
%dir %{_datadir}/omf/gnome-system-log/
%doc %{_datadir}/omf/gnome-system-log/gnome-system-log-C.omf
%{_bindir}/gnome-system-log
%{_datadir}/applications/gnome-system-log.desktop
%{_datadir}/gnome-utils/
%{_datadir}/icons/hicolor/*/apps/logviewer.png
%{_mandir}/man1/gnome-system-log.1*

%files -n gnome-search-tool -f gnome-search-tool.schemas_list
%defattr(-,root,root)
%doc gsearchtool/AUTHORS COPYING
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/gnome-search-tool/
%doc %{_datadir}/gnome/help/gnome-search-tool/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/gnome-search-tool/
%doc %{_datadir}/omf/gnome-search-tool/gnome-search-tool-C.omf
%{_bindir}/gnome-search-tool
%{_datadir}/applications/gnome-search-tool.desktop
%{_datadir}/icons/hicolor/*/apps/gnome-search-tool.png
%{_datadir}/pixmaps/gsearchtool/
%{_mandir}/man1/gnome-search-tool.1*

%files -n gnome-panel-applet-dictionary
%defattr(-,root,root)
%{_datadir}/gnome-2.0/ui/GNOME_DictionaryApplet.xml
%{_libdir}/bonobo/servers/GNOME_DictionaryApplet.server
%{_libexecdir}/gnome-dictionary-applet

%files -n libgdict-1_0-6
%defattr(-,root,root)
%doc COPYING.libs
%{_datadir}/gdict-1.0/
%{_libdir}/libgdict-1.0.so.*

%files -n libgdict-devel
%defattr(-,root,root)
%{_includedir}/gdict-1.0/
%{_libdir}/libgdict-1.0.so
%{_libdir}/pkgconfig/gdict-1.0.pc
%doc %{_datadir}/gtk-doc/html/gdict/

%files lang -f %{name}-2.0.lang

%files -n gnome-search-tool-lang -f gnome-search-tool.lang

%changelog
openSUSE Build Service is sponsored by