File libmad.spec of Package libmad

Name:		libmad
Version:	0.15.1b
Release:	12.1
Summary:	An MPEG audio decoder library
URL:		https://www.underbit.com/products/mad/
Source:		%{name}-%{version}.tar.gz
License:	GPL-2.0-or-later
Packager:	rncbc.org

%define sover 0

BuildRequires:	coreutils
BuildRequires:	pkgconfig
BuildRequires:	glibc-devel
BuildRequires:	autoconf, automake, libtool

%description
MAD is a high-quality MPEG audio decoder. It currently supports MPEG-1
and the MPEG-2 extension to Lower Sampling Frequencies, as well as the
so-called MPEG 2.5 format. All three audio layers (Layer I, Layer II,
and Layer III a.k.a. MP3) are fully implemented. MAD supports high
quality 24-bit PCM output for modern audio technologies. MAD computes
using 100% fixed-point (integer) computation, so you can run it without
a floating point unit.


%package -n %{name}%{sover}
Summary:	An MPEG audio decoder library
Group:		System/Libraries
Provides:	%{name}

%description -n %{name}%{sover}
MAD is a high-quality MPEG audio decoder. It currently supports MPEG-1
and the MPEG-2 extension to Lower Sampling Frequencies, as well as the
so-called MPEG 2.5 format. All three audio layers (Layer I, Layer II,
and Layer III a.k.a. MP3) are fully implemented. MAD supports high
quality 24-bit PCM output for modern audio technologies. MAD computes
using 100% fixed-point (integer) computation, so you can run it without
a floating point unit.


%package devel
License:        GPL-2.0+
Summary:        An MPEG audio decoder library -- development files
Group:          Development/Libraries/C and C++
Requires:       %{name}%{sover} = %{version} glibc-devel

%description devel
MAD is a high-quality MPEG audio decoder. It currently supports MPEG-1
and the MPEG-2 extension to Lower Sampling Frequencies, as well as the
so-called MPEG 2.5 format. All three audio layers (Layer I, Layer II,
and Layer III a.k.a. MP3) are fully implemented. MAD supports high
quality 24-bit PCM output for modern audio technologies. MAD computes
using 100% fixed-point (integer) computation, so you can run it without
a floating point unit.

This package contains headers, documentation and static libraries.


%prep
%setup -q

%build
%if %{undefined fedora}
export CFLAGS="-ffat-lto-objects"
%endif
%ifarch %{arm}
%configure --disable-aso
%else
%configure
%endif
%__make %{?_smp_mflags}

%install
%__make DESTDIR="%{buildroot}" install

%if 0%{?sle_version} == 150200 && 0%{?is_opensuse}
%post -n %{name}%{sover} -p /sbin/ldconfig
%postun -n %{name}%{sover} -p /sbin/ldconfig
%else
%ldconfig_scriptlets -n %{name}%{sover}
%endif


%files -n %{name}%{sover}
%doc COPYING COPYRIGHT CHANGES README TODO VERSION
%{_libdir}/%{name}.so.%{sover}
%{_libdir}/%{name}.so.%{sover}.*

%files devel
%{_libdir}/lib*.so
%{_libdir}/lib*.a
%if %{undefined fedora} || 0%{?fedora_version} < 36
%{_libdir}/lib*.la
%endif
%{_includedir}/*.h
%{_libdir}/pkgconfig/*.pc


%changelog
* Thu Nov 19 2012 Rui Nuno Capela <rncbc@rncbc.org> - 0.15.1b-12
- Disable special optimizations on special architectures build.
* Thu Nov  8 2012 Rui Nuno Capela <rncbc@rncbc.org> - 0.15.1b-1
- Initial spec build.
openSUSE Build Service is sponsored by