File vaporizer2.spec of Package vaporizer2

#
# spec file for package vaporizer2
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) Konstantin Voinov konstantin.voinov@gmail.com
#
# 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 VASTvaporizer2

%if %{defined fedora}
%undefine _hardened_build
%global optflags %(echo %{optflags} | sed 's/-Wp,-D_GLIBCXX_ASSERTIONS / /')
%endif
Name:           vaporizer2
Version:        3.5.0+git.11.1c56c4b
Release:        0
Summary:        Wavetable additive, subtractive, synthesizer, sampler workstation plugin
License:        GPL-3.0-only
URL:            https://github.com/VASTDynamics/Vaporizer2
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  JUCE7_09-devel
BuildRequires:  cmake
%if 0%{?is_opensuse} && 0%{?suse_version} <= 1600
BuildRequires:  gcc12
BuildRequires:  gcc12-c++
%else 
BuildRequires:  gcc-c++
%endif
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(fftw3f)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xinerama)
%if %{defined fedora}
BuildRequires:  jack-audio-connection-kit-devel
BuildRequires:  libatomic
%else
BuildRequires:  libjack-devel
%endif
%if %{defined mageia}
BuildRequires:  libatomic-devel
%endif

%description
Vaporizer2 is a hybrid wavetable additive / subtractive VST / LV2 synthesizer / sampler workstation.

The heart of this plugin is the alias-free versatile high-performance wavetable sound engine with low system CPU resource usage.

Vaporizer2 comes with a groundbreaking wavetable editor with a vast number of editing possibilities including frequency shift,
smooth, clean, bend and bloat for single-cycles, parts of single-cycles or even whole wavetables. Featuring an easy-to use
wavetable draw mode with smooth Bezier curves and snap to grid function.

%package data
Summary:        Factory presets and samples for VASTvaporizer2
BuildArch:      noarch
%description data
This is a set of factory default Presets, Tables and Noises for VASTvaporizer2 synth.

%package doc
Summary:        VASTvaporizer2 documentation
BuildArch:      noarch
%description doc
PDF Manual for Vaporizer2 synth.
Placed in the /usr/share/doc/packages/Vaporizer2

%package -n vst-%{name}
Summary:        VASTvaporizer2 synth (VST)

%description -n vst-%{name}
Vaporizer2 is a hybrid wavetable additive / subtractive VST / LV2 synthesizer / sampler workstation.

The heart of this plugin is the alias-free versatile high-performance wavetable sound engine with low system CPU resource usage.

Vaporizer2 comes with a groundbreaking wavetable editor with a vast number of editing possibilities including frequency shift,
smooth, clean, bend and bloat for single-cycles, parts of single-cycles or even whole wavetables. Featuring an easy-to use
wavetable draw mode with smooth Bezier curves and snap to grid function.

%package -n vst3-%{name}
Summary:        VASTvaporizer2 synth (VST3)

%description -n vst3-%{name}
Vaporizer2 is a hybrid wavetable additive / subtractive VST / LV2 synthesizer / sampler workstation.

The heart of this plugin is the alias-free versatile high-performance wavetable sound engine with low system CPU resource usage.

Vaporizer2 comes with a groundbreaking wavetable editor with a vast number of editing possibilities including frequency shift,
smooth, clean, bend and bloat for single-cycles, parts of single-cycles or even whole wavetables. Featuring an easy-to use
wavetable draw mode with smooth Bezier curves and snap to grid function.

%package -n lv2-%{name}
Summary:        VASTvaporizer2 synth (LV2)

%description -n lv2-%{name}
Vaporizer2 is a hybrid wavetable additive / subtractive VST / LV2 synthesizer / sampler workstation.

The heart of this plugin is the alias-free versatile high-performance wavetable sound engine with low system CPU resource usage.

Vaporizer2 comes with a groundbreaking wavetable editor with a vast number of editing possibilities including frequency shift,
smooth, clean, bend and bloat for single-cycles, parts of single-cycles or even whole wavetables. Featuring an easy-to use
wavetable draw mode with smooth Bezier curves and snap to grid function.

%package -n clap-%{name}
Summary:        VASTvaporizer2 synth (CLAP)

%description -n clap-%{name}
Vaporizer2 is a hybrid wavetable additive / subtractive VST / LV2 synthesizer / sampler workstation.

The heart of this plugin is the alias-free versatile high-performance wavetable sound engine with low system CPU resource usage.

Vaporizer2 comes with a groundbreaking wavetable editor with a vast number of editing possibilities including frequency shift,
smooth, clean, bend and bloat for single-cycles, parts of single-cycles or even whole wavetables. Featuring an easy-to use
wavetable draw mode with smooth Bezier curves and snap to grid function.

%package full
Summary:        VASTvaporizer2 synth Full installation
BuildArch:      noarch
Requires: lv2-%{name} vst3-%{name} vst-%{name} clap-%{name} %{name} %{name}-doc %{name}-data
%description full
Meta package which installs Standalone version of VASTvaporizer2 and it's Plugin (VST(3), CLAP and LV2) binaries.


%prep
%autosetup -p1

%build
%cmake -DUSE_SYSTEM_JUCE=ON \
       -DVST2_SDK_LOCATION=/usr/include \
       -DBUILD_SHARED_LIBS:BOOL=OFF \
       -DBUILD_STATIC_LIBS:BOOL=ON \
%if 0%{?is_opensuse} && 0%{?suse_version} <= 1600
       -DCMAKE_CXX_COMPILER=g++-12
%endif

%cmake_build

%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir}/vst
mkdir -p %{buildroot}%{_libdir}/vst3
mkdir -p %{buildroot}%{_libdir}/lv2
mkdir -p %{buildroot}%{_libdir}/clap
%if %{defined fedora}
install redhat-linux-build/%{binname}_artefacts/Release/Standalone/* %{buildroot}%{_bindir}/
cp -r redhat-linux-build/%{binname}_artefacts/Release/VST/*.so %{buildroot}%{_libdir}/vst/
cp -r redhat-linux-build/%{binname}_artefacts/Release/VST3/*.vst3 %{buildroot}%{_libdir}/vst3/
cp -r redhat-linux-build/%{binname}_artefacts/Release/LV2/*.lv2 %{buildroot}%{_libdir}/lv2/
cp -r redhat-linux-build/%{binname}_artefacts/Release/CLAP/*.clap %{buildroot}%{_libdir}/clap/
%else
install build/%{binname}_artefacts/RelWithDebInfo/Standalone/%{binname} %{buildroot}%{_bindir}/
install build/%{binname}_artefacts/RelWithDebInfo/VST/*.so %{buildroot}%{_libdir}/vst/
cp -r build/%{binname}_artefacts/RelWithDebInfo/VST3/*.vst3 %{buildroot}%{_libdir}/vst3/
cp -r build/%{binname}_artefacts/RelWithDebInfo/LV2/*.lv2 %{buildroot}%{_libdir}/lv2/
cp -r build/%{binname}_artefacts/RelWithDebInfo/CLAP/*.clap %{buildroot}%{_libdir}/clap/
%endif

mkdir -p %{buildroot}/%{_datadir}/Vaporizer2
cp -r VASTvaporizer/Presets %{buildroot}/%{_datadir}/Vaporizer2/
cp -r VASTvaporizer/Noises %{buildroot}/%{_datadir}/Vaporizer2/
cp -r VASTvaporizer/Tables %{buildroot}/%{_datadir}/Vaporizer2/

mkdir -p %{buildroot}/%{_docdir}/packages/%{name}
cp Documentation/Vaporizer2Manual.pdf %{buildroot}/%{_docdir}/packages/%{name}/

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

%files data
%{_datadir}/Vaporizer2

%files doc
%dir %{_docdir}/packages
%dir %{_docdir}/packages/%{name}
%{_docdir}/packages/%{name}/Vaporizer2Manual.pdf

%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

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

%files full
%doc README.md
%license LICENSE

%changelog
openSUSE Build Service is sponsored by