File zrythm.spec of Package zrythm

#
# spec file for package zrythm
#
# Copyright (c) 2020 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/
#

%bcond_without carla

%define completionsdir %(pkg-config --variable=completionsdir bash-completion)

Name:           zrythm
Version:        1.0.0
Release:        0
Summary:        A digital audio workstation designed to be featureful and easy to use
License:        AGPL-3.0
URL:            https://www.zrythm.org/en/
Source0:        v1.0.0-alpha.26.0.13.tar.gz
Patch0:         rtmidi-5.0.patch
BuildRequires:  fftw3-mpi-devel
BuildRequires:  fftw3-openmp-devel
BuildRequires:  fftw3-threads-devel
BuildRequires:  gcc-c++
BuildRequires:  flex
BuildRequires:  git-core
BuildRequires:  help2man
BuildRequires:  meson >= 0.57.0
BuildRequires:  pkgconfig
BuildRequires:  xdg-utils
BuildRequires:  fish
BuildRequires:  libbacktrace-devel
BuildRequires:  libsoundio-devel
BuildRequires:  sassc
#BuildRequires:  pkgconfig(libadwaita-1)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(audec) >= 0.2.1
BuildRequires:  pkgconfig(bash-completion)
%if %{with carla}
BuildRequires:  pkgconfig(carla-standalone)
%endif
BuildRequires:  pkgconfig(fftw3)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(gtksourceview-4)
#%if 0%{?suse_version} >= 1550
#BuildRequires:  pkgconfig(guile-3.0)
#%else
BuildRequires:  pkgconfig(guile-2.2)
#%endif
BuildRequires:  pkgconfig(jack)
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavformat)
BuildRequires:  pkgconfig(libavutil)
BuildRequires:  pkgconfig(libcgraph)
BuildRequires:  pkgconfig(libchromaprint)
BuildRequires:  pkgconfig(libcyaml) >= 1.1.0
BuildRequires:  pkgconfig(libgtop-2.0)
BuildRequires:  pkgconfig(libzstd)
BuildRequires:  pkgconfig(lilv-0) >= 0.24.6
BuildRequires:  pkgconfig(lv2) >= 1.16.0
BuildRequires:  pkgconfig(reproc)
BuildRequires:  pkgconfig(rtaudio) >= 5.1.0
BuildRequires:  pkgconfig(rtmidi)
BuildRequires:  pkgconfig(libpipewire-0.3)
BuildRequires:  pkgconfig(rubberband)
BuildRequires:  pkgconfig(samplerate)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(json-glib-1.0)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(vamp)
BuildRequires:  pkgconfig(sndfile)
BuildRequires:  pkgconfig(libxxhash)

%description
Zrythm is a digital audio workstation designed to be featureful and easy to use. It allows limitless automation through curves, LFOs and envelopes, supports multiple plugin formats including LV2, VST2 and VST3, works with multiple backends including JACK, RtAudio/RtMidi and SDL2, assists with chord progressions via a special Chord Track and chord pads.

%prep
#%%autosetup -p1 -D -T 0 -n zrythm-1.0.0-alpha.26.0.13
%autosetup -p1 -n zrythm-1.0.0-alpha.26.0.13

%build
%define _lto_cflags %{nil}
%meson \
  -Dfallback_version="%{version}" \
  -Dffmpeg=enabled \
  -Drtmidi=enabled \
  -Drtaudio=enabled \
  -Dopus=true \
  -Dsdl=enabled \
  %if %{with carla}
  -Dcarla=enabled \
  %else
  -Dcarla=disabled \
  %endif
  %if %{with lsp}
  -Dlsp_dsp=enabled \
  %else
  -Dlsp_dsp=disabled \
  %endif
  -Djack=enabled \
  -Dgraphviz=enabled \
  -Dguile=enabled
%meson_build

%install
%meson_install
%find_lang %{name}

# if [ "x%{completionsdir}" != "x%{_sysconfdir}/bash_completion.d" ] ; then
#   mkdir -p %{buildroot}%{completionsdir}
#   mv %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} %{buildroot}%{completionsdir}/%{name}
# fi
#rm -rv %{buildroot}%{_includedir} %{buildroot}%{_libdir}/libbacktrace*

%files -f %{name}.lang
%license COPYING*
%doc AUTHORS *.md THANKS
%{_datadir}/%{name}/
%{_datadir}/fonts/%{name}/
%{_bindir}/%{name}*
%{completionsdir}/%{name}
%{_datadir}/applications/org.zrythm.Zrythm.desktop
%{_datadir}/glib-2.0/schemas/org.zrythm.Zrythm.gschema.xml
%{_datadir}/icons/hicolor/scalable/apps/zrythm.svg
%{_datadir}/mime/packages/org.zrythm.Zrythm-mime.xml
%{_datadir}/fish/vendor_completions.d/zrythm.fish
%{_mandir}/man1/zrythm.1%{?ext_man}
%dir /usr/lib/zrythm/
%if %{with carla}
/usr/lib/zrythm/carla/
%endif

%changelog
openSUSE Build Service is sponsored by