forked from pool/freeglut
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/freeglut?expand=0&rev=19
195 lines
5.4 KiB
RPMSpec
195 lines
5.4 KiB
RPMSpec
#
|
|
# spec file for package freeglut (Version 100529)
|
|
#
|
|
# Copyright (c) 2010 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/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: freeglut
|
|
BuildRequires: Mesa-devel gcc-c++ libdrm-devel pkgconfig xorg-x11-devel
|
|
Summary: Freely licensed alternative to the GLUT library
|
|
Version: 100529
|
|
Release: 2
|
|
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.4.tar.bz2
|
|
Source4: compat70.tar.bz2
|
|
Source5: baselibs.conf
|
|
Patch1: glxdemos.diff
|
|
Patch10: freeglut-glxgears-notify.diff
|
|
Patch11: freeglut-glxinfo-notify.diff
|
|
License: MIT
|
|
Provides: mesaglut
|
|
Obsoletes: mesaglut
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: freeglut-64bit
|
|
%endif
|
|
#
|
|
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: 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
|
|
# 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.
|
|
|
|
|
|
|
|
%prep
|
|
%setup -q -b1 -b2 -b3 -b4 -n freeglut
|
|
%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
|
|
pushd ../glxgears
|
|
%patch10 -p1
|
|
popd
|
|
pushd ../glxinfo
|
|
%patch11 -p1
|
|
popd
|
|
|
|
%build
|
|
autoreconf -fi
|
|
%configure --disable-static --with-pic
|
|
make %{?jobs:-j%jobs}
|
|
%if %USE_EXTERNAL_MESA
|
|
pushd ..
|
|
for i in glxinfo glxgears; do
|
|
pushd $i; xmkmf -a; make %{?jobs:-j%jobs} 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
|
|
%configure --disable-static --with-pic
|
|
make %{?jobs:-j%jobs}
|
|
popd
|
|
popd
|
|
%endif
|
|
|
|
%install
|
|
%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
|
|
%{__rm} -f %{buildroot}%{_libdir}/*.la
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/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.so
|
|
%{_mandir}/man3/*
|
|
|
|
%changelog
|