File zita-alsa-pcmi.spec of Package zita-alsa-pcmi
#
# spec file for package zita-alsa-pcmi.spec
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2022 by Edgar Aichinger
#
# 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/
#
%global libmajor 0
Name: libzita-alsa-pcmi%{libmajor}
Version: 0.6.1
Release: 0
Summary: ALSA driver C++ access library
License: GPL-3.0-or-later
# FIXME: use correct group or remove it, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: System Environment/Libraries
URL: https://kokkinizita.linuxaudio.org/
Source0: http://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-alsa-pcmi-%{version}.tar.bz2
BuildRequires: alsa-lib-devel
BuildRequires: gcc-c++
%if %{defined fedora}
%ifarch x86_64
Provides: libzita-alsa-pcmi.so.0()(64bit)
%else
Provides: libzita-alsa-pcmi.so.0
%endif
%endif
%description
%{name} is the successor of clalsadrv. It provides easy access
to ALSA PCM devices, taking care of the many functions required to
open, initialise and use a hw: device in mmap mode, and providing
floating point audio data.
%package devel
Summary: ALSA driver C++ access library
# FIXME: use correct group or remove it, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
%{name} is the successor of clalsadrv. It provides easy access
to ALSA PCM devices. This package contains libraries and header
files for developing applications that use %{name}.
%if %{defined fedora}
%global debug_package %{nil}
%endif
%prep
%setup -q -n zita-alsa-pcmi-%{version}
# No need to call ldconfig during packaging
sed -i '\|ldconfig|d' source/Makefile
# Preserve timestamps
sed -i 's|install |install -p |' source/Makefile
# Force Fedora's optflags
sed -i 's|-march=native|%{optflags}|' source/Makefile
%build
%make_build -C source PREFIX=%{_prefix}
%install
make -C source DESTDIR=%{buildroot} PREFIX=%{_prefix} LIBDIR=%{_libdir} install
# create .so.x link
ln -sf libzita-alsa-pcmi.so.%{version} %{buildroot}%{_libdir}/libzita-alsa-pcmi.so.%{libmajor}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license COPYING
%doc AUTHORS README
%{_libdir}/libzita-alsa-pcmi.so.*
%files devel
%{_includedir}/zita-alsa-pcmi.h
%{_libdir}/libzita-alsa-pcmi.so
%changelog