File soyboy-sp.spec of Package soyboy-sp

#
# spec file for package soyboy-sp
#
# Copyright (c) 2022 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:           soyboy-sp
Version:        1.0.1+git.4.4375764
Release:        0
Summary:        A GameBoy instrument
License:        GPL-3.0-only
URL:            https://github.com/t-sin/soyboy-sp.vst3
Source0:        %{name}-%{version}.tar.gz
Source1:        cargo_config
Source2:        vendor.tar.xz
BuildRequires:  cargo
BuildRequires:  xcb-util-renderutil-devel

%description
SoyBoy SP is a VST3 instrument plugin to generate some GameBoy-like sounds. It has some basic features below:

- Three oscillator modes (square wave, noise, wavetable)
- A 32-samples 4bit wavetable oscillator
- A linear envelope generator
- A frequency sweeping to bend the pitch automatically
- A stutter, it's like a note delay

Additionally, SoyBoy SP has these features:

- Can be polyphonic; you can choose a number of voices (1 ~ 6)
- Pitch bending with MPE (MIDI Polyphonic Expression)

%package -n vst3-%{name}
Summary:        A GameBoy instrument (VST3)
%description -n vst3-%{name}
SoyBoy SP is a VST3 instrument plugin to generate some GameBoy-like sounds. It has some basic features below:

- Three oscillator modes (square wave, noise, wavetable)
- A 32-samples 4bit wavetable oscillator
- A linear envelope generator
- A frequency sweeping to bend the pitch automatically
- A stutter, it's like a note delay

Additionally, SoyBoy SP has these features:

- Can be polyphonic; you can choose a number of voices (1 ~ 6)
- Pitch bending with MPE (MIDI Polyphonic Expression)

%prep
%setup -qa2

#mv vendor tools/yabridgectl/
mkdir -p .cargo
cp %{SOURCE1} .cargo/config

%build

#cd tools/yabridgectl/
RUSTFLAGS=%{rustflags} cargo build --release --locked

%install
mkdir -p %{buildroot}%{_libdir}/vst3/soyboy-sp.vst3/Contents/Resources
mkdir -p %{buildroot}%{_libdir}/vst3/soyboy-sp.vst3/Contents/x86_64-linux

cp target/release/libsoyboy_sp.so %{buildroot}%{_libdir}/vst3/soyboy-sp.vst3/Contents/x86_64-linux/soyboy-sp.so

%files -n vst3-%{name}
%license  LICENSE
%doc README.md
%{_libdir}/vst3/

%changelog
openSUSE Build Service is sponsored by