File vitling-crypt.spec of Package vitling-crypt

#
# spec file for package vitling-crypt
#
# Copyright (c) 2025 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/
#

%define _binname Crypt2

Name:           vitling-crypt
Version:        2.1.0+git.0.58d92bf
Release:        0
Summary:        Hyper-Unison Synthesiser from Bow Church/Vitling 
License:        GPL-3.0-only
URL:            https://github.com/vitling/crypt
Source0:        %{name}-%{version}.tar.gz
Patch0:         crypt-cmakelists.patch
Patch1:         crypt-fix-type-cast.patch
BuildRequires:  JUCE7_12-devel
BuildRequires:  Mesa-libGL-devel
BuildRequires:  cmake
%if 0%{?is_opensuse} && 0%{?suse_version} < 1600
BuildRequires:  gcc12
BuildRequires:  gcc12-c++
%else
BuildRequires:  gcc-c++
%endif
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)

%description
Crypt is a software synthesiser plugin designed for creating spacious cold hyper-unisoned synth sounds;
developed by Vitling for the Bow Church project.

%package -n vst-%{name}
Summary:        Hyper-Unison Synthesiser from Bow Church/Vitling (VST)

%description -n vst-%{name}
Crypt is a software synthesiser plugin designed for creating spacious cold hyper-unisoned synth sounds;
developed by Vitling for the Bow Church project.

%package -n vst3-%{name}
Summary:        Hyper-Unison Synthesiser from Bow Church/Vitling (VST3)

%description -n vst3-%{name}
Crypt is a software synthesiser plugin designed for creating spacious cold hyper-unisoned synth sounds;
developed by Vitling for the Bow Church project.

%package -n lv2-%{name}
Summary:        Hyper-Unison Synthesiser from Bow Church/Vitling (LV2)

%description -n lv2-%{name}
Crypt is a software synthesiser plugin designed for creating spacious cold hyper-unisoned synth sounds;
developed by Vitling for the Bow Church project.

%prep
%autosetup -p1

%build
%cmake \
%if 0%{?is_opensuse} && 0%{?suse_version} < 1600
       -DCMAKE_CXX_COMPILER=g++-12 \
%endif
       -DCMAKE_SKIP_BUILD_RPATH=ON
%cmake_build

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

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

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

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

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

%changelog
openSUSE Build Service is sponsored by