Name: opencsg Version: 1.3.2 Release: 1%{?dist} Summary: OpenCSG Constructive Solid Geometry rendering library URL: http://www.opencsg.org/ Source0: http://www.opencsg.org/OpenCSG-%{version}.tar.gz # Fedora-specific patch to use GLEW shared library rather than building it Patch0: opencsg-sharedlib.patch License: GPLv2 and zlib Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: freeglut-devel BuildRequires: glew-devel BuildRequires: dos2unix %description OpenCSG is a library that does image-based Constructive Solid Geometry (CSG) rendering using OpenGL. Image-based CSG rendering (also z-buffer CSG rendering) denotes algorithms for rendering CSG shapes without an explicit calculation of the geometric boundary of a CSG shape. Such algorithms use frame-buffer settings of the graphics hardware, e.g., the depth and stencil buffer, to compose CSG shapes. OpenCSG implements a variety of those algorithms, namely the Goldfeather algorithm and the SCS algorithm, both of them in several variants. %package devel Summary: Development files for OpenCSG library and example program Group: Development/Libraries Requires: opencsg = %{version}-%{release} %description devel Development files for the OpenCSG library and example program %prep %setup -q -n OpenCSG-%{version} rm -r glew %patch0 -p1 -b .sharedlib dos2unix license.txt %build make CFLAGS="%{optflags} -fPIC" CXXFLAGS="%{optflags} -fPIC" %{?_smp_mflags} %install install -d -m 755 %{buildroot}%{_libdir} install -p -m 755 lib/libopencsg.so.%{version} %{buildroot}%{_libdir} ln -s libopencsg.so.%{version} %{buildroot}%{_libdir}/libopencsg.so.`echo %{version} | sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/'` ln -s libopencsg.so.%{version} %{buildroot}%{_libdir}/libopencsg.so.`echo %{version} | sed 's/\([0-9]*\\).[0-9]*\.[0-9]*/\1/'` ln -s libopencsg.so.%{version} %{buildroot}%{_libdir}/libopencsg.so install -d -m 755 %{buildroot}%{_includedir} install -p -m 644 include/opencsg.h %{buildroot}%{_includedir} install -d -m 755 %{buildroot}%{_bindir} install -p -m 755 example/opencsgexample %{buildroot}%{_bindir} %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc license.txt %{_libdir}/libopencsg.so.* %files devel %doc build.txt changelog.txt index.html news.html publications.html %doc img %{_includedir}/opencsg.h %{_libdir}/libopencsg.so %{_bindir}/opencsgexample %changelog * Wed Jul 13 2012 Eric Smith - 1.3.2-1 - initial version