Name:          fluidsynth
Version:       2.2.7
Release:       1
Summary:       Real-time software synthesizer
License:       LGPLv2+
URL:           http://www.fluidsynth.org/
Source0:       https://github.com/Fluidsynth/fluidsynth/archive/v%{version}/fluidsynth-%{version}.tar.gz

BuildRequires: alsa-lib-devel cmake dbus-devel gcc jack-audio-connection-kit-devel readline-devel
BuildRequires: ladspa-devel ncurses-devel libsndfile-devel pkgconfig pulseaudio-libs-devel doxygen
BuildRequires: g++ make
Provides:      fluidsynth-libs = %{version}-%{release}
Obsoletes:     fluidsynth-libs < %{version}-%{release}

%description
FluidSynth is a free software synthesizer. Its currently based on the SoundFont
2 specifications and supports real time MIDI effect controls. It can be used as a
shared library for embedding in other applications, can play MIDI files and has
a command line shell. Many other applications use FluidSynth for audio synthesis.

%package devel
Summary:       Provides development package for fluidsynth
Requires:      fluidsynth-libs = %{version}-%{release}

%description devel
This package holds header files for building programs that link against fluidsynth.

%package help
Summary:       Provides man-pages for fluidsynth

%description help
This package holds help documents for fluidsynth

%prep
%autosetup -n %{name}-%{version} -p1

%build
mkdir -p %{_target_platform}
cd %{_target_platform}
%{cmake} -Denable-ladspa=on ..
cd ..
%make_build -C %{_target_platform}
make doxygen -C %{_target_platform}/doc

%install
%make_install -C %{_target_platform}

%files
%{_bindir}/fluid*
%doc AUTHORS LICENSE
%{_libdir}/libfluidsynth.so.3*

%files devel
%doc %{_target_platform}/doc/api/html  doc/*fluid*.txt doc/*.odt ChangeLog
%{_includedir}/fluidsynth.h
%{_includedir}/fluidsynth/
%{_libdir}/libfluidsynth.so
%{_libdir}/pkgconfig/*

%files help
%{_mandir}/man1/fluidsynth*
%doc README.md THANKS TODO

%changelog
* Wed Jun 15 2022 wulei <wulei80@h-partners.com> - 2.2.7-1
- Upgrade to 2.2.7

* Thu May 13 2021 wangxiao <wangxiao65@huawei.com> - 1.1.11-4
- Fix CVE-2021-21417

* Fri Nov 22 2019 sunguoshuai <sunguoshuai@huawei.com> - 1.1.11-3
- Package init.