A new user interface for you! Read more...

File carla.spec of Package carla

#
# spec file for package carla
#
# Copyright (c) 2016 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 http://bugs.opensuse.org/
#


%if 0%{?suse_version} == 1315
# Leap does not have it
%bcond_with rdflib
%else
%bcond_without rdflib
%endif
Name:           carla
Version:        1.9.6git+20160305.f8933f9
Release:        0
Summary:        An audio plugin host
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Utilities
Url:            http://kxstudio.sourceforge.net/cadence
Source:         %{name}-%{version}.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  alsa-devel
BuildRequires:  file-devel
BuildRequires:  python-qt4-devel

%if %{defined fedora}
BuildRequires:  pulseaudio-libs-devel
BuildRequires:  qt5-qtbase-devel
BuildRequires:  python3-PyQt4-devel
%else
BuildRequires:  libpulse-devel
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  python3-qt4-devel
%endif

%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRequires:  python3-devel
BuildRequires:  update-desktop-files
%if %{with rdflib}
# optional but recommended
BuildRequires:  python3-rdflib
%endif
%endif

# for extra native plugins
BuildRequires:  fftw3-devel
BuildRequires:  fltk-devel
BuildRequires:  fluidsynth-devel
BuildRequires:  zlib-devel
# for plugin GUIs
BuildRequires:  gtk2-devel
BuildRequires:  gtk3-devel
BuildRequires:  libX11-devel
# for extra samplers support
BuildRequires:  liblinuxsampler-devel
BuildRequires:  liblo-devel
BuildRequires:  libqt4-devel
BuildRequires:  mxml-devel
BuildRequires:  pkg-config

%description
 Carla is an audio plugin host, with support for many audio drivers and plugin formats.
It has some nice features like automation of parameters via MIDI CC and full OSC control.
Currently supports LADSPA, DSSI, LV2, VST2/3 and AU plugin formats, plus GIG, SF2 and SFZ
sounds banks.

THIS IS A BETA RELEASE!

1. Carla-Control is not available in the 2.0-beta versions yet
2. Linux release has support for bridging Window plugins using Wine (32bit and 64bit)
3. Linux 32bit release will not load 64bit plugins even if ran on a 64bit system
4. MacOS release is 64bit only but it can load 32bit plugins
5. Windows builds do not support bridges (ie, 32bit plugins on a 64bit Carla) or Carla as a plugin

%package devel
Summary:        Header files to access Carlas API
Group:          Development/Libraries
BuildRequires:  pkg-config

%description devel
This package contains header files needed when writing software using Carla several APIs.

%package vst
Summary:        CarlaRack and CarlaPatchbay vst plugins
Group:          Productivity/Multimedia/Sound/Utilities

%description vst
Carla vst plugins including CarlaPatchbayFX, CarlaPatchbay, CarlaRackFX, CarlaRack

%prep
%setup -q
sed -i -e "s/__DATE__/\"openSUSE\"/" -e "s/__TIME__/\"BuildService\"/" source/native-plugins/zynaddsubfx/main.cpp
sed -i -e "s/__DATE__/\"openSUSE\"/" source/modules/juce_core/time/juce_Time.cpp

%build
export CXXFLAGS="%{optflags}"
export CFLAGS="%{optflags}"

%if 0%{?suse_version}
sed -i 's:pyuic4:py3uic4:' Makefile
sed -i 's:wildcard /:wildcard $(DESTDIR)/:' Makefile
%endif
make %{?_smp_mflags} features

# bulding with high -j numbers often results in build failures, thus we're disabling _smp_flags for now 
%if 0%{?suse_version} > 1310
# make %{?_smp_mflags} --trace
make --trace
%else
# Old make
# make %{?_smp_mflags}
make
%endif

%install
make install DESTDIR=%{buildroot} PREFIX="%{_prefix}" LIBDIR="%{_libdir}"
# Move arch depended files (wrong installed)
mv %{buildroot}%{_datadir}/carla/resources/zynaddsubfx-ui %{buildroot}%{_libdir}/carla
ln -s %{_libdir}/carla/zynaddsubfx-ui %{buildroot}%{_datadir}/carla/resources/zynaddsubfx-ui
# flags
for file in carla_modgui.py carla_settings.py digitalpeakmeter.py pixmapdial.py pixmapkeyboard.py; do
	chmod +x "%{buildroot}%{_datadir}/carla/$file"
done
# SUSE specific
%if 0%{?suse_version}
 %suse_update_desktop_file -r carla AudioVideo Music
 %suse_update_desktop_file -r carla-control AudioVideo Music
 %fdupes -s %{buildroot}%{_datadir}
%endif

%files
%defattr(-,root,root)
%doc INSTALL.md README.md doc
%{_bindir}/*
%dir %{_libdir}/carla
%{_libdir}/carla/*
%dir %{_libdir}/lv2
%dir %{_libdir}/lv2/carla.lv2
%{_libdir}/lv2/carla.lv2/*
%dir %{_libdir}/python3
%dir %{_libdir}/python3/dist-packages
%{_libdir}/python3/dist-packages/*
%dir %{_datadir}/carla
%{_datadir}/carla/*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/
%{_datadir}/mime/packages/carla.xml

%files vst
%defattr(-,root,root)
%dir %{_libdir}/vst
%dir %{_libdir}/vst/carla.vst
%{_libdir}/vst/carla.vst/*

%files devel
%defattr(-,root,root)
%dir %{_includedir}/carla
%{_includedir}/carla/*
%{_libdir}/pkgconfig/*

%changelog