freeglut/freeglut.spec
Stephan Kulow 943791b250 Accepting request 104737 from devel:libraries:c_c++
- fix baselibs.conf for devel-32bit

- Rename demos package to freeglut-demo to match other demo packages
- Honor shared library policy:
  * Rename base package to libglut3 and adjust baselibs.conf accordingly
- Ran spec-cleaner

- Update to pre-2.8.0 git
  * Use a prefixed version (2.7.99)
- Install already built demos
  * Add -demos subpackage
- Remove obsolete compat70.tar.bz2
- glxgears, xdriinfo and glxinfo are part of Mesa-demos-base
  * Remove glxdemos.tar.bz2, glxdemos.diff, xdriinfo.tar.bz2
    freeglut-glxgears.notify.diff and freeglut-glxinfo.notify.diff

OBS-URL: https://build.opensuse.org/request/show/104737
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/freeglut?expand=0&rev=24
2012-02-21 06:30:36 +00:00

173 lines
5.8 KiB
RPMSpec

#
# spec file for package freeglut
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define debug 0
Name: freeglut
Version: 2.7.99.svn20111107.0422
Release: 0
Summary: Freely licensed alternative to the GLUT library
License: MIT
Group: System/Libraries
Url: http://freeglut.sourceforge.net/
Source: freeglut.tar.bz2
Source1: glutman.tar.bz2
BuildRequires: Mesa-devel
BuildRequires: gcc-c++
BuildRequires: libdrm-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: xorg-x11-devel
Recommends: Mesa-demos-base
Provides: mesaglut = 7.11
Obsoletes: mesaglut < 7.11
# bug437293
%ifarch ppc64
Obsoletes: freeglut-64bit
%endif
#
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.
%package -n libglut3
Summary: Freely licensed alternative to the GLUT library
Group: Development/Libraries/X11
%description -n libglut3
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.
%package devel
Summary: Development libraries, includes and man pages for freeglut (GLUT Library)
Group: Development/Libraries/X11
Requires: libglut3 = %{version}
Requires: xorg-x11-Mesa-devel
Requires: xorg-x11-devel
Provides: mesaglut-devel = 7.11
Obsoletes: mesaglut-devel < 7.11
# bug437293
%ifarch ppc64
Obsoletes: freeglut-devel-64bit
%endif
#
%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.
%package demo
Summary: Demonstration applications for the freeglut library
Group: System/X11/Utilities
%description demo
This package contains demonstration applications for 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 -b0 -b1 -n freeglut
%build
./autogen.sh
%configure \
--enable-replace-glut \
%if %debug
--enable-debug \
%endif
--disable-static
make %{?_smp_mflags}
%install
%make_install
# install demo files
install -d %{buildroot}%{_libexecdir}/freeglut
for i in shapes smooth_opengl3 spaceball subwin CallbackMaker; do
install progs/demos/$i/.libs/$i %{buildroot}%{_libexecdir}/freeglut/$i
done
install progs/demos/Fractals/.libs/fractals %{buildroot}%{_libexecdir}/freeglut/fractals
install progs/demos/Fractals_random/.libs/fractals_random %{buildroot}%{_libexecdir}/freeglut/fractals_random
install progs/demos/One/.libs/one %{buildroot}%{_libexecdir}/freeglut/one
install progs/demos/Lorenz/.libs/lorenz %{buildroot}%{_libexecdir}/freeglut/lorenz
# glut Manual Pages
mkdir -p %{buildroot}/%{_mandir}/man3
for i in ../glut-3.7/man/glut/glut*; do
install -m 644 $i %{buildroot}/%{_mandir}/man3/`basename $i man`3
done
rm -rf %{buildroot}%{_libdir}/libglut.la
%post -n libglut3 -p /sbin/ldconfig
%postun -n libglut3 -p /sbin/ldconfig
%files -n libglut3
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%{_libdir}/libglut.so.*
%files devel
%defattr(-,root,root)
%doc ChangeLog
%{_includedir}/GL
%{_libdir}/libglut.so
%{_mandir}/man3/*
%files demo
%defattr(-,root,root)
%{_libexecdir}/freeglut
%changelog