File rednotebook.spec of Package rednotebook

#
# spec file for package rednotebook
#
# Copyright (c) 2015 SUSE LINUX 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:           rednotebook
Version:        1.10.1
Release:        0
Summary:        Graphical diary and journal
License:        GPL-3.0+
Group:          Productivity/Office/Other
# See note at the end of README: code is using some LGPL-3.0+ module, so the resulting work is GPL-3.0+.
Url:            http://rednotebook.sourceforge.net/
Source:         http://downloads.sourceforge.net/project/rednotebook/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  python-gtk
BuildRequires:  python-webkitgtk
BuildRequires:  update-desktop-files
Requires:       python-gtk
Requires:       python-webkitgtk
Requires:       python-yaml
Recommends:     python-chardet
Recommends:     %{name}-lang
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%py_requires
%if 0%{?suse_version} <= 1110
%define python_sitelib %{py_sitedir}
%endif

%description
RedNotebook is a graphical journal to keep track of notes and thoughts.
It includes a calendar navigation, customizable templates, export
functionality and word clouds. You can also format, tag and search your
entries.

%lang_package
%prep
%setup -q

%build

%install
%{__python} setup.py install --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --root=%{buildroot}
%find_lang %{name} %{?no_lang_C}
%suse_update_desktop_file %{name} Calendar
%fdupes %{buildroot}%{_datadir}

%clean
rm -rf %{buildroot}

%post
%if 0%{?suse_version} > 1130
%desktop_database_post
%icon_theme_cache_post
%else
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
%endif

%postun
%if 0%{?suse_version} > 1130
%desktop_database_postun
%icon_theme_cache_postun
%else
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
%endif

%files
%defattr(-,root,root)
%doc AUTHORS CHANGELOG LICENSE README
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.svg
%{python_sitelib}/%{name}/
%{python_sitelib}/%{name}-%{version}-py%{python_version}.egg-info

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by