File tuhi.spec of Package tuhi

# spec file for package tuhi
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2022 Florian "sp1rit" <>
# 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

%define pythons python3

%define uuid org.freedesktop.Tuhi
Name:           tuhi
Version:        0.6
Release:        0
Summary:        Access Wacom SmartPad devices 
License:        GPL-2.0
BuildArch:      noarch
BuildRequires:  hicolor-icon-theme
BuildRequires:  fdupes
BuildRequires:  meson >= 0.50.0
# the grep invocation of %%find_lang fails otherwise
BuildRequires:  pcre
BuildRequires:  pkgconfig(pygobject-3.0)
BuildRequires:  python3
BuildRequires:  %{python_module cairo}
BuildRequires:  %{python_module gobject}
BuildRequires:  %{python_module svgwrite}
BuildRequires:  %{python_module xdg}
%if 0%{?suse_version}
BuildRequires:	update-desktop-files
Requires:  %{python_module cairo}
Requires:  %{python_module gobject}
Requires:  %{python_module svgwrite}
Requires:  %{python_module xdg}

Tuhi is a GTK application that connects to and fetches the data from the Wacom ink range (Spark, Slate, Folio, Intuos Paper, ...). Users can save the data as SVGs.


%autosetup -p1
# Removing unnecessary shebangs
find ./%{name} -perm 644 -name "*.py" -type f -exec sed -i '1d' {} \;
# replace /usr/bin/env python3 with proper shebang for RPM
find . -type f -perm 755 '(' -name "*.in" -o -name "*.py" ')' -exec sed -e 's|/usr/bin/env python3|%{__python3}|g' -i "{}" \;



%if 0%{?suse_version}
%suse_update_desktop_file %{uuid}
%fdupes %{buildroot}%{_datadir}/icons/hicolor/

%find_lang %{name}

%license COPYING

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by