%define name libsndfile %define version 1.0.13 %define release 2 Summary: A library to handle various audio file formats. Name: %{name} Version: %{version} Release: %{release} Copyright: LGPL Group: Libraries/Sound Source0: http://www.mega-nerd.com/libsndfile/%{name}-%{version}.tar.gz URL: http://www.mega-nerd.com/libsndfile/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: sqlite-devel Requires: sqlite %description libsndfile is a C library for reading and writing sound files such as AIFF, AU and WAV files through one standard interface. It can currently read/write 8, 16, 24 and 32-bit PCM files as well as 32-bit and 64-bit floating point WAV files and a number of compressed formats. It compiles and runs on *nix, MacOS, and Win32. The library is available as 32-bit and 64-bit. %package devel Summary: Libraries, includes, etc to develop libsndfile applications Group: Libraries Requires: %{name} = %{version}-%{release} Requires: sqlite-devel %description devel libsndfile is a C library for reading and writing sound files such as AIFF, AU, WAV, and others through one standard interface. This package contains files needed to develop with libsndfile. %prep %setup -q %build # 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="xlc -q64" export CFLAGS="-O" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --disable-flac make %{?_smp_mflags} cp ./src/.libs/libsndfile.so.1 . make distclean # now build the 32-bit version export CC=xlc ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --disable-flac make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a ./%{name}.so.1 ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO doc %{_bindir}/* %{_libdir}/*.a %{_mandir}/man1/* %{_datadir}/octave/site/m/* %{_datadir}/doc/libsndfile1-dev/html/* /usr/bin/* /usr/lib/*.a %files devel %defattr(-,root,system) %{_libdir}/*.la %{_libdir}/pkgconfig/sndfile.pc %{_includedir}/* /usr/lib/*.la /usr/include/* %changelog * Thu Jul 23 2009 Michael Perzl - 1.0.13-2 - some spec file fixes and added 64-bit library * Tue Jan 24 2006 Michael Perzl - 1.0.13-1 - first version for AIX V5.1 and higher