File tomboy.spec of Package tomboy

#
# spec file for package tomboy
#
# Copyright (c) 2012 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/
#


%define build_applet 0

Name:           tomboy
Version:        1.10.2
Release:        0
Summary:        GNOME Note Taking Application
License:        LGPL-2.1+
Group:          Productivity/Office/Other
Url:            http://projects.gnome.org/tomboy/
Source:         http://download.gnome.org/sources/tomboy/1.10/%{name}-%{version}.tar.xz
BuildRequires:  dbus-1-x11
BuildRequires:  dbus-sharp-devel
BuildRequires:  dbus-sharp-glib-devel
BuildRequires:  fdupes
BuildRequires:  gconf-sharp2
BuildRequires:  gconf2-devel
BuildRequires:  glib-sharp2
BuildRequires:  gmime-sharp
BuildRequires:  gnome-doc-utils-devel
%if 0%{?build_applet}
BuildRequires:  gnome-panel-devel
BuildRequires:  gnome-panel-sharp
%endif
BuildRequires:  gtk-sharp2
BuildRequires:  gtkspell-devel
BuildRequires:  intltool
BuildRequires:  libxslt-devel
BuildRequires:  mono-addins
BuildRequires:  mono-basic
BuildRequires:  mono-data-sqlite
BuildRequires:  mono-devel
BuildRequires:  mono-nunit
# We need the %%mime_database_* macros
BuildRequires:  shared-mime-info
BuildRequires:  tango-icon-theme
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
Requires:       dbus-1-x11
Requires:       gtk-sharp2
Requires:       gtkspell
Requires:       mono
Requires:       mono-core
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq

%description
Tomboy is a desktop note taking application for Linux and Unix. Simple
and easy to use, but with potential to help you organize the ideas and
information you deal with every day.

%lang_package
%prep
%setup -q
translation-update-upstream

%build
#autoreconf -f -i
%configure\
        --disable-schemas-install\
        --disable-scrollkeeper\
%if 0%{?build_applet}
        --enable-panel-applet \
%endif
        --disable-update-mimedb \
        --enable-nunit
make

%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
%suse_update_desktop_file tomboy          Utility  DesktopUtility
%find_lang %{name} %{?no_lang_C}
%find_gconf_schemas
cat %{name}.schemas_list >%{name}.lst
# libtomboy does not export its headers, so it can't be used
# outside tomboy package,
rm %{buildroot}%{_libdir}/tomboy/*.*a
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%pre -f %{name}.schemas_pre

%post
%desktop_database_post
%icon_theme_cache_post
%mime_database_post

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%postun
%desktop_database_postun
%icon_theme_cache_postun
%mime_database_postun

%files -f %{name}.lst
%defattr(-, root, root)
%doc AUTHORS NEWS README COPYING
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%{_bindir}/%{name}
%{_libdir}/%{name}
%if 0%{?build_applet}
%{_bindir}/%{name}-panel
%{_libdir}/bonobo/servers/GNOME_TomboyApplet.server
%endif
%{_libdir}/pkgconfig/*.pc
%doc %{_mandir}/man1/%{name}.1.gz
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/icons/hicolor/*/mimetypes/application-x-note.png
%{_datadir}/mime/packages/tomboy.xml
%{_datadir}/tomboy
%{_datadir}/dbus-1/services/org.gnome.Tomboy.service
%{_datadir}/applications/tomboy.desktop

%files lang -f %{name}.lang
%define __find_provides env sh -c 'filelist=($(grep -v -E "%{_libdir}/%{name}/addins|Mono.Addins")) && { printf "%s\\n" "${filelist[@]}" | %{_prefix}/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | %{_bindir}/mono-find-provides ; } | sort | uniq'

%changelog
openSUSE Build Service is sponsored by