File lonote.spec of Package lonote

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

Name:           lonote
Version:        1.7.9
Release:        0
License:        GPL-3.0 and Apache-2.0
Summary:        A personal note-taking application by Python3-qt4
Url:            http://code.google.com/p/lonote
Group:          Productivity/Office/Organizers
Source0:        %{name}-%{version}.tar.bz2
BuildRequires:  fdupes
BuildRequires:  python3-devel
BuildRequires:  python3-qt4-devel
BuildRequires:  update-desktop-files
Requires:       python3-dbm
Requires:       python3-qt4
Requires:       python3-xml
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Lonote is a personal note-taking application by Python3-qt4.
It features in well interact UI, minimal design, structural notes,
auto reloading, archiving and versioning.

%prep
%setup -q
sed -i "s/\r$//" doc/*.txt # Fix wrong EOL encoding
sed -i "s|#!/usr/bin/python3||" lonote/google_dmp/diff_match_patch.py # Fix non-executable script
sed -i "s|Categories=Office|Categories=Office;ProjectManagement;Utility;X-SuSE-DesktopUtility;|" xdg/lonote.desktop

%build
python3 setup.py build

%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm -rf %{buildroot}%{_datadir}/doc/%{name}/ # Remove wrongly installed docs
%fdupes %{buildroot}
%find_lang %{name}

%files -f %{name}.lang
%defattr(-,root,root)
%doc doc/*.txt
%{_bindir}/lonote
%{python3_sitelib}/*
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/lonote.*
%{_datadir}/%{name}/
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by