File tauri.spec of Package cargo-tauri
#
# spec file for package cargo-tauri
#
# Copyright (c) 2023 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: tauri
Version: 2.1.1
Release: 0
Summary: Build smaller, faster, and more secure desktop applications with a web frontend
License: MIT
Group: Development/Tools/Building
URL: https://github.com/tauri-apps/tauri
Source0: %{name}-%{version}.tar.zst
Source1: vendor.tar.zst
BuildRequires: cargo-packaging
BuildRequires: cargo
BuildRequires: libglib-2_0-0
BuildRequires: glib2-devel
BuildRequires: pango-devel
BuildRequires: libgdk_pixbuf-2_0-0
BuildRequires: gdk-pixbuf-devel
BuildRequires: webkit2gtk3-devel
BuildRequires: libappindicator3-1
Suggests: %{name}-fish-completion
Suggests: %{name}-zsh-completion
%description
Tauri is a polyglot and generic system that is very composable and
allows engineers to make a wide variety of applications. It is used
for building applications for Desktop Computers using a combination
of Rust tools and HTML rendered in a Webview. Apps built with Tauri
can ship with any number of pieces of an optional JS API / Rust API
so that webviews can control the system via message passing. In
fact, developers can extend the default API with their own
functionality and bridge the Webview and Rust-based backend easily
%package zsh-completion
Summary: ZSH completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Supplements: (%{name} and zsh)
BuildArch: noarch
%description zsh-completion
zsh shell completions for %{name}.
%package fish-completion
Summary: Fish completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Supplements: (%{name} and fish)
BuildArch: noarch
%description fish-completion
Fish command line completion support for %{name}.
%prep
%autosetup -p1 -a1
%build
mkdir completions
%{cargo_build}
_completion="target/release/cargo-tauri completions --shell"
$_completion fish > "completions/%{name}.fish"
$_completion zsh > "completions/_%{name}"
%check
%{cargo_test}
%install
install -Dm 755 target/release/cargo-tauri %{buildroot}%{_bindir}/cargo-tauri
install -Dm 644 completions/_%{name} %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
install -Dm 644 completions/%{name}.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
%files
%license LICENSE_APACHE-2.0 LICENSE_MIT
%doc README.md
%{_bindir}/cargo-tauri
%files zsh-completion
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_%{name}
%files fish-completion
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/%{name}.fish
%changelog