File pizarra.spec of Package pizarra

#
# spec file for package pizarra
#
# Copyright (c) 2024 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:           pizarra
Version:        1.7.5
Release:        0
Summary:	Ein einfaches Vektorgrafik-Programm
License:        GPL-3
URL:            https://pizarra.categulario.xyz/
Source:         pizarra-gtk-%version.tar.zst
Source1:	vendor.tar.zst
BuildRequires:  rust
BuildRequires:  cargo
BuildRequires:	cargo-packaging
BuildRequires:	zstd
BuildRequires:	pkgconfig
BuildRequires:  pkgconfig(gdk-3.0)

%description

%prep
%autosetup -p1 -a1 -n pizarra-gtk-%version
cat << EOF >> .cargo/config.toml

[install]
root = "%{buildroot}%{_prefix}"
EOF

%build
%{cargo_build}

%install
%{cargo_install}
install -Dm755 target/release/pizarra %{buildroot}/usr/bin/pizarra
install -Dm644 res/pizarra.desktop %{buildroot}/usr/share/applications/pizarra.desktop
install -Dm644 res/icons/tk.categulario.pizarra.svg %{buildroot}/usr/share/icons/hicolor/scalable/apps/pizarra.svg

%files
%license LICENSE
%doc CHANGELOG.md README.md
%{_bindir}/pizarra
%{_datadir}/applications/pizarra.desktop
%{_datadir}/icons/hicolor/scalable/apps/pizarra.svg

%changelog

openSUSE Build Service is sponsored by