File ZLEqualizer.spec of Package ZLEqualizer

#
# spec file for package ZLEqualizer
#
# Copyright (c) 2024 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/
#

Name:           ZLEqualizer
Version:        0.6.2+git.12.098c351
Release:        0
Summary:        16-band minimum-phase dynamic digital equalizer
License:        GPL-3.0-only
Group:          Productivity/Multimedia/Sound
URL:            https://github.com/ZL-Audio/ZLEqualizer
Source0:        https://github.com/ZL-Audio/ZLEqualizer/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        juce_VSTInterface.h
Patch0:         JUCE8-Use-old-JUCE-VST2-interface.patch
# BuildRequires:  JUCE8_04-devel
BuildRequires:  Mesa-libGL-devel
BuildRequires:  cmake gcc-c++
BuildRequires:  clang clang-devel
BuildRequires:  libXcursor-devel
BuildRequires:  libXrandr-devel
BuildRequires:  libcurl-devel
BuildRequires:  libjack-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(alsa)
BuildRequires:  libboost_headers-devel
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xinerama)

%description
ZL Equalizer is a minimum-phase equalizer plugin with the following key features:
* Multiple Filter Settings: Supports 16 frequency bands, 8 filter types, 5 stereo modes, and 7 variable slopes.
* High-Quality Sound: With 64-bit floating-point processing and de-cramping technique, outstanding performance is ensured in both low-end and high-end.
* Adjustable Dynamics: Adjustable threshold, attack, release, and side-chain frequency, etc.
* Carefully Designed Interface: Interactive spectrum graph, smart collision detection, and smooth animations.
%package -n vst-%{name}
Summary:        16-band minimum-phase dynamic digital equalizer (VST)

%description -n vst-%{name}
ZL Equalizer is a minimum-phase equalizer plugin with the following key features:
* Multiple Filter Settings: Supports 16 frequency bands, 8 filter types, 5 stereo modes, and 7 variable slopes.
* High-Quality Sound: With 64-bit floating-point processing and de-cramping technique, outstanding performance is ensured in both low-end and high-end.
* Adjustable Dynamics: Adjustable threshold, attack, release, and side-chain frequency, etc.
* Carefully Designed Interface: Interactive spectrum graph, smart collision detection, and smooth animations.

%package -n vst3-%{name}
Summary:        16-band minimum-phase dynamic digital equalizer (VST3)

%description -n vst3-%{name}
ZL Equalizer is a minimum-phase equalizer plugin with the following key features:
* Multiple Filter Settings: Supports 16 frequency bands, 8 filter types, 5 stereo modes, and 7 variable slopes.
* High-Quality Sound: With 64-bit floating-point processing and de-cramping technique, outstanding performance is ensured in both low-end and high-end.
* Adjustable Dynamics: Adjustable threshold, attack, release, and side-chain frequency, etc.
* Carefully Designed Interface: Interactive spectrum graph, smart collision detection, and smooth animations.

%package -n lv2-%{name}
Summary:        16-band minimum-phase dynamic digital equalizer (LV2)

%description -n lv2-%{name}
ZL Equalizer is a minimum-phase equalizer plugin with the following key features:
* Multiple Filter Settings: Supports 16 frequency bands, 8 filter types, 5 stereo modes, and 7 variable slopes.
* High-Quality Sound: With 64-bit floating-point processing and de-cramping technique, outstanding performance is ensured in both low-end and high-end.
* Adjustable Dynamics: Adjustable threshold, attack, release, and side-chain frequency, etc.
* Carefully Designed Interface: Interactive spectrum graph, smart collision detection, and smooth animations.

%prep
%setup
cp %{SOURCE1} JUCE/modules/juce_audio_processors/format_types/
%patch -P 0 -d JUCE -p1

sed -i -e 's/COPY_PLUGIN_AFTER_BUILD TRUE/COPY_PLUGIN_AFTER_BUILD FALSE/' CMakeLists.txt
sed -i -e 's/FORMATS LV2 VST3/FORMATS VST VST3 LV2/' CMakeLists.txt
%define _FOOBAR_VERSION %(echo %{version} |awk -F "+" '{ print $1 }')
%define _FOOBAR_HASH %(echo %{version} |awk -F "." '{ print $NF }')

%build

%cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
       -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON \
       -DFOOBAR_VERSION=%{_FOOBAR_VERSION} -DFOOBAR_HASH=%{_FOOBAR_HASH} \
       -DZL_JUCE_FORMATS="VST3;LV2;VST;Standalone" -DZL_JUCE_COPY_PLUGIN=FALSE
%cmake_build

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

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

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

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

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

%changelog
openSUSE Build Service is sponsored by