%define major 8 %define libname %mklibname %{name} %{major} %define libnamedev %mklibname %{name} -d %define majorpp 6 %define libnamepp %mklibname %{name}++ %{majorpp} %define libnameppdev %mklibname %{name}++ -d Name: flac Version: 1.3.3 Release: %mkrel 4 Summary: An encoder/decoder for the Free Lossless Audio Codec Group: Sound/Editors and Converters License: BSD and GPLv2+ URL: http://xiph.org/flac/ Source0: http://downloads.xiph.org/releases/flac/%{name}-%{version}.tar.xz Patch0: 2e7931c27eb15e387da440a37f12437e35b22dd4.patch BuildRequires: automake BuildRequires: gettext-devel BuildRequires: id3lib-devel BuildRequires: libtool BuildRequires: pkgconfig(ogg) %ifarch %{ix86} BuildRequires: nasm %endif %description FLAC is an Open Source lossless audio codec developed by Josh Coalson. FLAC is comprised of 1) `libFLAC', a library which implements reference encoders and decoders, licensed under the GNU Lesser General Public License (LGPL); 2) `flac', a command-line program for encoding and decoding files, licensed under the GNU General public License (GPL); 3) `metaflac', a command-line program for editing FLAC metadata, licensed under the GPL; 4) player plugins for XMMS and Winamp, licensed under the GPL; and 5) documentation, licensed under the GNU Free Documentation License. %package -n %{libname} Summary: Shared libraries for FLAC Group: System/Libraries %description -n %{libname} FLAC is an Open Source lossless audio codec developed by Josh Coalson. This package contains the C libraries. %package -n %{libnamedev} Summary: Libraries and headers needed for building apps using FLAC Group: Development/C Requires: %{libname} = %{version}-%{release} Requires: pkgconfig(ogg) Provides: flac-devel = %{version}-%{release} Provides: libflac-devel = %{version}-%{release} Provides: liboggflac-devel = %{version}-%{release} %description -n %{libnamedev} FLAC is an Open Source lossless audio codec developed by Josh Coalson. This package contains the libraries and header files necessary to develop applications using FLAC written in C. %package -n %{libnamepp} Summary: Shared C++ libraries for FLAC Group: System/Libraries %description -n %{libnamepp} FLAC is an Open Source lossless audio codec developed by Josh Coalson. This package contains the libraries for C++ applications. %package -n %{libnameppdev} Summary: Libraries and headers needed for building apps using FLAC++ Group: Development/C++ Requires: %{libnamepp} = %{version}-%{release} Requires: %{libnamedev} = %{version}-%{release} Provides: flac++-devel = %{version}-%{release} Provides: libflac++-devel = %{version}-%{release} Provides: liboggflac++-devel = %{version}-%{release} %description -n %{libnameppdev} FLAC is an Open Source lossless audio codec developed by Josh Coalson. This package contains the libraries and header files necessary to develop applications using FLAC written in C++. %prep %autosetup -p1 %build ./autogen.sh -V rm -rf html cp -r doc/html . # (cg) Note that the --with-ogg is needed to prevent a lib path error # leaking to all applications that link against libflac as the libFLAC.la # file ultimately contains -L/usr/lib even on 64 bit platforms, which causes # linking warnings to be shown in other applications, about incompatibile types # for libraries where you have both 32 and 64 bit version installed like ptheads etc. %configure \ --disable-static \ --disable-xmms-plugin \ --disable-thorough-tests \ %ifarch %ix86 --disable-sse \ %endif --with-ogg %make_build %install %make_install mv %{buildroot}%{_datadir}/doc/flac installed-docs find %{buildroot} -name '*.la' -delete %check make check %files %doc AUTHORS COPYING* README installed-docs/* %{_bindir}/%{name} %{_bindir}/meta%{name} %{_mandir}/man1/*%{name}.1* %files -n %{libname} %{_libdir}/libFLAC.so.%{major}{,.*} %files -n %{libnamepp} %{_libdir}/libFLAC++.so.%{majorpp}{,.*} %files -n %{libnamedev} %{_includedir}/FLAC %{_libdir}/libFLAC.so %{_datadir}/aclocal/libFLAC.m4 %{_libdir}/pkgconfig/%{name}.pc %files -n %{libnameppdev} %{_includedir}/FLAC++ %{_libdir}/libFLAC++.so %{_datadir}/aclocal/libFLAC++.m4 %{_libdir}/pkgconfig/%{name}++.pc