lame/lame.spec
Ismail Dönmez d82ffd35d1 - Add patch for SSE
- Add check for invalid input sample rate
- Avoid malformed wav causing floating point exception (integer divide by zero) 
- Fix warning on 64 bit machines. Explicitely set variables as unsigned ints.
- Enable functions with SSE instructions to maintain their own properly aligned stack
- Fix decision if sample rate ratio is an integer value or not
- run autoreconf, set GTK_CFLAGS
- Add patch to remove ansi2knr instead of using sed

- Redux the conditionals for not building gtk1 anywhere anymore

- Fix logical issue in hvogel's fix 

- Fix the conditional building of gtk1 binaries 

- Fix pkgconfig(gtk+-2.0) for >= 11.4 

- Fix bug reporting link
- BuildRequires nasm only in x86-32 (there is no assembly available
  for other archs)
- Stop BuildRequiring flac-devel, it's not used
- Remove autoreconf call and related BuildRequires and patches
- Remove old compatibility Provides
- Run spec-cleaner
- Removed all patches (unneeded)
- Replace some documentation and let the build system install its
  own

- update to 3.99.5: fixed build on 12.2

OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/lame?expand=0&rev=1
2017-02-22 09:40:08 +00:00

174 lines
5.6 KiB
RPMSpec

#
# spec file for package lame
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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 http://bugs.links2linux.org/
#
%define soname 0
Name: lame
Version: 3.99.5
Release: 0
Summary: LAME Ain't an MP3 Encoder
License: LGPL-2.0+
Group: Productivity/Multimedia/Sound/Editors and Convertors
Url: http://lame.sourceforge.net/
Source: http://prdownloads.sourceforge.net/lame/lame-%{version}.tar.gz
Source99: lame-rpmlintrc
Patch1: lame-gtk1.patch
Patch10: lame-Add-check-for-invalid-input-sample-rate.patch
Patch11: lame-ansi2knr2.patch
Patch12: lame-bits_per_sample.patch
Patch13: lame-field-width-fix.patch
Patch14: lame-force_align_arg_pointer.patch
Patch15: lame-int_resample_ratio.patch
Patch16: lame-msse.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
Requires: libmp3lame%{soname} >= %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%ifarch %ix86
BuildRequires: nasm
%endif
BuildRequires: pkgconfig(gtk+-2.0)
%description
LAME is an educational tool to be used for learning about MP3 encoding.
The goal of the LAME project is to use the open source model to improve the
psycho acoustics, noise shaping and speed of MP3.
Another goal of the LAME project is to use these improvements for the basis of
a patent free audio compression codec for the GNU project.
%package doc
Summary: LAME Ain't an MP3 Encoder (Documentation)
Group: Productivity/Multimedia/Sound/Editors and Convertors
Requires: %{name} = %{version}
%description doc
LAME is an educational tool to be used for learning about MP3 encoding.
The goal of the LAME project is to use the open source model to improve the
psycho acoustics, noise shaping and speed of MP3.
Another goal of the LAME project is to use these improvements for the basis of
a patent free audio compression codec for the GNU project.
%package -n libmp3lame%{soname}
Summary: LAME Ain't an MP3 Encoder
Group: System/Libraries
%description -n libmp3lame%{soname}
LAME is an educational tool to be used for learning about MP3 encoding.
The goal of the LAME project is to use the open source model to improve the
psycho acoustics, noise shaping and speed of MP3.
Another goal of the LAME project is to use these improvements for the basis of
a patent free audio compression codec for the GNU project.
%package -n libmp3lame-devel
Summary: LAME Ain't an MP3 Encoder
Group: Development/Libraries/C and C++
Requires: libmp3lame%{soname} = %{version}
%description -n libmp3lame-devel
LAME is an educational tool to be used for learning about MP3 encoding.
The goal of the LAME project is to use the open source model to improve the
psycho acoustics, noise shaping and speed of MP3.
Another goal of the LAME project is to use these improvements for the basis of
a patent free audio compression codec for the GNU project.
%package -n lame-mp3rtp
Summary: MP3 Encoder for RTP Streaming
Group: Productivity/Multimedia/Sound/Editors and Convertors
Requires: libmp3lame%{soname} >= %{version}
%description -n lame-mp3rtp
LAME is an educational tool to be used for learning about MP3 encoding.
The goal of the LAME project is to use the open source model to improve the
psycho acoustics, noise shaping and speed of MP3.
Another goal of the LAME project is to use these improvements for the basis of
a patent free audio compression codec for the GNU project.
This package includes "mp3rtp", an MP3 encoder with RTP streaming of the output.
%prep
%setup -q
find -name Makefile.in -print -delete
%patch1 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
sed -i -e '/define sp/s/+/ + /g' libmp3lame/i386/nasm.h
%build
autoreconf -fi
LIBS="-lm" \
CFLAGS="%{optflags}" \
%configure \
--enable-nasm \
--enable-decoder \
--disable-debug \
--enable-mp3rtp \
--with-fileio=lame \
--enable-dynamic-frontends \
--disable-rpath \
--disable-static
make %{?_smp_mflags} pkgdocdir=%{_defaultdocdir}/%{name}/
%install
make install pkgdocdir=%{_defaultdocdir}/%{name}/ DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/libmp3lame.la
for f in ChangeLog README TODO USAGE; do
install -m0644 "$f" "%{buildroot}%{_defaultdocdir}/%{name}/"
done
%post -n libmp3lame%{soname} -p /sbin/ldconfig
%postun -n libmp3lame%{soname} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/lame
%{_mandir}/man1/lame.1*
%files doc
%defattr(-,root,root)
%{_defaultdocdir}/%{name}
%files -n libmp3lame%{soname}
%defattr(0644,root,root,0755)
%doc COPYING LICENSE
%{_libdir}/libmp3lame.so.%{soname}
%{_libdir}/libmp3lame.so.%{soname}.*
%files -n libmp3lame-devel
%defattr(-,root,root)
%doc API HACKING STYLEGUIDE
%{_includedir}/lame/
%{_libdir}/libmp3lame.so
%files -n lame-mp3rtp
%defattr(-,root,root)
%{_bindir}/mp3rtp
%changelog