Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > media > main-src > by-pkgid > 0d7ef8c4499e5a8db26b951ecce5a841 > files > 3

ClanLib-0.4.4-11mdk.src.rpm

%define name	ClanLib
%define version	0.4.4
%define release 11mdk
%define prefix	%{_prefix}

Summary:		The ClanLib Game SDK
Name:			%{name}
Version:		%{version}
Release:		%{release}
Copyright:		LGPL
Group:			System/Libraries

Source:			http://dark.x.dtu.dk/~mbn/clanlib/download/%{name}-%{version}.tar.bz2
Source1:		ClanLib-magick-from-CVS-00-07-28.tar.bz2
Patch0:			clanlib-fix-IM5.patch.bz2
Patch1:			clanlib-fix-magick-flags.patch.bz2
Patch2:			clanlib-add-force-x11.patch.bz2

URL:			http://clanlib.org/
Packager:		Guillaume Cottenceau <gc@mandrakesoft.com>
BuildRoot:		%{_tmppath}/%{name}-buildroot
Requires:		Hermes >= 1.3.0, zlib
BuildRequires:	Hermes-devel >= 1.3.0 zlib-devel libmikmod-devel libpng-devel ImageMagick-devel >= 5.0.0 Mesa-common-devel XFree86-devel bzip2 libjpeg-devel libtiff-devel XFree86-static-libs
BuildConflicts:	OpenPTC-devel

%ifarch %{ix86}
BuildRequires: svgalib-devel
%endif

%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 gl
Summary:	ClanLib OpenGL module
Group:		System/Libraries
Requires:	ClanLib = %{version} Mesa

%description gl
The ClanLib Game SDK is a crossplatform game library designed to ease the
work for game developers. This package is the OpenGL module (clanGL).

%package magick
Summary:	ClanLib ImageMagick module
Group:		System/Libraries
Requires:	ClanLib = %{version} ImageMagick >= 5.0.0

%description magick
The ClanLib Game SDK is a crossplatform game library designed to ease the
work for game developers. This package is the ImageMagick module
(clanMagick).

%package mikmod
Summary: ClanLib MikMod module
Group: System/Libraries
Requires: ClanLib = %{version} libmikmod
%description 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 png
Summary:	ClanLib PNG module
Group:		System/Libraries
Requires:	ClanLib = %{version} libpng

%description 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 devel
Summary:	ClanLib include files for developers
Group:		Development/C
Requires:	ClanLib = %{version}

%description devel
The ClanLib Game SDK is a crossplatform game library designed to ease the
work for game developers. This package contains the header files needed to
build ClanLib applications.

%package docs
Summary:	ClanLib documentation
Group:		System/Libraries

%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 -a 1
%patch0 -p0
%patch1 -p0
%patch2 -p0

%build
autoconf

%ifarch %{ix86}
  %configure --enable-x11 --enable-fbdev --enable-opengl --enable-svgalib --enable-clansound --enable-network --enable-asm386 --enable-dyn
%endif

# (Dadou) GG put some non usuable options in %ifnarch ix86 (like svga)
# configure do a (nearly nice job), so let it plays
%ifarch ppc
	%configure --disable-asm386
%endif

%ifnarch %{ix86} ppc
  %configure --enable-x11 --enable-fbdev --enable-opengl --enable-svgalib --enable-clansound --enable-network --enable-dyn --disable-asm386
%endif

make clanCore
make clanGL
make clanMikMod
make clanMagick
#make clanGUI
#make clanLua
#make clanMPEG
make clanPNG
make strip
make docs

%install
%makeinstall BIN_PREFIX=$RPM_BUILD_ROOT%{_bindir} LIB_PREFIX=$RPM_BUILD_ROOT%{_libdir} INC_PREFIX=$RPM_BUILD_ROOT%{_includedir} TARGET_PREFIX=$RPM_BUILD_ROOT%{_libdir}/%{name}
make MAN_PREFIX=$RPM_BUILD_ROOT%{_mandir} HTML_PREFIX=$RPM_BUILD_ROOT%{_datadir}/doc/%{name}-docs-%{version}/Docs docs_install

mkdir -p $RPM_BUILD_ROOT/%{_bindir}
cat << EOF > $RPM_BUILD_ROOT/%{_bindir}/launch_x11_clanapp
#!/bin/sh
[ -x \$1 ] && CLANLIB_FORCE_X11_DISPLAY=1 \$1
EOF

%post -p /sbin/ldconfig

%post gl -p /sbin/ldconfig

%post mikmod -p /sbin/ldconfig

%post png -p /sbin/ldconfig

%post magick -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%postun	gl -p /sbin/ldconfig

%postun	mikmod -p /sbin/ldconfig

%postun	png -p /sbin/ldconfig

%postun magick -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc README COPYING CREDITS
%{_libdir}/libclanCore.so.*
%{_libdir}/ClanLib
%attr(0755,root,root) %{_bindir}/launch_x11_clanapp

%files devel
%defattr(-, root, root)
%doc README COPYING CODING_STYLE FAQ ascii-logo
%{_libdir}/libclanCore.so
%{_includedir}/ClanLib/*
%{_bindir}/clanlib-config

%files docs
%defattr(-, root, root)
%{_docdir}/%{name}-docs-%{version}/*
%{_mandir}/man1/datafile_compiler.1*
%{_mandir}/man3/CL*
%{_mandir}/man3/clanlib.3*

%files gl
%defattr(-, root, root)
%doc README COPYING 
%{_libdir}/libclanGL.so*

%files magick
%defattr(-, root, root)
%doc README COPYING 
%{_libdir}/libclanMagick.so*

%files mikmod
%defattr(-, root, root)
%doc README COPYING 
%{_libdir}/libclanMikMod.so*

%files png
%defattr(-, root, root)
%doc README COPYING 
%{_libdir}/libclanPNG.so*

#%files lua
#%defattr(-, root, root)
#%{prefix}/lib/libclanLua.so*

#%files gui
#%defattr(-, root, root)
#%{prefix}/lib/libclanGUI.so*

#%files mpeg
#%defattr(-, root, root)
#%{prefix}/lib/libclanMPEG.so*

%changelog
* Sun Sep 17 2000 David BAUDENS <baudens@mandrakesoft.com> 0.4.4-11mdk
- Don't use i386 code on non i386 compatibles archs
- Let configure do is job on PPC (and really don't use i386 code)

* Fri Sep 15 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.4.4-10mdk
- rebuild against fixed XFree-4 by fredl

* Fri Sep  8 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.4.4-9mdk
- fixed BuildRequires: removed ClanLib-devel, added XFree86-static-libs,
  ImageMagick >= 5.0.0
- removed nasty static -march=pentium, /me sucks

* Wed Sep  6 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.4.4-8mdk
- added the optional force of x11 target (envvar CLANLIB_FORCE_X11_DISPLAY)
- added a script to launch clanlib apps with force x11 target

* Wed Aug 30 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.4.4-7mdk
- added more documentation in subpackages

* Wed Aug 23 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.4.4-6mdk
- automatically added packager tag

* Wed Aug 23 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.4.4-5mdk
- corrected BuildRequires for archs other than ix86.

* Tue Aug 08 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.4.4-4mdk
- automatically added BuildRequires

* Tue Aug  1 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.4.4-3mdk
- not 100% sure with the 2mdk

* Mon Jul 31 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.4.4-2mdk
- integrated patch to ImageMagick stuff from the clanlib-devel mailing
  list, thanks to the help of Ingo Ruhnke <grumbel@gmx.de>; it was a
  contribution from Matt Kimball <mkimball@veriomail.com>

* Mon Jul 31 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.4.4-1mdk
- took SRPM from ClanLib web site
- Mandrake adaptations
- ugly: take the Magick stuff from CVS to compile with ImageMagick 5
- mega headache; had to redefine CXXFLAGS to remove -mcpu=pentiumpro