libvorbis/libvorbis.spec

159 lines
4.0 KiB
RPMSpec

#
# spec file for package libvorbis (Version 1.2.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.opensuse.org/
#
# norootforbuild
Name: libvorbis
BuildRequires: libogg-devel pkgconfig
Summary: The Vorbis General Audio Compression Codec
Version: 1.2.0
Release: 81
Group: System/Libraries
License: BSD 3-clause (or similar)
Url: http://www.vorbis.com/
# bug437293
%ifarch ppc64
Obsoletes: libvorbis-64bit
%endif
#
Source: %{name}-%{version}.tar.bz2
Patch1: libvorbis-lib64.dif
Patch2: libvorbis-m4.dif
Patch5: libvorbis-%{version}-aotuv-b5.diff
Patch6: libvorbis-%{version}-warning-fixes.diff
Patch7: libvorbis-cflags.diff
Patch9: libvorbis-doc-fixes.diff
Patch10: libvorbis-pkgconfig.patch
Patch11: libvorbis-r14598-r14600-CVE-2008-1420.diff
Patch12: libvorbis-r14602-CVE-2008-1419.diff
Patch13: libvorbis-r14604-CVE-2008-1423.diff
Patch14: libvorbis-am111.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Vorbis is a fully open, nonproprietary, patent-and-royalty-free, and
general-purpose compressed audio format for audio and music at fixed
and variable bit rates from 16 to 128 kbps/channel.
The native bitstream format of Vorbis is libogg (Ogg). Alternatively,
libmatroska (matroska) can also be used.
Authors:
--------
Monty <monty@xiph.org>
Xiphophorus Company <team@xiph.org>
%package devel
License: BSD 3-clause (or similar)
Summary: Include Files and Libraries mandatory for Ogg Vorbis Development
Group: Development/Libraries/C and C++
Requires: glibc-devel, libogg-devel
Requires: %{name} = %{version}
# bug437293
%ifarch ppc64
Obsoletes: libvorbis-devel-64bit
%endif
#
%description devel
This package contains all necessary include files and libraries needed
to compile and develop applications that use libvorbis.
Authors:
--------
Monty <monty@xiph.org>
Xiphophorus Company <team@xiph.org>
%package doc
License: BSD 3-clause (or similar)
Summary: Documentation of Ogg/Vorbis library
Group: Documentation/Other
%description doc
This package contains documents for Ogg/Vorbis library, including the
API reference.
Authors:
--------
Monty <monty@xiph.org>
Xiphophorus Company <team@xiph.org>
%prep
%setup -q
%patch2
%patch5
%patch6
%patch7
%patch9
%patch10
%patch11 -p3
%patch12 -p3
%patch13 -p3
%patch14 -p1
if [ "%_lib" == "lib64" ]; then
%patch1
fi
%build
autoreconf -fi
%configure \
--with-ogg-libraries=%{_libdir} \
--disable-static
make
%install
%makeinstall
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
mv $RPM_BUILD_ROOT%{_datadir}/doc/libvorbis-* $RPM_BUILD_ROOT%{_docdir}/%{name}/html
install -c -m 0644 doc/Vorbis_I_spec.* $RPM_BUILD_ROOT%{_docdir}/%{name}/html
ln -s white-xifish.png $RPM_BUILD_ROOT%{_docdir}/%{name}/html/fish_xiph_org.png
cp COPYING AUTHORS README $RPM_BUILD_ROOT%{_docdir}/%{name}
cp *.txt $RPM_BUILD_ROOT%{_docdir}/%{name}
# remove unneeded files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_libdir}/lib*.so.*
%files devel
%defattr(-,root,root)
%{_datadir}/aclocal/*.m4
%{_includedir}/vorbis
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%files doc
%defattr(-,root,root)
%doc %{_docdir}/%{name}
%changelog