File drapes.spec of Package drapes

#
# spec file for package drapes
#
# 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:           drapes
Version:        0.5.2
Release:        2
License:        GPLv2+
Summary:        A wallpaper manager application for the GNOME desktop
Url:            http://drapes.mindtouchsoftware.com/
Group:          Amusements/Toys/Background
Source0:        drapes-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM drapes-makefile.patch malcolmlewis@opensuse.org -- Adds gnome-sharp-2.0 gnome-panel-sharp-2.24 to build chain
Patch0:         drapes-makefile.patch
BuildRequires:  fdupes
BuildRequires:  gconf2-devel
BuildRequires:  gconf-sharp2
BuildRequires:  glade-sharp2
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gnome-panel-sharp
BuildRequires:  gnome-sharp2
BuildRequires:  gtk-sharp2
BuildRequires:  mono-devel
BuildRequires:  perl-XML-Parser
BuildRequires:  update-desktop-files
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%gconf_schemas_prereq

%description
Desktop drapes is a wallpaper manager application for the gnome desktop.
It can randomly changing your wallpaper every once in a while, or
whenever you fell like it. It can also automatically pickup any
wallpapers you added to a directory with the ninja magic of inotify

%lang_package
%prep
%setup -q
%patch0

%build
# As the app is actually a 32bit mono assembly only, we install it into %{_prefix}/lib instead of %{_libdir}
# The target can be set to i686: mono is 32bit anyway. As the package is noarch, not specifying the target
# results in build failures on openSUSE < 11.3 and on SLE
%configure \
    --libdir=%{_prefix}/lib \
    --target=i686-pc-linux-gnu \
    --disable-schemas-install \
    --disable-scrollkeeper
make %{?_smp_mflags}

%install
%makeinstall
%suse_update_desktop_file -G "Desktop wallpaper manager" -r %{name} GNOME Utility DesktopUtility
%find_gconf_schemas
%find_lang %{name} %{?no_lang_C}
%fdupes -s %{buildroot}

%clean
%{__rm} -rf '%{buildroot}'

%pre -f %{name}.schemas_pre

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%if 0%{?suse_version} > 1130

%post
%desktop_database_post
%icon_theme_cache_post
%endif

%if 0%{?suse_version} > 1130

%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif

%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING NEWS
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/%{name}/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf
%{_bindir}/%{name}
%{_libexecdir}/%{name}/
%dir %{_libexecdir}/bonobo/servers
%{_libexecdir}/bonobo/servers/*.server
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/gnome-2.0/ui/DrapesApplet.xml
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/*

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by