Name: SDL_net Version: 1.2.7 Release: 1 Summary: SDL portable network library Group: System Environment/Libraries License: LGPLv2+ URL: http://www.libsdl.org/projects/SDL_net/ Source0: http://www.libsdl.org/projects/%{name}/release/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: SDL-devel >= 1.2.13-1 Requires: SDL >= 1.2.13-1 %description This is a portable network library for use with SDL. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: SDL-devel >= 1.2.13-1 %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %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 /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT} for dir in 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 %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la /usr/include/* /usr/lib/*.la %changelog * Mon Sep 28 2009 Michael Perzl - 1.2.7-1 - first version for AIX V5.1 and higher