File gnome-do.spec of Package gnome-do

# spec file for package gnome-do
# 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

# norootforbuild

Name:           gnome-do
Version:        0.8.4
Release:        7.<RELEASE4>
# FIXME: check if removal of locales in %install is still needed (last checked: 2010-12-11)
License:        GPLv3+
Source:         %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM gnome-do-OnlyShowIn.patch lp#413575 -- Show gnome-do only in gnome desktop.
Patch0:         gnome-do-OnlyShowIn.patch
# PATCH-FIX-UPSTREAM gnome-do-quiet-autostart.patch lp#413596 -- Do not show the dialog when autostarted
Patch1:         gnome-do-quiet-autostart.patch
# PATCH-FIX-UPSTREAM gnome-do-no-disable-deprecated.patch lp#647495 -- Don't build with *_DISABLE_DEPRECATED flags
Patch3:         gnome-do-no-disable-deprecated.patch
# PATCH-FIX-UPSTREAM gnome-do-fix-kk.patch lp#688563 -- Fix kk.po which introduces a newline in .desktop file, breaking it
Patch4:         gnome-do-fix-kk.patch
# PATCH-FIX-UPSTREAM gnome-do-mono-2.8.patch lp#634550 lp#634556 -- Fix build with mono 2.8, patches taken from bugs
Patch5:         gnome-do-mono-2.8.patch
# PATCH-FIX-UPSTREAM gnome-do-fix-keybindings-gconf.patch lp#474619 -- Do not use translated names to get keybindings from gconf
Patch6:         gnome-do-fix-keybindings-gconf.patch
# PATCH-FIX-UPSTREAM gnome-do-fix-warning-empty-keybinding.patch lp#722996 -- Do not register OS bindings to empty keys
Patch7:         gnome-do-fix-warning-empty-keybinding.patch
Summary:        A powerful, speedy, and sexy remote control for your GNOME Desktop
Group:          Productivity/Other
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gconf2-devel
BuildRequires:  gnome-keyring-sharp-devel
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  mono-addins
BuildRequires:  mono-devel
BuildRequires:  notify-sharp
BuildRequires:  wnck-sharp
%if 0%{?fedora_version}
BuildRequires:  gnome-sharp-devel
BuildRequires:  gtk-sharp2-devel
BuildRequires:  ndesk-dbus-glib
BuildRequires:  gconf-sharp2
BuildRequires:  gnome-desktop-sharp2
BuildRequires:  gnome-sharp2
BuildRequires:  rsvg2-sharp
BuildRequires:  ndesk-dbus-glib-devel
BuildRequires:  pkg-config
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%define suse_update_desktop_file true
Recommends:     %{name}-lang
Recommends:     gnome-do-plugins

GNOME Do allows you to quickly search for many objects present in your
GNOME desktop environment (applications, Evolution contacts, Firefox
bookmarks, files, artists and albums in Rhythmbox, Pidgin buddies) and
perform commonly used commands on those objects (Run, Open, Email,
Chat, Play, etc.).

GNOME Do is inspired by Quicksilver (
and GNOME Launch Box

%setup -q
%patch0 -p1
%patch1 -p1
%patch3 -p1
%patch4 -p0
%patch5 -p0
%patch6 -p0
%patch7 -p1

autoreconf -fi
%configure --disable-schemas-install

# FIXME: waiting for ; once the bug is resolved, remove the comment for %if
#%if 0%{?suse_version} <= 1130
%{__rm} %{buildroot}%{_datadir}/locale/jv/LC_MESSAGES/*
%{__rm} %{buildroot}%{_datadir}/locale/lb/LC_MESSAGES/*
%{__rm} %{buildroot}%{_datadir}/locale/nap/LC_MESSAGES/*
%{__rm} %{buildroot}%{_datadir}/locale/sc/LC_MESSAGES/*
%{__rm} %{buildroot}%{_datadir}/locale/tet/LC_MESSAGES/*
%{__rm} %{buildroot}%{_datadir}/locale/tyv/LC_MESSAGES/*
# FIXME: nan is not a ISO 639-2 code, so it's not clear if it's valid as a locale
%{__rm} %{buildroot}%{_datadir}/locale/nan/LC_MESSAGES/*
%__rm -f %{buildroot}%{_libdir}/%{name}/
# Keep the same autostart desktop filename as upstream (needed because of gnome-do-quiet-autostart.patch)
mv %{buildroot}%{_sysconfdir}/xdg/autostart/%{name}-autostart.desktop %{buildroot}%{_sysconfdir}/xdg/autostart/%{name}.desktop
# We need to specify the whole path since we have two desktop files with the
# same filename
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}.desktop Utilities DesktopUtility
%suse_update_desktop_file %{buildroot}%{_sysconfdir}/xdg/autostart/%{name}.desktop Utilities DesktopUtility
%find_lang %{name} %{?no_lang_C}

%pre -f %{name}.schemas_pre

%preun -f %{name}.schemas_preun

%posttrans -f %{name}.schemas_posttrans

%if 0%{?suse_version} > 1130


%if 0%{?suse_version} > 1130


%if 0%{?fedora_version} || 0%{?rhel_version}
# Allows overrides of __find_provides in fedora distros... (already set to zero on newer suse distros)
%define _use_internal_dependency_generator 0
%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-provides ; } | sort | uniq'
%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-requires ; } | sort | uniq'

%files -f %{name}.schemas_list
%defattr(-, root, root)

%files lang -f %{name}.lang