File rednotebook.spec of Package rednotebook
#
# spec file for package rednotebook
#
# 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: rednotebook
Version: 1.2.0
Release: 1
# Note: there's no lang package as of 1.1.4 because the translations are not installed in the usual place. See lp#687349.
# See note at the end of README: code is using some LGPL-3.0+ module, so the resulting work is GPL-3.0+.
License: GPL-3.0+
Summary: Graphical diary and journal
Url: http://rednotebook.sourceforge.net/
Group: Productivity/Office/Other
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-yaml
Requires: python-webkitgtk
Recommends: python-chardet
%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.
%prep
%setup -q
%build
%install
%{__python} setup.py install --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --root=%{buildroot}
%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}/pixmaps/%{name}.png
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{python_sitelib}/%{name}/
%{python_sitelib}/%{name}-%{version}-py%{python_version}.egg-info
%changelog