Name: SDL_image Version: 1.2.8 Release: 1 Summary: Image loading library for SDL Group: System Environment/Libraries License: LGPLv2+ URL: http://www.libsdl.org/projects/SDL_image/ Source0: http://www.libsdl.org/projects/%{name}/release/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: SDL-devel >= 1.2.10 BuildRequires: libjpeg-devel BuildRequires: libpng-devel > 1.2.25 BuildRequires: libtiff-devel >= 3.8.2 Requires: SDL >= 1.2.10 Requires: libjpeg Requires: libpng > 1.2.25 Requires: libtiff >= 3.8.2 %description Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed to provide fast access to the graphics frame buffer and audio device. This package contains a simple library for loading images of various formats (BMP, PPM, PCX, GIF, JPEG, PNG) as SDL surfaces. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: SDL-devel >= 1.2.10 Requires: libjpeg-devel Requires: libpng-devel > 1.2.25 Requires: libtiff-devel >= 3.8.2 %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. 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 # 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} \ --enable-shared --disable-static # remove "-mthreads" from libtool cat config.status | sed 's| -mthreads||g' > config.status.tmp mv -f config.status.tmp config.status chmod 0755 config.status ./config.status make %{?_smp_mflags} cp ./.libs/lib%{name}-1.2.so.0 . make distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static # remove "-mthreads" from libtool cat config.status | sed 's| -mthreads||g' > config.status.tmp mv -f config.status.tmp config.status chmod 0755 config.status ./config.status make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q ./.libs/lib%{name}-1.2.a ./lib%{name}-1.2.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install mkdir -p ${RPM_BUILD_ROOT}%{_bindir} ./libtool --mode=install /opt/freeware/bin/install showimage ${RPM_BUILD_ROOT}%{_bindir} /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 README CHANGES COPYING %{_bindir}/* %{_libdir}/*.a /usr/bin/* /usr/lib/*.a %files devel %defattr(-,root,system) %{_includedir}/* %{_libdir}/*.la /usr/include/* /usr/lib/*.la %changelog * Fri Nov 06 2009 Michael Perzl - 1.2.8-1 - updated to version 1.2.8 * Fri Sep 25 2009 Michael Perzl - 1.2.7-1 - first version for AIX V5.1 and higher