%global gituser libsidplayfp
%global gitname libsidplayfp
Name: libsidplayfp
Version: 2.13.1
Release: 2%{?dist}
Summary: SID chip music module playing library
License: GPLv2+
URL: https://github.com/%{gituser}/%{gitname}
Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc-c++ doxygen libftdi-c++-devel libgcrypt-devel libtool
BuildRequires: devscripts
%description
This library provides support for playing SID music modules originally
created on Commodore 64 and compatibles. It contains a processing engine
for MOS 6510 machine code and MOS 6581 Sound Interface Device (SID)
chip output. It is used by music player programs like SIDPLAY and
several plug-ins for versatile audio players.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
These are the files needed for compiling programs that use %{name}.
%package devel-doc
Summary: API documentation for %{name}
BuildArch: noarch
%description devel-doc
This package contains API documentation for %{name}.
%prep
%setup -q
# remove unneeded argument to fix c++23
# sed -i "s|$(echo -ne "\t")xSfw_dlclose(dlhandle)|$(echo -ne "\t")xSfw_dlclose()|" src/builders/exsid-builder/driver/exSID_ftdiwrap.c
doxygen -u Doxyfile.in
rm -r aclocal.m4 build-aux
autoreconf -ivf
%build
%configure --disable-static --with-simd=sse4
make %{_smp_mflags} all doc
%install
# no fortify source functions
hardening-check -v --nobranchprotection src/.libs/libsidplayfp.so.6.*
%make_install INSTALL="install -p"
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%ldconfig_scriptlets
%files
%doc AUTHORS NEWS README TODO
%license COPYING
%{_libdir}/libsidplayfp.so.6*
%{_libdir}/libstilview.so.0*
%files devel
%{_libdir}/libsidplayfp.so
%{_libdir}/libstilview.so
%{_includedir}/sidplayfp/
%{_includedir}/stilview/
%{_libdir}/pkgconfig/*.pc
%files devel-doc
%doc docs/html
%changelog
* Tue Apr 30 2025 samoht0 2.13.1
- use SIMD SSE4
* Fri Apr 25 2025 samoht0 2.13.1
- update 2.13.1
- spec and history cleanup