File gtg.spec of Package gtg

#
# spec file for package gtg
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           gtg
Version:        0.4.0
Release:        0
Summary:        Personal Organizer for GNOME
License:        GPL-3.0-or-later
Group:          Productivity/Office/Organizers
URL:            https://wiki.gnome.org/Apps/GTG
Source0:        https://github.com/getting-things-gnome/%{name}/releases/download/v0.4/%{name}-%{version}.tar.xz
Source1:        https://github.com/getting-things-gnome/%{name}/releases/download/v0.4/%{name}-%{version}.tar.xz.sha256sum
BuildRequires:  dbus-1
BuildRequires:  fdupes
# dbus-1 is only required for file ownerships
BuildRequires:  meson
BuildRequires:  python-devel
BuildRequires:  python-gobject2
BuildRequires:  python-gtk
BuildRequires:  update-desktop-files
Requires:       python3-liblarch-gtk
Requires:       python3-nose
Requires:       python3-spec
Requires:       python3-pyxdg
Requires:       python3-pyflakes
Requires:       python3-pycodestyle
Requires:       python3-mock
Requires:       python3-dbus-python
Requires:       python3-gobject
Requires:       python3-pycairo 
BuildArch:      noarch

%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.

%package doc
Summary:        Documentations for %{name}

%description doc
Documentations for %{name}.

%lang_package

%prep
echo "`grep %{name}-%{version}.tar.xz %{SOURCE1} | grep -Eo '^[0-9a-f]+'`  %{SOURCE0}" | sha256sum -c
%autosetup
# Fix rpm runtime dependency rpmlint error replace the shebang in all the scripts with %%{_bindir}/python3
find . -type f -exec perl -pi -e 'BEGIN{undef $/};s[^#\!/usr/bin/env python3][#\!%{_bindir}/python3]' {} \;

%build
%meson
%meson_build

%install
%meson_install
%find_lang %{name} %{?no_lang_C}

%fdupes -s %{buildroot}

%files
%license LICENSE
%doc CONTRIBUTING.md NEWS README.md
%{_bindir}/gtg
%{python3_sitelib}/GTG/
%{_datadir}/applications/*.desktop
%{_datadir}/icons/ubuntu-mono-dark
%{_datadir}/icons/ubuntu-mono-light
%{_datadir}/icons/*/*/*/*.png
%{_datadir}/icons/*/*/*/*.svg
%{_datadir}/metainfo/*.appdata.xml
%{_mandir}/man1/gtg.1%{?ext_man}

%files doc
%{_datadir}/help/C/gtg/

%files lang -f %{name}.lang

%changelog