File b-step.spec of Package b-step

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


%define binname B-Step
Name:           b-step
Version:        1
Release:        0
Summary:        The MonoPlugs b-step sequencer
License:        GPL-3.0-only OR MIT
Group:          Productivity/Multimedia/Sound/Midi
URL:            https://github.com/surge-synthesizer/b-step
Source0:        https://github.com/surge-synthesizer/b-step/archive/refs/tags/Nightly.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  JUCE7-source
BuildRequires:  Mesa-libGL-devel
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libXcursor-devel
BuildRequires:  libXrandr-devel
BuildRequires:  libcurl-devel
BuildRequires:  libjack-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xinerama)

%description
The B-Step Sequencer is a midi generating plugin and program which was originally authored by Monoplugs and its principal Thomas Arndt.

%package -n vst-%{name}
Summary:        The MonoPlugs b-step sequencer (VST)

%description -n vst-%{name}
The B-Step Sequencer is a midi generating plugin and program which was originally authored by Monoplugs and its principal Thomas Arndt.

%package -n vst3-%{name}
Summary:        The MonoPlugs b-step sequencer (VST3)

%description -n vst3-%{name}
The B-Step Sequencer is a midi generating plugin and program which was originally authored by Monoplugs and its principal Thomas Arndt.

%package -n lv2-%{name}
Summary:        The MonoPlugs b-step sequencer (LV2)

%description -n lv2-%{name}
The B-Step Sequencer is a midi generating plugin and program which was originally authored by Monoplugs and its principal Thomas Arndt.

%package -n clap-%{name}
Summary:        The MonoPlugs b-step sequencer (CLAP)

%description -n clap-%{name}
The B-Step Sequencer is a midi generating plugin and program which was originally authored by Monoplugs and its principal Thomas Arndt.

%prep
%setup -q

sed -i -e '/PLUGIN_CODE "bPlg"/a \        LV2URI\ https://surge-synthesizer.github.io/lv2/b-step' CMakeLists.txt

%build
export VST2SDK_DIR=%{_includedir}
%cmake -DBSTEP_JUCE_PATH=%{_prefix}/src/JUCE7 -DJUCE_SUPPORTS_LV2=On
%cmake_build

%install
mkdir -p %{buildroot}%{_bindir}
install build/%{binname}_artefacts/RelWithDebInfo/Standalone/* %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_libdir}/vst
install build/%{binname}_artefacts/RelWithDebInfo/VST/* %{buildroot}%{_libdir}/vst/
mkdir -p %{buildroot}%{_libdir}/vst3
cp -r build/%{binname}_artefacts/RelWithDebInfo/VST3/*.vst3 %{buildroot}%{_libdir}/vst3/
mkdir -p %{buildroot}%{_libdir}/lv2
cp -r build/%{binname}_artefacts/RelWithDebInfo/LV2/*.lv2 %{buildroot}%{_libdir}/lv2/
mkdir -p %{buildroot}%{_libdir}/clap
cp -r build/%{binname}_artefacts/RelWithDebInfo/CLAP/*.clap %{buildroot}%{_libdir}/clap/

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

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

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

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

%changelog
openSUSE Build Service is sponsored by