%define lib_name_orig libclanlib %define lib_major 2 %define lib_name %mklibname clanlib %{lib_major} Name: clanlib0.6 Version: 0.6.5 Release: %mkrel 40 Summary: The ClanLib Game SDK License: LGPLv2+ Group: System/Libraries URL: http://www.clanlib.org/ Source0: http://www.clanlib.org/download/files/ClanLib-%{version}-1.tar.bz2 Patch0: ClanLib-0.6.5-display-compilation.patch Patch1: ClanLib-0.6.5-doc-fix.patch Patch2: ClanLib-0.6.5-glXGetProcAddressARB.patch Patch3: ClanLib-0.6.5-fix-png-detection.patch Patch4: ClanLib-0.6.5-gcc33.patch Patch5: ClanLib-0.6.5-64bit-fixes.patch Patch6: ClanLib-0.6.5-bounds.patch Patch7: ClanLib-0.6.5-directfb-ttf-fix.patch Patch8: ClanLib-0.6.5-gcc34.patch Patch9: ClanLib-0.6.5-freetype.patch Patch10: ClanLib-0.6.5-directfb-fixes.patch Patch11: ClanLib-0.6.5-extraqualif.patch Patch12: ClanLib-0.6.5-typename.patch Patch13: ClanLib-0.6.5-gcc4.3.patch Patch14: ClanLib-0.6.5-new-mikmod.patch Patch15: ClanLib-0.6.5-gzopen-flags.patch Patch16: ClanLib-0.6.5-gcc45.patch Patch17: ClanLib-0.6.5-libpng1.5.patch Patch18: ClanLib-0.6.5-link.patch BuildRequires: libhermes-devel >= 1.3.0 BuildRequires: libmikmod-devel BuildRequires: libpng-devel BuildRequires: mesagl-devel BuildRequires: mesaglu-devel BuildRequires: libjpeg-devel BuildRequires: libx11-devel BuildRequires: libxext-devel BuildRequires: libxxf86vm-devel BuildRequires: freetype2-devel BuildRequires: libvorbis-devel BuildRequires: libogg-devel Obsoletes: ClanLib <= %{version}-%{release} Provides: ClanLib = %{version}-%{release} %description The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. The goal is to provide a common interface to classical game problems (loading graphics eg.), so games can share as much code as possible. Ideally anyone with small resources should be able to write commercial quality games. %package -n %{lib_name} Summary: Main library for %{name} Group: System/Libraries Provides: %{name} = %{version}-%{release} %description -n %{lib_name} This package contains the library needed to run programs dynamically linked with %{name}. %package -n %{lib_name}-devel Summary: Headers for developing programs that will use %{name} Group: Development/C++ Requires: %{lib_name} = %{version}-%{release} Requires: %{lib_name}-gl = %{version}-%{release} Requires: %{lib_name}-gui = %{version}-%{release} Requires: %{lib_name}-jpeg = %{version}-%{release} Requires: %{lib_name}-mikmod = %{version}-%{release} Requires: %{lib_name}-network = %{version}-%{release} Requires: %{lib_name}-png = %{version}-%{release} Requires: %{lib_name}-smalljpeg = %{version}-%{release} Requires: %{lib_name}-sound = %{version}-%{release} Requires: %{lib_name}-ttf = %{version}-%{release} Requires: %{lib_name}-vorbis = %{version}-%{release} Provides: %{lib_name_orig}-devel = %{version}-%{release} Provides: ClanLib-devel = %{version}-%{release} Provides: clanlib-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Obsoletes: ClanLib-devel <= %{version}-%{release} Obsoletes: clanlib-devel <= %{version}-%{release} Conflicts: clanlib-devel > 0.7.0 %description -n %{lib_name}-devel This package contains the headers that programmers will need to develop applications which will use %{name}. %package -n %{lib_name}-static-devel Summary: Static libraries for %{name} Group: Development/C++ Requires: %{lib_name} = %{version}-%{release} Provides: %{lib_name_orig}-static-devel = %{version}-%{release} Obsoletes: ClanLib-static-devel <= %{version}-%{release} Obsoletes: clanlib-static-devel <= %{version}-%{release} Provides: ClanLib-static-devel = %{version}-%{release} Provides: clanlib-static-devel = %{version}-%{release} %description -n %{lib_name}-static-devel This package contains the static libraries for %{name}. %package -n %{lib_name}-sound Summary: ClanLib Sound module Group: System/Libraries Requires: %{lib_name} = %{version}-%{release} Provides: %{lib_name_orig}-sound = %{version}-%{release} %description -n %{lib_name}-sound The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package is the Sound module (clanSound). %package -n %{lib_name}-vorbis Summary: ClanLib Vorbis module Group: System/Libraries Requires: %{lib_name} = %{version}-%{release} Provides: %{lib_name_orig}-vorbis = %{version}-%{release} %description -n %{lib_name}-vorbis The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package is the Vorbis module (clanVorbis). %package -n %{lib_name}-network Summary: ClanLib Network module Group: System/Libraries Requires: %{lib_name} = %{version}-%{release} Provides: %{lib_name_orig}-network = %{version}-%{release} %description -n %{lib_name}-network The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package is the Network module (clanNetwork). %package -n %{lib_name}-jpeg Summary: ClanLib Jpeg module Group: System/Libraries Requires: %{lib_name} = %{version}-%{release} Provides: %{lib_name_orig}-jpeg = %{version}-%{release} %description -n %{lib_name}-jpeg The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package is the Jpeg module (clanJPEG). %package -n %{lib_name}-gui Summary: ClanLib Gui module Group: System/Libraries Requires: %{lib_name} = %{version}-%{release} Provides: %{lib_name_orig}-gui = %{version}-%{release} %description -n %{lib_name}-gui The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package is the Gui module (clanGUI). %package -n %{lib_name}-gl Summary: ClanLib GL module Group: System/Libraries Requires: %{lib_name} = %{version}-%{release} Provides: %{lib_name_orig}-gl = %{version}-%{release} %description -n %{lib_name}-gl The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package is the GL module (clanGL). %package -n %{lib_name}-ttf Summary: ClanLib TTF module Group: System/Libraries Requires: %{lib_name} = %{version}-%{release} Provides: %{lib_name_orig}-ttf = %{version}-%{release} %description -n %{lib_name}-ttf The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package is the TTF module (clanTTF). %package -n %{lib_name}-smalljpeg Summary: ClanLib SmallJPEG module Group: System/Libraries Requires: %{lib_name} = %{version}-%{release} Provides: %{lib_name_orig}-smalljpeg = %{version}-%{release} %description -n %{lib_name}-smalljpeg The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package is the SmallJPEG module (clanSmallJPEG). %package -n %{lib_name}-mikmod Summary: ClanLib MikMod module Group: System/Libraries Requires: %{lib_name} = %{version}-%{release} Obsoletes: ClanLib-mikmod <= %{version}-%{release} Obsoletes: clanlib-mikmod <= %{version}-%{release} Provides: ClanLib-mikmod = %{version}-%{release} Provides: clanlib-mikmod = %{version}-%{release} Provides: %{lib_name_orig}-mikmod = %{version}-%{release} %description -n %{lib_name}-mikmod The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package is the MikMod module (clanMikMod). %package -n %{lib_name}-png Summary: ClanLib PNG module Group: System/Libraries Requires: %{lib_name} = %{version}-%{release} Obsoletes: ClanLib-png <= %{version}-%{release} Obsoletes: clanlib-png <= %{version}-%{release} Provides: ClanLib-png = %{version}-%{release} Provides: clanlib-png = %{version}-%{release} Provides: %{lib_name_orig}-png = %{version}-%{release} %description -n %{lib_name}-png The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package is the PNG module (clanPNG). %package docs Summary: ClanLib documentation Group: Books/Computer books Obsoletes: ClanLib-docs <= %{version}-%{release} Obsoletes: clanlib-docs <= %{version}-%{release} Provides: ClanLib-docs = %{version}-%{release} Provides: clanlib-docs = %{version}-%{release} %description docs The ClanLib Game SDK is a crossplatform game library designed to ease the work for game developers. This package contains the documentation. %prep %setup -q -n ClanLib-%{version} %patch0 -p0 %patch1 -p1 %patch2 -p0 %patch3 -p0 %patch4 -p1 %patch5 -p1 -b .64bit-fixes %patch6 -p1 -b .bounds %patch7 -p1 %patch8 -p0 %patch9 -p1 -b .freetype %patch10 -p1 -b .directfb-fixes %patch11 -p1 -b .extraqualif %patch12 -p1 -b .typename %patch13 -p1 -z .gcc43 %patch14 -p1 %patch15 -p1 %patch16 -p0 %patch17 -p0 %patch18 -p0 %build autoconf export COMMON_CONFIGURE_FLAGS="--enable-dyn --enable-joystick --disable-lua --disable-debug --enable-ttf --disable-directfb" # (sb) doesn't build on PPC with this %ifarch %ix86 # (gc) workaround g++ exception bug when -fomit-frame-pointer is set export CFLAGS="$RPM_OPT_FLAGS -fno-omit-frame-pointer" CXXFLAGS="$RPM_OPT_FLAGS -fno-omit-frame-pointer" %else export COMMON_CONFIGURE_FLAGS="$COMMON_CONFIGURE_FLAGS --disable-asm386" %endif %ifarch ppc # (sb) configure macro breaks PPC build - just do it manually for now libtoolize --copy --force ./configure $COMMON_CONFIGURE_FLAGS --libdir=%_libdir %else %configure2_5x $COMMON_CONFIGURE_FLAGS %endif # (gc) there can be ordering problem when using percent-make, don't use it make all CXX="g++ %ldflags" make strip chmod 755 Documentation/FAQ.theme rm -f Libs/*.a make docs %install rm -rf %{buildroot} %makeinstall BIN_PREFIX=%{buildroot}%{_bindir} LIB_PREFIX=%{buildroot}%{_libdir} INC_PREFIX=%{buildroot}%{_includedir} TARGET_PREFIX=%{buildroot}%{_libdir}/ClanLib make MAN_PREFIX=%{buildroot}%{_mandir} HTML_PREFIX=%{buildroot}%{_datadir}/doc/%{name}-docs-%{version}/Docs docs_install %clean rm -rf %{buildroot} %files -n %{lib_name} %defattr(-, root, root) %doc README COPYING CREDITS %{_libdir}/libclanCore.so.* %{_libdir}/libclanApp.so.* %{_libdir}/libclanDisplay.so.* %files -n %{lib_name}-devel %defattr(-, root, root) %doc README COPYING CODING_STYLE ascii-logo %{_libdir}/*.so %{_includedir}/ClanLib %{_bindir}/clanlib-config %files -n %{lib_name}-static-devel %defattr(-, root, root) %doc README %{_libdir}/*.a %files docs %defattr(-, root, root) %{_docdir}/%{name}-docs-%{version}/* %files -n %{lib_name}-mikmod %defattr(-, root, root) %doc README %{_libdir}/libclanMikMod.so.* %files -n %{lib_name}-png %defattr(-, root, root) %doc README %{_libdir}/libclanPNG.so.* %files -n %{lib_name}-ttf %defattr(-, root, root) %doc README %{_libdir}/libclanTTF.so.* %files -n %{lib_name}-jpeg %defattr(-, root, root) %doc README %{_libdir}/libclanJPEG.so.* %files -n %{lib_name}-network %defattr(-, root, root) %doc README %{_libdir}/libclanNetwork.so.* %files -n %{lib_name}-vorbis %defattr(-, root, root) %doc README %{_libdir}/libclanVorbis.so.* %files -n %{lib_name}-smalljpeg %defattr(-, root, root) %doc README %{_libdir}/libclanSmallJPEG.so.* %files -n %{lib_name}-sound %defattr(-, root, root) %doc README %{_libdir}/libclanSound.so.* %files -n %{lib_name}-gui %defattr(-, root, root) %doc README %{_libdir}/libclanGUI.so.* %files -n %{lib_name}-gl %defattr(-, root, root) %doc README %{_libdir}/libclanGL.so.* %changelog * Tue Sep 20 2011 fwang <fwang> 0.6.5-40.mga2 + Revision: 146057 - more linkage fix - cleanup br - fix build with latest gcc - fix build with libpng 1.5 - partial fix linking - rebuild for new libpng * Mon Apr 18 2011 rtp <rtp> 0.6.5-39.mga1 + Revision: 87864 - Merge patch from RH bug 688309 * Fri Mar 18 2011 obgr_seneca <obgr_seneca> 0.6.5-38.mga1 + Revision: 74179 - fixed unversioned provides/obsoletes - cleaned up spec - removed buildroot tag - corrected some provides - imported package clanlib0.6