%define name speex %define ver 1.2rc1 %define rel 1 Summary: An open-source, patent-free speech codec Name: %name Version: %ver Release: %rel Copyright: BSD Group: Application/Development Source0: http://www.speex.org/download/%{name}-%{ver}.tar.gz Patch0: %{name}-%{ver}-aix.patch URL: http://www.speex.org/ Vendor: Speex BuildRoot: %{_tmppath}/%{name}-%{ver}-%{rel}-root Requires: libogg BuildRequires: libogg-devel %description Speex is a patent-free audio codec designed especially for voice (unlike Vorbis which targets general audio) signals and providing good narrowband and wideband quality. This project aims to be complementary to the Vorbis codec. The library is available as 32-bit and 64-bit. %package devel Summary: Speex development files Group: Development/Libraries Requires: %{name} = %{version} Requires: libogg-devel %description devel Speex development files. 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 export PATH=/opt/freeware/bin:$PATH %setup -q %patch0 -p1 %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" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --enable-static \ --with-ogg-includes=/opt/freeware/include \ --with-ogg-libraries=/opt/freeware/lib make %{?_smp_mflags} cp libspeex/.libs/libspeex.so.1 . make distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --enable-static \ --with-ogg-includes=%{_includedir} \ --with-ogg-libraries=%{_libdir} make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q libspeex/.libs/libspeex.a ./libspeex.so.1 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( 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 COPYING AUTHORS ChangeLog NEWS README %doc doc/manual.pdf %{_bindir}/* %{_libdir}/*.a %{_mandir}/man1/* /usr/bin/* /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/* %{_datadir}/aclocal/* /usr/include/* /usr/lib/*.la %changelog * Mon Jul 20 2009 Michael Perzl - 1.2rc1-1 - updated to version 1.2rc1 * Sat Feb 23 2008 Michael Perzl - 1.2beta3-1 - updated to version 1.2beta3 * Thu Jan 17 2008 Michael Perzl - 1.0.5-1 - first version for AIX V5.1 and higher