File ardour.spec of Package ardour

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

Summary:	Multichannel Digital Audio Workstation
Name:		ardour
%define 	versioned_name %{name}7
Version:	8.6+1~git20240414.c9c419213f
Release:	0
Source0:	https://github.com/Ardour/ardour/archive/%{version}.tar.gz#/%{name}-%{version}.tar.xz
Source3:	%{name}-rpmlintrc
Patch:		ardour-always_internal_libaaf.patch
URL:		http://ardour.org
License:	GPL-2.0
Group:		Productivity/Multimedia/Sound/Editors and Convertors
BuildRequires:  hicolor-icon-theme
BuildRequires:	alsa-devel
BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	boost-devel
BuildRequires:	clang-devel lld
BuildRequires:	curl-devel
BuildRequires:	dbus-1-devel
BuildRequires:	fdupes
BuildRequires:	fftw3-devel
BuildRequires:	fftw3-threads-devel
BuildRequires:	flac-devel
BuildRequires:	fluidsynth-devel
BuildRequires:	gcc-c++
BuildRequires:	gettext-devel
BuildRequires:	git
BuildRequires:	glib2-devel
BuildRequires:	glibmm2-devel
BuildRequires:	graphviz-devel
BuildRequires:	gtk2-devel
BuildRequires:	gtkmm2-devel
BuildRequires:	jack-devel
BuildRequires:	libarchive-devel
BuildRequires:	libart_lgpl-devel
BuildRequires:	libaubio-devel >= 0.4
BuildRequires:	libavtp-devel
BuildRequires:	libcppunit-devel
BuildRequires:	libcurl-devel
BuildRequires:	libcwiid-devel
BuildRequires:	libgthread-2_0-0
BuildRequires:	libhidapi-devel
BuildRequires:	libjack-devel
BuildRequires:	liblilv-0-devel
BuildRequires:	liblo-devel
BuildRequires:	liblo-devel
BuildRequires:	liblrdf-devel
BuildRequires:	libltc-devel
BuildRequires:	libogg-devel
BuildRequires:	libpulse-devel
BuildRequires:	librubberband-devel
BuildRequires:	libsamplerate-devel
BuildRequires:	serd-devel
BuildRequires:	libsndfile-devel
BuildRequires:	sord-devel
BuildRequires:	sratom-devel
BuildRequires:	suil-devel
BuildRequires:	libwebsockets-devel
BuildRequires:	libtag-devel
BuildRequires:	libtool
BuildRequires:	libusb-devel
BuildRequires:	libuuid-devel
BuildRequires:	libxml2-devel
BuildRequires:	libxslt-devel
BuildRequires:	lv2-devel
BuildRequires:	openssl-devel
BuildRequires:	pkgconfig
#BuildRequires:	portaudio-devel
BuildRequires:	python3
BuildRequires:	python3-rdflib
BuildRequires:	python3-xml
BuildRequires:	qm-dsp-devel
BuildRequires:	raptor-devel
BuildRequires:	soundtouch-devel
BuildRequires:	update-desktop-files itstool
BuildRequires:	vamp-plugin-sdk-devel
BuildRequires:	zita-resampler-devel
BuildRequires:	zita-convolver-devel
Requires: 	gtk2-theme-clearlooks
Requires: 	suil-plugin-x11-in-gtk2
Requires: 	suil-plugin-qt5-in-gtk2
Recommends: 	xjadeo harvid
Conflicts:	ardour2-vst ardour2 ardour3 ardour4

%description
Ardour is a multichannel hard disk recorder (HDR) and digital audio
workstation (DAW). It is capable of simultaneous recording 24 or more
channels of 32 bit audio at 48kHz. Ardour is intended to function as a
"professional" HDR system, replacing dedicated hardware solutions such
as the Mackie HDR, the Tascam 2424 and more traditional tape systems
like the Alesis ADAT series. It is also intended to provide the same
or better functionality as software systems such as ProTools,
Samplitude, Logic Audio, Nuendo and Cubase VST (we acknowledge these
and all other names as trademarks of their respective owners). It
supports MIDI Machine Control, and so can be controlled from any MMC
controller, such as the Mackie Digital 8 Bus mixer and many other
modern digital mixers.

%prep
%autosetup -p1
GITVERSION="$(git describe)"
echo "#include \"ardour/revision.h\"" > libs/ardour/revision.cc
echo "namespace ARDOUR { const char* revision = \"${GITVERSION}\"; }" >> libs/ardour/revision.cc

%build
# use with "--use-lld" in configure
export CC="clang"
export CXX="clang++"
export CFLAGS="-w -v -O3 -fPIC -flto=thin -pipe -I%{_includedir}/lv2/core"
export CXXFLAGS="${CFLAGS}"
export FFLAGS="${CFLAGS}"
export LDFLAGS="-v -fPIC -flto=thin -fuse-ld=lld -Wl,--gc-sections -Wl,-O1 -Wl,--icf=safe %{?jobs:-Wl,--thinlto-jobs=%{jobs}}"
export LD="lld"
alias ld=ld.lld
python3 ./waf configure \
    --prefix=%{_prefix} --configdir=%{_sysconfdir} --libdir=%{_libdir} --includedir=%{_includedir} \
    --internal-shared-libs --use-external-libs --libjack=weak \
    --noconfirm --no-phone-home --freedesktop \
    --optimize --cxx11 --use-lld || \
    cat build/config.log
python3 ./waf %{?jobs:-j%{jobs}}

%install
python3 ./waf install --destdir=%{buildroot}
%suse_update_desktop_file -i %{name} AudioVideo Recorder
%fdupes -s %{buildroot}/%{_datadir}


%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc README 
%license COPYING
%{_sysconfdir}/%{name}*
%{_bindir}/*
%{_libdir}/%{name}*
%{_datadir}/%{name}*
%{_datadir}/icons/hicolor/*
%{_datadir}/pixmaps/*.*
%dir %{_datadir}/appdata
%{_datadir}/appdata/*.xml
%{_datadir}/applications/*.desktop
%dir %{_datadir}/mime/packages
%{_datadir}/mime/packages/*.xml
openSUSE Build Service is sponsored by