# Conditional build:
%bcond_without lash # LASH support (GPL)
%bcond_with midishare # MidiShare support
+%bcond_without pipewire # pipewire support
%bcond_without portaudio # portaudio support
%bcond_without readline # readline line editing (GPL)
%bcond_without systemd # systemd notify support
Summary: FluidSynth - a software, real-time synthesizer
Summary(pl.UTF-8): FluidSynth - programowy syntezator działający w czasie rzeczywistym
Name: fluidsynth
-Version: 2.1.1
+Version: 2.3.4
Release: 1
%if %{with lash} || %{with readline}
License: GPL v2+ (enforced by lash/readline), LGPL v2+ (fluidsynth itself)
Group: Applications/Sound
#Source0Download: https://github.com/FluidSynth/fluidsynth/releases
Source0: https://github.com/FluidSynth/fluidsynth/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 165902909092c818a24517de6a4f2f83
-URL: http://www.fluidsynth.org/
+# Source0-md5: 9e6f11b3a0b9981273e4d1fdadcd9533
+URL: https://www.fluidsynth.org/
+BuildRequires: SDL2-devel >= 2
BuildRequires: alsa-lib-devel >= 0.9.1
-BuildRequires: cmake >= 3.1.0
+BuildRequires: cmake >= 3.13
BuildRequires: dbus-devel >= 1.0.0
BuildRequires: gettext-tools
-BuildRequires: glib2-devel >= 1:2.6.5
+BuildRequires: glib2-devel >= 1:2.26.0
BuildRequires: jack-audio-connection-kit-devel
BuildRequires: ladspa-devel
%{?with_lash:BuildRequires: lash-devel >= 0.3}
# OpenMP 4.0
BuildRequires: libgomp-devel >= 6:4.9
-BuildRequires: libinstpatch >= 1.1.0
+BuildRequires: libinstpatch-devel >= 1.1.0
BuildRequires: libsndfile-devel >= 1.0.18
%{?with_midishare:BuildRequires: midishare-devel}
BuildRequires: pkgconfig
+%{?with_pipewire:BuildRequires: pipewire-devel >= 0.3}
%{?with_portaudio:BuildRequires: portaudio-devel >= 19}
BuildRequires: pulseaudio-devel >= 0.9.8
%{?with_readline:BuildRequires: readline-devel}
BuildRequires: rpmbuild(macros) >= 1.213
%{?with_systemd:BuildRequires: systemd-devel >= 1:209}
Requires: alsa-lib >= 0.9.1
-Requires: glib2 >= 1:2.6.5
+Requires: glib2 >= 1:2.26.0
Requires: libsndfile >= 1.0.18
Suggests: soundfont-fluid
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Requires: %{name} = %{version}-%{release}
Requires: alsa-lib-devel >= 0.9.1
Requires: dbus-devel >= 1.0.0
-Requires: glib2-devel >= 1:2.6.5
+Requires: glib2-devel >= 1:2.26.0
Requires: jack-audio-connection-kit-devel
%{?with_lash:Requires: lash-devel >= 0.3}
Requires: libsndfile-devel >= 1.0.18
%{?with_midishare:Requires: midishare-devel}
-Requires: portaudio-devel >= 19
+%{?with_pipewire:Requires: pipewire-devel >= 0.3}
+%{?with_portaudio:Requires: portaudio-devel >= 19}
Requires: pulseaudio-devel >= 0.9.8
%{?with_readline:Requires: readline-devel}
-Obsoletes: fluidsynth-devel < 2
+Obsoletes: fluidsynth-static < 2
%description devel
This package contains the header files necessary to develop
%setup -q
%build
-mkdir -p build
-cd build
-%cmake .. \
+%cmake -B build \
-Denable-midishare=%{with midishare} \
-Denable-lash=%{with lash} \
+ %{!?with_pipewire:-Denable-pipewire=OFF} \
-Denable-portaudio=%{with portaudio} \
-Denable-readline=%{with readline} \
%{!?with_systemd:-Denable-systemd=OFF}
-# define missing in autotools suite
-echo '#define DEFAULT_SOUNDFONT "%{_datadir}/soundfonts/default.sf2"' >> src/config.h
-
-%{__make}
+%{__make} -C build
%install
rm -rf $RPM_BUILD_ROOT
-cd build
-%{__make} install \
+%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
%clean
%doc AUTHORS README.md THANKS TODO
%attr(755,root,root) %{_bindir}/fluidsynth
%attr(755,root,root) %{_libdir}/libfluidsynth.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libfluidsynth.so.2
+%attr(755,root,root) %ghost %{_libdir}/libfluidsynth.so.3
%{_mandir}/man1/fluidsynth.1*
%files devel
%{_includedir}/fluidsynth.h
%{_includedir}/fluidsynth
%{_pkgconfigdir}/fluidsynth.pc
+%{_libdir}/cmake/fluidsynth