File ruffle.spec of Package ruffle

#
# spec file for package ruffle
#
# 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/
#


%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
Name:           ruffle
Version:        0~git20210913.a882f85d
Release:        0
Summary:        Adobe Flash Player emulator written in Rust
License:        Apache-2.0 OR MIT
URL:            https://ruffle.rs/
Source:         %{name}-%{version}.tar.xz
Source1:        vendor.tar.xz
Source2:        cargo_config
BuildRequires:  cargo >= 1.54
BuildRequires:  rust-packaging
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(python3)
BuildRequires:  pkgconfig(x11) >= 1.4.99.1

%description
Ruffle is an Adobe Flash Player emulator written in the Rust programming
language. Ruffle targets both the desktop and the web using WebAssembly.

%prep
%setup -qa1
mkdir .cargo
cp %{SOURCE2} .cargo/config
# do we need this?
#%%cargo_prep

%build
#RUSTFLAGS=%%{rustflags} cargo build --release
%cargo_build

%install
#RUSTFLAGS=%%{rustflags} cargo install --root=%%{buildroot}%%{_prefix} --path .
# find out why this doesn't work
#%%cargo_install

install -Dm0755 target/release/ruffle_desktop %{buildroot}%{_bindir}/%{name}

%files
%license LICENSE.md
%doc README.md
%{_bindir}/%{name}

%changelog
openSUSE Build Service is sponsored by