freeglut/freeglut.spec

247 lines
7.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package freeglut (Version 060903)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: freeglut
BuildRequires: Mesa-devel gcc-c++ libdrm-devel pkgconfig xorg-x11-devel
Summary: Freely licensed alternative to the GLUT library
Version: 060903
Release: 122
Url: http://freeglut.sourceforge.net/
%define USE_EXTERNAL_MESA 1
Source0: freeglut-%{version}.tar.bz2
Source1: glutman.tar.bz2
Source2: glxdemos.tar.bz2
Source3: xdriinfo-1.0.2.tar.bz2
Source4: compat70.tar.bz2
Patch: freeglut-%{version}.diff
Patch1: glxdemos.diff
License: X11/MIT
Provides: mesaglut
Obsoletes: mesaglut
Group: System/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Freeglut is a completely open source alternative to the OpenGL Utility
Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to
support the sample programs in the second edition OpenGL Redbook. Since
then, GLUT has been used in a wide variety of practical applications
because it is simple, universally available, and highly portable.
GLUT (and freeglut) allow the user to create and manage windows
containing OpenGL contexts and also read the mouse, keyboard, and
joystick functions on a wide range of platforms.
Authors:
--------
Pawel W. Olszta
Andreas Umbach
Steve Baker
%package devel
License: X11/MIT
Summary: Development libraries, includes and man pages for freeglut (GLUT Library)
Group: Development/Libraries/X11
Requires: %{name} = %{version}-%{release} xorg-x11-Mesa-devel xorg-x11-devel
Provides: mesaglut-devel
Obsoletes: mesaglut-devel
%description devel
This package contains all necessary include files and libraries needed
to compile and link applications for the freeglut library.
In addition, it also includes manual pages which describe all functions
provided by the freeglut library.
freeglut is a completely open source alternative to the OpenGL Utility
Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to
support the sample programs in the second edition OpenGL Redbook. Since
then, GLUT has been used in a wide variety of practical applications
because it is simple, universally available, and highly portable.
GLUT (and freeglut) allow the user to create and manage windows
containing OpenGL contexts and also read the mouse, keyboard, and
joystick functions on a wide range of platforms.
%prep
%setup -q -b1 -b2 -b3 -b4 -n freeglut
%patch
%if %USE_EXTERNAL_MESA
pushd ..
%patch1
# Change lib -> %_lib
if [ "%_lib" != lib ] ; then
for f in `find usr/ \! -wholename '*/include/*' -type f -print` ; do
sed -i 's|/lib/|/%_lib/|g;s|/lib$|/%_lib|' "$f"
done
for f in `find usr/ -wholename '*/lib/*' -type f -print` ; do
d="`echo "$f" | sed 's|/lib|/%_lib|g'`"
mkdir -p "`dirname "$d"`"
mv "$f" "$d"
done
find usr -type d -print | xargs rmdir 2>/dev/null || true
fi
popd
%endif
%build
autoreconf -fi
CFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=/usr --libdir=%_libdir
make %{?jobs:-j%jobs}
%if %USE_EXTERNAL_MESA
pushd ..
for i in glxinfo glxgears; do
pushd $i; xmkmf -a; make CDEBUGFLAGS="$RPM_OPT_FLAGS"; popd
done
pushd xdriinfo-*
test -f /usr/%_lib/pkgconfig/x11.pc || \
export PKG_CONFIG_PATH=/usr/%_lib/pkgconfig:$RPM_BUILD_DIR/usr/%_lib/pkgconfig
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --mandir=%{_mandir}
make
popd
popd
%endif
%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
# remove demos
rm -f ${RPM_BUILD_ROOT}/usr/bin/{fractals*,lorenz,one}
# glut Manual Pages
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man3
pushd ../glut-3.7
for i in man/glut/glut*; do
install -m 644 $i ${RPM_BUILD_ROOT}/%{_mandir}/man3/`basename $i man`3
done
popd
%if %USE_EXTERNAL_MESA
pushd ..
for i in glxinfo glxgears; do
pushd $i
make install DESTDIR=$RPM_BUILD_ROOT BINDIR=/usr/bin
make install.man DESTDIR=$RPM_BUILD_ROOT MANDIR=%_mandir/man1
popd
done
pushd xdriinfo-*
make install DESTDIR=$RPM_BUILD_ROOT
popd
popd
%endif
%post
%run_ldconfig
%postun
%run_ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%if %USE_EXTERNAL_MESA
/usr/bin/glxgears
/usr/bin/glxinfo
/usr/bin/xdriinfo
%{_mandir}/man1/glxgears.1x.gz
%{_mandir}/man1/glxinfo.1x.gz
%{_mandir}/man1/xdriinfo.1.gz
%endif
%{_libdir}/libglut.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/GL/*
%{_libdir}/libglut.a
%{_libdir}/libglut.la
%{_libdir}/libglut.so
%{_mandir}/man3/*
%changelog
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
for multilib support
* Sat Aug 18 2007 sndirsch@suse.de
- xdriinfo 1.0.2
* X.Org bug #10616: Add all the X info commands to See Also in
man page
* Mon Sep 04 2006 sndirsch@suse.de
- update to current CVS (2006-09-03)
* Check fgets for return value to avoid warnings
* Sun Jul 23 2006 sndirsch@suse.de
- updated xdriinfo
- fixed build for X.Org 7
* Thu Jan 26 2006 mls@suse.de
- fix BuildRequires
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Nov 11 2005 sndirsch@suse.de
- moved glxinfo/glxgears/xdriinfo from -devel to main package
* Fri Nov 11 2005 sndirsch@suse.de
- updated to current CVS (05-11-10) to fix all these "freeglut
ERROR: Function <glut<whatever>> called without first calling
'glutInit'" errors, which prevented many programs from starting
(e.g. FlightGear); freeglut 2.4 seems known to be broken :-(
* Mon Nov 07 2005 sndirsch@suse.de
- switched to external built Mesa
* Wed Oct 26 2005 sndirsch@suse.de
- added build of glxinfo/glxgears/xdriinfo when %%USE_EXTERNAL_MESA
is set
* Fri Jun 24 2005 sndirsch@suse.de
- update to final release 2.4.0
* Fri Jun 10 2005 sndirsch@suse.de
- removed "-Werror"
* Mon Jun 06 2005 sndirsch@suse.de
- update to release 2.4.0-rc4
- obsoletes freeglut-gcc4.diff
* Sun Apr 10 2005 sndirsch@suse.de
- new gcc4 patch (use the bits of CVS)
* Thu Apr 07 2005 meissner@suse.de
- fortran does not appear to be needed here (just libtool
checks for it as standard).
* Sat Apr 02 2005 coolo@suse.de
- fix casts
* Thu Apr 29 2004 coolo@suse.de
- build parallel if available
- build as user
* Mon Dec 15 2003 sndirsch@suse.de
- updated to release 2.2.0
* Mousewheel Support for Win32 & X11
* More unified Win32/*nix behavior and code
* Code style cleanups
* Visibility support in Win32
* Many other Good Bug Fixes
* Sat Dec 06 2003 sndirsch@suse.de
- updated to release 2.0.1
* fixes a number of bugs with menus
* Fri Oct 10 2003 adrian@suse.de
- fix build for mips
- satisfy configure checks
* Thu Oct 02 2003 sndirsch@suse.de
- provides/obsoletes mesaglut/mesglut-devel now
* Tue Sep 30 2003 sndirsch@suse.de
- removed demos
* Tue Sep 30 2003 sndirsch@suse.de
- added GLUT manual pages
* Tue Sep 30 2003 sndirsch@suse.de
- updated to final release 2.0.0
* Thu Aug 14 2003 sndirsch@suse.de
- added GameMode fix (GameModeFixes-4.dif)
* Thu Aug 07 2003 sndirsch@suse.de
- created package