File ysfx.spec of Package ysfx

#
# spec file for package ysfx
#
# Copyright (c) 2024 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:           ysfx
Version:        0.0.39+git.0.cb64fd1
Release:        0
Summary:        Hosting plugin for Reaper(r) JSFX plugins
License:        Apache-2.0
URL:            https://github.com/jpcima/ysfx
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  JUCE8_04-devel JUCE8_04-juceaide
BuildRequires:  Mesa-libGL-devel
BuildRequires:  cmake
BuildRequires:  fontconfig-devel
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)
Obsoletes:      %{name} <= 20220731

%description
Plugin which can act as a JSFX host in a digital audio workstation.
This project is not the work of Cockos, Inc; however, it is based on several free and open source components from the WDL.
Originally, this project was based on jsusfx by Pascal Gauthier, but then it became an entire rewrite made from scratch.

This package is built from this updated fork: https://github.com/JoepVanlier/ysfx

%package -n vst-%{name}
Summary:        Hosting plugin for JSFX (VST)
Obsoletes:      vst-%{name} <= 20220731

%description -n vst-%{name}
Plugin which can act as a JSFX host in a digital audio workstation.
This project is not the work of Cockos, Inc; however, it is based on several free and open source components from the WDL.
Originally, this project was based on jsusfx by Pascal Gauthier, but then it became an entire rewrite made from scratch.

This package is built from this updated fork: https://github.com/JoepVanlier/ysfx

%package -n clap-%{name}
Summary:        Hosting plugin for JSFX (CLAP)
Obsoletes:      clap-%{name} <= 20220731

%description -n clap-%{name}
Pplugin which can act as a JSFX host in a digital audio workstation.
This project is not the work of Cockos, Inc; however, it is based on several free and open source components from the WDL.
Originally, this project was based on jsusfx by Pascal Gauthier, but then it became an entire rewrite made from scratch.

This package is built from this updated fork: https://github.com/JoepVanlier/ysfx

%package -n vst3-%{name}
Summary:        Hosting plugin for JSFX (VST3)
Obsoletes:      vst3-%{name} <= 20220731

%description -n vst3-%{name}
Pplugin which can act as a JSFX host in a digital audio workstation.
This project is not the work of Cockos, Inc; however, it is based on several free and open source components from the WDL.
Originally, this project was based on jsusfx by Pascal Gauthier, but then it became an entire rewrite made from scratch.

This package is built from this updated fork: https://github.com/JoepVanlier/ysfx

%package devel
Summary:        ysfx development headers and libraries
Obsoletes:      %{name}-devel <= 20220731

%description devel
This package contains ysfx.h development headers and static libraries.

%prep
%setup -q

sed -i -e 's/FORMATS VST3 AU/FORMATS VST3 VST/' cmake.plugin.txt

%build
%cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON -DYSFX_PLUGIN_USE_SYSTEM_JUCE=ON -DYSFX_PLUGIN_COPY=OFF
%cmake_build

%install
mkdir -p %{buildroot}%{_libdir}/vst
install build/ysfx_{plugin,plugin_instrument}_artefacts/RelWithDebInfo/VST/* %{buildroot}%{_libdir}/vst/
mkdir -p %{buildroot}%{_libdir}/vst3
cp -r build/ysfx_{plugin,plugin_instrument}_artefacts/RelWithDebInfo/VST3/*.vst3 %{buildroot}%{_libdir}/vst3/
mkdir -p %{buildroot}%{_libdir}/clap
cp -r build/ysfx_{plugin,plugin_instrument}_artefacts/RelWithDebInfo/CLAP/* %{buildroot}%{_libdir}/clap/


mkdir -p %{buildroot}%{_includedir}
install -m 644 include/ysfx.h %{buildroot}%{_includedir}/
install -m 644 build/libysfx.a %{buildroot}%{_libdir}/

%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 clap-%{name}
%{_libdir}/clap/
%doc README.md
%license LICENSE

%files devel
%{_includedir}/ysfx.h
%{_libdir}/libysfx.a

%changelog
openSUSE Build Service is sponsored by