File SPARTA.spec of Package SPARTA
#
# spec file for package SPARTA
#
# 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/
#
Name: SPARTA
Version: 1.8.1+git.0.921f1b4
Release: 0
Summary: A collection of spatial audio related plug-ins
License: GPL-3.0-only
Group: Productivity/Multimedia/Sound/Audio
URL: https://github.com/leomccormack/SPARTA
Source0: %{name}-%{version}.tar.gz
BuildRequires: JUCE8_07-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(fontconfig)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xinerama)
BuildRequires: libopenblas_pthreads-devel
BuildRequires: lapacke-devel
%description
Spatial Audio Real-Time Applications (SPARTA)
A collection of audio plug-ins for spatial audio production, reproduction and visualisation
%package -n vst-%{name}
Summary: A collection of spatial audio related plug-ins (VST)
%description -n vst-%{name}
Spatial Audio Real-Time Applications (SPARTA)
A collection of audio plug-ins for spatial audio production, reproduction and visualisation
%package -n vst3-%{name}
Summary: A collection of spatial audio related plug-ins (VST3)
%description -n vst3-%{name}
Spatial Audio Real-Time Applications (SPARTA)
A collection of audio plug-ins for spatial audio production, reproduction and visualisation
%package -n lv2-%{name}
Summary: A collection of spatial audio related plug-ins (LV2)
%description -n lv2-%{name}
Spatial Audio Real-Time Applications (SPARTA)
A collection of audio plug-ins for spatial audio production, reproduction and visualisation
%prep
%setup -q
ln -s /usr/src/JUCE8_07 SDKs/JUCE
sed -i -e 's/juce_set_vst2_sdk_path/#\ juce_set_vst2_sdk_path/' audio_plugins/CMakeLists.txt
%build
cmake -B cmake-build -DCMAKE_BUILD_TYPE=Release -DSAF_PERFORMANCE_LIB=SAF_USE_OPEN_BLAS_AND_LAPACKE \
-DSAF_ENABLE_SOFA_READER_MODULE=1 \
-DOPENBLAS_LIBRARY=/usr/lib64/openblas-pthreads/libopenblas.so \
-DOPENBLAS_HEADER_PATH=/usr/include/openblas/ \
-DLAPACKE_LIBRARY=/usr/lib64/liblapacke.so \
-DBUILD_PLUGIN_FORMAT_VST3=ON -DBUILD_PLUGIN_FORMAT_LV2=ON
cmake --build cmake-build %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{_libdir}/vst
install /home/abuild/.vst/* %{buildroot}%{_libdir}/vst/
mkdir -p %{buildroot}%{_libdir}/vst3
cp -r /home/abuild/.vst3/*.vst3 %{buildroot}%{_libdir}/vst3/
mkdir -p %{buildroot}%{_libdir}/lv2
cp -r /home/abuild/.lv2/*.lv2 %{buildroot}%{_libdir}/lv2/
%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
%changelog