File gtg.spec of Package gtg

#
# spec file for package gtg
#
# 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:           gtg
Version:        0.3.1
Release:        0
Summary:        Personal Organizer for GNOME
License:        GPL-3.0+
Group:          Productivity/Office/Organizers
Url:            http://gtgnome.net/
Source0:        http://launchpad.net/gtg/trunk/%{version}/+download/%{name}-%{version}.tar.gz
Source1:        gtg.appdata.xml
# PATCH-FIX-UPSTREAM gtg-fix-pynotify-crash.patch luc14n0@linuxmail.org -- Fix crashing due to the lack of python-notify installation (lp#1264846).
Patch0:         gtg-fix-pynotify-crash.patch
BuildRequires:  dbus-1
# dbus-1 is only required for file ownerships
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  python-gobject2
BuildRequires:  python-gtk
BuildRequires:  update-desktop-files
Requires:       python-configobj
Requires:       python-gobject2
Requires:       python-gtk
Requires:       python-liblarch >= 2.1
Requires:       python-liblarch_gtk >= 2.1
Requires:       python-notify
Requires:       python-xdg
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%py_requires

%description
Getting Things GNOME! (GTG) is a personal organizer for the GNOME desktop
environment inspired by the Getting Things Done (GTD) methodology. GTG is
designed with flexibility, adaptability, and ease of use in mind so it can be
used as more than just GTD software.

GTG is intended to help you track everything you need to do and need to know,
from small tasks to large projects.

%lang_package
%prep
%setup -q
%patch0 -p1

%build
%{__python} setup.py build

%install
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot}
%find_lang %{name} %{?no_lang_C}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable
mv %{buildroot}%{_datadir}/icons/hicolor/svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
# We don't ship any other icons in those icon sets.. 
rm -rf %{buildroot}%{_datadir}/icons/ubuntu-mono-{dark,light}
if [ -f %{buildroot}%{_datadir}/appdata/gtg.appdata.xml ]; then
  echo "Please remove the added gtg.appdata.xml file from the sources - the tarball installs it"
  false
else
  mkdir -p %{buildroot}%{_datadir}/appdata
  cp %{S:1} %{buildroot}%{_datadir}/appdata/
fi

%suse_update_desktop_file %{name}
%fdupes -s %{buildroot}

%clean
rm -rf %{buildroot}

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-, root, root)
%doc AUTHORS LICENSE CHANGELOG README
%doc %{_datadir}/help/C/gtg/
%{_bindir}/gtcli
%{_bindir}/gtg
%{_bindir}/gtg_new_task
%{python_sitelib}/GTG/
%{python_sitelib}/gtg-%{version}*.egg-info
%dir %{_datadir}/appdata
%{_datadir}/appdata/gtg.appdata.xml
%{_datadir}/applications/gtg.desktop
%{_datadir}/gtg/
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/dbus-1/services/org.gnome.GTG.service
%{_mandir}/man1/gtcli.1%{?ext_man}
%{_mandir}/man1/gtg.1%{?ext_man}
%{_mandir}/man1/gtg_new_task.1%{?ext_man}

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by