Summary: MPEG audio decoder library. Name: libmad Version: 0.15.1b Release: 1 Group: System Environment/Libraries Source: ftp://ftp.mars.org/pub/mpeg/%{name}-%{version}.tar.gz URL: http://www.underbit.com/products/mad/ License: GPL Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gcc %description MAD (libmad) 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 does not yet support MPEG-2 multichannel audio (although it should be backward compatible with such streams) nor does it currently support AAC. The library is available as 32-bit and 64-bit. %package devel Summary: Header and library for developing programs that will use libmad. Group: Development/Libraries Requires: %{name} = %{version} %description devel MAD (libmad) 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. This package contains the header file needed to develop programs that will use libmad for mpeg audio decoding. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc -q64" or "gcc -maix64". %prep %setup -q %build export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export "CC=gcc -maix64" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --enable-sso \ --enable-accuracy \ --disable-debugging \ --enable-fpm=default make %{?_smp_flags} cat << EOF > mad.pc prefix=%{_prefix} exec_prefix=%{_prefix} libdir=%{_libdir} includedir=%{_includedir} Name: mad Description: MPEG Audio Decoder Requires: Version: %{version} Libs: -L%{_libdir} -lmad -lm Cflags: -I%{_includedir} EOF cp .libs/libmad.so.0 . make distclean # now build the 32-bit version export CC="gcc -maix32" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --enable-sso \ --enable-accuracy \ --disable-debugging \ --enable-fpm=default make %{?_smp_flags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q .libs/libmad.a ./libmad.so.0 %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install mkdir -p %{buildroot}%{_libdir}/pkgconfig cp mad.pc %{buildroot}%{_libdir}/pkgconfig/mad.pc chmod 644 %{buildroot}%{_libdir}/pkgconfig/mad.pc %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system) %doc CHANGES COPYING COPYRIGHT CREDITS README TODO %{_libdir}/*.a %files devel %defattr(-,root,system) %{_libdir}/*.la %{_libdir}/pkgconfig/*.pc %{_includedir}/* %changelog * Fri Feb 01 2008 Michael Perzl - 0.15.1b-1 - first version for AIX V5.1 and higher