File sonobus.spec of Package sonobus
#
# spec file for package sonobus
#
# 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: sonobus
Version: 1.7.2
Release: 0
Summary: Real-time network audio streaming collaboration tool
License: GPL-3.0-only
Group: Productivity/Multimedia/Sound/Midi
URL: https://github.com/essej/sonobus
Source0: https://github.com/essej/sonobus/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.xz
Source1: juce_VSTInterface.h
Patch99: JUCE7-Use-old-JUCE-VST2-interface.patch
BuildRequires: Mesa-libGL-devel
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: ladspa-devel
BuildRequires: libXcursor-devel
BuildRequires: libXrandr-devel
BuildRequires: libcurl-devel
BuildRequires: libjack-devel
BuildRequires: libopus-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xinerama)
%description
SonoBus is an easy to use application for streaming high-quality, low-latency peer-to-peer audio between devices over the internet or a local network.
%package -n vst3-%{name}
Summary: Real-time network audio streaming collaboration tool (VST3)
Obsoletes: vst3-SonoBus
%description -n vst3-%{name}
SonoBus is an easy to use application for streaming high-quality, low-latency peer-to-peer audio between devices over the internet or a local network.
%package -n vst-%{name}
Summary: Real-time network audio streaming collaboration tool (VST)
%description -n vst-%{name}
SonoBus is an easy to use application for streaming high-quality, low-latency peer-to-peer audio between devices over the internet or a local network.
%package -n lv2-%{name}
Summary: Real-time network audio streaming collaboration tool (LV2)
%description -n lv2-%{name}
SonoBus is an easy to use application for streaming high-quality, low-latency peer-to-peer audio between devices over the internet or a local network.
%prep
%setup -q
%patch -P 99 -p1 -d deps/juce
cp %{SOURCE1} deps/juce/modules/juce_audio_processors/format_types/
%build
%cmake -DVST2_SDK_PATH=/usr/include
%cmake_build
%install
mkdir -p %{buildroot}%{_bindir}
install build/SonoBus_artefacts/RelWithDebInfo/Standalone/sonobus %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_libdir}/vst3
cp -r build/SonoBus_artefacts/RelWithDebInfo/VST3/*.vst3 %{buildroot}%{_libdir}/vst3/
cp -r build/SonoBusInst_artefacts/RelWithDebInfo/VST3/*.vst3 %{buildroot}%{_libdir}/vst3/
mkdir -p %{buildroot}%{_libdir}/lv2
cp -r build/SonoBus_artefacts/RelWithDebInfo/LV2/*.lv2 %{buildroot}%{_libdir}/lv2/
mkdir -p %{buildroot}%{_libdir}/vst
cp -r build/SonoBus_artefacts/RelWithDebInfo/VST/*.so %{buildroot}%{_libdir}/vst/
mkdir -p %{buildroot}%{_datadir}/applications
cp linux/sonobus.desktop %{buildroot}%{_datadir}/applications/
mkdir -p %{buildroot}%{_datadir}/pixmaps
cp images/sonobus_logo@2x.png %{buildroot}%{_datadir}/pixmaps/sonobus.png
%files
%{_bindir}/%{name}
%doc README.md
%license LICENSE
%dir %{_datadir}/applications
%dir %{_datadir}/pixmaps
%{_datadir}/applications/sonobus.desktop
%{_datadir}/pixmaps/sonobus.png
%files -n vst3-%{name}
%dir %{_libdir}/vst3
%{_libdir}/vst3/*
%doc README.md
%license LICENSE
%files -n vst-%{name}
%dir %{_libdir}/vst
%{_libdir}/vst/*
%doc README.md
%license LICENSE
%files -n lv2-%{name}
%dir %{_libdir}/lv2
%{_libdir}/lv2/*
%doc README.md
%license LICENSE
%changelog