File MIDI-Transformer.spec of Package MIDI-Transformer
#
# spec file for package MIDI-Transformer
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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: MIDI-Transformer
Version: 1.0.0+git.20211026
Release: 0
Summary: Plugin for transforming and bending MIDI inputs
License: MIT
Group: Productivity/Multimedia/Sound/Midi
URL: https://github.com/austensatterlee/MIDI-Transformer
Source0: https://github.com/austensatterlee/MIDI-Transformer/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: generate-lv2-ttl.py
Source2: LV2.mak.in
Source3: AppConfig.h.in
BuildRequires: gcc-c++
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(freetype2)
BuildRequires: Mesa-libGL-devel
BuildRequires: libXrandr-devel
BuildRequires: libXcursor-devel
BuildRequires: libjack-devel
BuildRequires: libcurl-devel
BuildRequires: ladspa-devel
BuildRequires: JUCE6-devel
BuildRequires: JUCE6-Projucer
BuildRequires: lv2-devel
BuildRequires: python3
%description
MIDI-Transformer is a simple plugin that allows you to transform and reroute incoming MIDI signals.
%package -n vst3-%{name}
Summary: Plugin for transforming and bending MIDI inputs (VST3)
%description -n vst3-%{name}
MIDI-Transformer is a simple plugin that allows you to transform and reroute incoming MIDI signals.
%package -n vst-%{name}
Summary: Plugin for transforming and bending MIDI inputs (VST)
%description -n vst-%{name}
MIDI-Transformer is a simple plugin that allows you to transform and reroute incoming MIDI signals.
%package -n lv2-%{name}
Summary: Plugin for transforming and bending MIDI inputs (LV2)
%description -n lv2-%{name}
MIDI-Transformer is a simple plugin that allows you to transform and reroute incoming MIDI signals.
%prep
%setup -q
%autopatch -p0
cp -f %{SOURCE3} JuceLibraryCode/
cp %{SOURCE2} .
cp %{SOURCE1} .
sed -i -e 's/buildAU/buildVST/' %{name}.jucer
sed -i -e 's/useAppConfig="0"/useAppConfig="1"/' %{name}.jucer
sed -i -e 's/JUCEOPTIONS/JUCEOPTIONS JUCE_JACK="1" JUCE_WEB_BROWSER="0" JUCE_USE_CURL="0"/' %{name}.jucer
%build
lv2uri=%{URL}
sed "s/_lv2uri_pattern_/${lv2uri//\//\\/}/g" JuceLibraryCode/AppConfig.h.in >JuceLibraryCode/AppConfig.h
sed "s/_juce_target_/%{name}/g" LV2.mak.in >LV2.mak
%define JUCE_VERSION `ls /usr/lib64/juce/include/`
Projucer --set-global-search-path linux defaultJuceModulePath %{_libdir}/juce/include/%{JUCE_VERSION}/modules
Projucer --resave %{name}.jucer
echo "include ../../LV2.mak" >> Builds/LinuxMakefile/Makefile
cd Builds/LinuxMakefile
CONFIG=Release make %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{_bindir}
install Builds/LinuxMakefile/build/%{name} %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_libdir}/vst
install Builds/LinuxMakefile/build/%{name}.so %{buildroot}%{_libdir}/vst/
mkdir -p %{buildroot}%{_libdir}/vst3
cp -r Builds/LinuxMakefile/build/*.vst3 %{buildroot}%{_libdir}/vst3/
mkdir -p %{buildroot}%{_libdir}/lv2
cp -r Builds/LinuxMakefile/build/*.lv2 %{buildroot}%{_libdir}/lv2/
%files
%{_bindir}/%{name}
%doc README.md
%license LICENSE
%files -n vst-%{name}
%dir %{_libdir}/vst
%{_libdir}/vst/%{name}.so
%doc README.md
%license LICENSE
%files -n vst3-%{name}
%dir %{_libdir}/vst3
%{_libdir}/vst3/*
%doc README.md
%license LICENSE
%files -n lv2-%{name}
%dir %{_libdir}/lv2
%{_libdir}/lv2/*
%doc README.md
%license LICENSE
%changelog