File pMix.spec of Package pMix

#
# spec file for package juce
#
# 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:           pMix
Version:        0.0.3
Release:        0
Summary:        A preset interpolator, plug-in chainer and Faust IDE written with JUCE
License:        GPL-3.0-only
Group:          Productivity/Multimedia/Sound/Midi
URL:            https://github.com/olilarkin/pMix2/
Source0:        pMix2-0-0-3.tar.gz
Source1:	juce_faustllvm_master.zip
Source2:	pMix.jucer
Source3:	pMix.desktop
Patch0:		FaustGenFactory_h.patch
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(webkit2gtk-4.0)
BuildRequires:  pkgconfig(gtk+-x11-3.0)
BuildRequires:	libjack-devel
BuildRequires:	libcurl-devel
BuildRequires:	ladspa-devel
BuildRequires:	JUCE-devel
BuildRequires:	JUCE-Projucer
BuildRequires:  xorg-x11-server
BuildRequires:  llvm-devel
BuildRequires:  faust-devel
BuildRequires:  unzip

Requires:		alsa

%description

https://github.com/olilarkin/pMix2/
pMix (short for preset mixer) is a sound design, composition and performance tool that facilitates the control of multiple parameters using an intuitive graphical interface.
It includes a graphical patcher for creating a network of audio synthesis or processing nodes. A node could be a VST2, VST3, AU or LADSPA plug-in or it could a JIT compiled FAUST script.
FAUST is a first class citizen in pMix and an integrated code editor and SVG display makes it a nice environment for FAUST development.

%prep
%setup -qn pMix2-0-0-3
unzip %{SOURCE1}
mv juce_faustllvm-master juce_faustllvm
cp %{SOURCE2} .
%patch0
%build


%define X_display ":98"


#############################################
### Launch a virtual framebuffer X server ###
#############################################
export DISPLAY=%{X_display}
Xvfb %{X_display} >& Xvfb.log &
trap "kill $! || true" EXIT
sleep 10

Projucer --set-global-search-path linux defaultJuceModulePath /usr/share/juce/modules
Projucer --resave %{name}.jucer

cd Builds/LinuxMakefile
TARGET_ARCH=-Wl,--as-needed CONFIG=Release make %{?_smp_mflags}

%install
mkdir -p %{buildroot}%{_bindir}
install Builds/LinuxMakefile/build/%{name} %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/512x512/apps
install BinaryData/pMix.png  %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/
mkdir -p %{buildroot}%{_datadir}/applications
install %{SOURCE3} %{buildroot}%{_datadir}/applications/

%files 
%{_bindir}/
%dir %{_datadir}/icons/hicolor/512x512/apps/
%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
%dir %{_datadir}/applications/
%{_datadir}/applications/%{name}.desktop

%license GPL.txt
%doc README.md
%changelog
openSUSE Build Service is sponsored by