libffado/libffado.spec
Nils Philippsen 24eee8bfb7 Don’t build with processor-specific optimizations
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-11-08 22:34:27 +01:00

159 lines
4.6 KiB
RPMSpec

%if ! 0%{?rhel} || 0%{?rhel} > 8
%bcond scons_quirk 0
%else
%bcond scons_quirk 1
%endif
%if %{without scons_quirk}
%global scons scons
%else
%global scons scons-3
%endif
Summary: Free firewire audio driver library
Name: libffado
Version: 2.4.9
Release: %autorelease
# Automatically converted from old format: GPLv2 or GPLv3 - review is highly recommended.
License: GPL-2.0-only OR GPL-3.0-only
URL: http://www.ffado.org/
Source0: http://www.ffado.org/files/%{name}-%{version}.tgz
# The trunk is tarballed as follows:
# bash libffado-snapshot.sh 2088
# The fetch script
Source9: libffado-snapshot.sh
Patch0: libffado-2.4.4-no-test-apps.patch
Patch1: libffado-2.4.4-icon-name.patch
Patch2: libffado-2.4.4-scons-quirk.patch
BuildRequires: alsa-lib-devel
BuildRequires: dbus-c++-devel
BuildRequires: dbus-devel
BuildRequires: python3-dbus
BuildRequires: python3-rpm-macros
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: glibmm24-devel
BuildRequires: graphviz
BuildRequires: libappstream-glib
BuildRequires: libconfig-devel
BuildRequires: libiec61883-devel
BuildRequires: libraw1394-devel
BuildRequires: libxml++-devel
BuildRequires: pkgconfig
BuildRequires: python3-qt5-devel
BuildRequires: python3-devel
%if %{without scons_quirk}
BuildRequires: python3-scons >= 3.0.2
%else
BuildRequires: python3-scons
%endif
BuildRequires: python3dist(setuptools)
BuildRequires: rpm_macro(py3_shebang_fix)
ExcludeArch: s390 s390x
%description
The FFADO project aims to provide a generic, open-source solution for the
support of FireWire based audio devices for the Linux platform. It is the
successor of the FreeBoB project.
%package devel
Summary: Free firewire audio driver library development headers
# Automatically converted from old format: GPLv2 or GPLv3 - review is highly recommended.
License: GPL-2.0-only OR GPL-3.0-only
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files needed to build applications against libffado.
%package -n ffado
Summary: Free firewire audio driver library applications and utilities
# support/tools/* is GPLv3
# Some files in support/mixer-qt4/ffado are GPLv3+
# The rest is GPLv2 or GPLv3
# Automatically converted from old format: GPLv3 and GPLv3+ and (GPLv2 or GPLv3) - review is highly recommended.
License: GPL-3.0-only AND GPL-3.0-or-later AND ( GPL-2.0-only OR GPL-3.0-only )
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: dbus
Requires: python3-dbus
Requires: python3-qt5
%description -n ffado
Applications and utilities for use with libffado.
%prep
%autosetup -N
%patch -P0 -p1 -b .no-test-apps
%patch -P1 -p1 -b .icon-name
%if %{with scons_quirk}
%patch -P2 -p1 -b .scons-quirk
%endif
# Fix Python shebangs
%py3_shebang_fix \
admin/*.py doc/SConscript tests/python/*.py tests/*.py \
support/mixer-qt4/ffado-mixer* support/mixer-qt4/SConscript \
support/tools/*.py support/tools/SConscript
%build
export CFLAGS="%{optflags} -ffast-math"
export CXXFLAGS="%{optflags} -ffast-math --std=gnu++11"
export LDFLAGS="%{build_ldflags}"
%{scons} %{?_smp_mflags} \
DETECT_USERSPACE_ENV=False \
ENABLE_SETBUFFERSIZE_API_VER=True \
ENABLE_OPTIMIZATIONS=False \
CUSTOM_ENV=True \
BUILD_DOC=user \
PREFIX=%{_prefix} \
LIBDIR=%{_libdir} \
MANDIR=%{_mandir} \
UDEVDIR=%{_prefix}/lib/udev/rules.d/ \
PYPKGDIR=%{python3_sitelib}/ffado/ \
PYTHON_INTERPRETER=/usr/bin/python3 \
BUILD_TESTS=1
%install
# Exporting flags so that the install does not trigger another build
export CFLAGS="%{optflags} -ffast-math"
export CXXFLAGS="%{optflags} -ffast-math --std=gnu++11"
export LDFLAGS="%{build_ldflags}"
%{scons} DESTDIR=%{buildroot} PREFIX=%{_prefix}\
install
# Install ffado-test RHBZ#805940
install -m 755 tests/ffado-test %{buildroot}%{_bindir}
%ldconfig_scriptlets
%files
%license LICENSE.*
%doc AUTHORS ChangeLog README
%{_libdir}/libffado.so.*
%dir %{_datadir}/libffado/
%{_datadir}/libffado/configuration
%{_prefix}/lib/udev/rules.d/*
%{_libdir}/libffado
%files devel
%doc doc/reference/html/
%{_includedir}/libffado/
%{_libdir}/pkgconfig/libffado.pc
%{_libdir}/libffado.so
%files -n ffado
%{_mandir}/man1/ffado-*.1*
%{_bindir}/*
%{_datadir}/libffado/*.xml
%{_datadir}/libffado/icons/
%{_datadir}/dbus-1/services/org.ffado.Control.service
%{_datadir}/applications/org.ffado.FfadoMixer.desktop
%{_datadir}/icons/hicolor/64x64/apps/hi64-apps-ffado.png
%{_datadir}/metainfo/org.ffado.FfadoMixer.metainfo.xml
%{python3_sitelib}/ffado/
%changelog
%autochangelog