File cherrytree.spec of Package cherrytree

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

Name:           cherrytree
Version:        0.19.3
Release:        2
License:        GPLv2+
Summary:        A hierarchical note taking application
Group:          Productivity/Office/Other
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  desktop-file-utils
BuildRequires:  python-gtk
BuildRequires:  python-gtksourceview
BuildRequires:  update-desktop-files
Requires:       python-gtk
Requires:       python-gtksourceview
Recommends:     %{name}-lang
# For password-protected format
Recommends:     p7zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%if %suse_version <= 1110
%define python_sitelib %{py_sitedir}

%if 0%{?suse_version} <= 1120
%define python_version %{py_ver}

A hierarchical note taking application, featuring rich text and syntax
highlighting, storing all the data (including images) in a single xml
file with extension ".ctd".

%setup -q


%{__python} install --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --root=%{buildroot}
# Remove old mime registration files
rm %{buildroot}%{_datadir}/application-registry/cherrytree.*
rm %{buildroot}%{_datadir}/mime-info/cherrytree.*
# Remove unnecessary source files
rm %{buildroot}%{_datadir}/cherrytree/glade/
%find_lang %{name} %{?no_lang_C}
%suse_update_desktop_file -G "Hierarchical Notes Utility" cherrytree TextEditor

rm -rf %{buildroot}

%if 0%{?suse_version} > 1130
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
update-mime-database %{_datadir}/mime || true

%if 0%{?suse_version} > 1130
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
update-mime-database %{_datadir}/mime || true

%doc changelog license

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by