]> git.pld-linux.org Git - packages/opencsg.git/blob - opencsg.spec
c6450f484260fa977c101fbc5ad65b3e5d36b127
[packages/opencsg.git] / opencsg.spec
1 Summary:        Library for Constructive Solid Geometry using OpenGL
2 Name:           opencsg
3 Version:        1.4.0
4 Release:        1
5 Group:          Libraries
6 # license.txt contains a linking exception for CGAL
7 License:        GPLv2 with exceptions
8 URL:            http://www.opencsg.org/
9 Source0:        http://www.opencsg.org/OpenCSG-%{version}.tar.gz
10 # Source0-md5:  e7fe5fa2bfa1b466f470699da41eb0a2
11 Patch0:         %{name}-build.patch
12 BuildRequires:  dos2unix
13 BuildRequires:  freeglut-devel
14 BuildRequires:  glew-devel
15 BuildRequires:  qt-devel
16
17 %description
18 OpenCSG is a library that does image-based CSG rendering using OpenGL.
19
20 CSG is short for Constructive Solid Geometry and denotes an approach
21 to model complex 3D-shapes using simpler ones. I.e., two shapes can be
22 combined by taking the union of them, by intersecting them, or by
23 subtracting one shape of the other. The most basic shapes, which are
24 not result of such a CSG operation, are called primitives. Primitives
25 must be solid, i.e., they must have a clearly defined interior and
26 exterior. By construction, a CSG shape is also solid then.
27
28 Image-based CSG rendering (also z-buffer CSG rendering) is a term that
29 denotes algorithms for rendering CSG shapes without an explicit
30 calculation of the geometric boundary of a CSG shape. Such algorithms
31 use frame-buffer settings of the graphics hardware, e.g., the depth
32 and stencil buffer, to compose CSG shapes. OpenCSG implements a
33 variety of those algorithms, namely the Goldfeather algorithm and the
34 SCS algorithm, both of them in several variants.
35
36 %package devel
37 Summary:        OpenCSG development files
38 Group:          Development/Libraries
39 Requires:       %{name}%{?_isa} = %{version}-%{release}
40
41 %description devel
42 Development files for OpenCSG.
43
44 %prep
45 %setup -q -n OpenCSG-%{version}
46 %patch0 -p1
47
48 rm src/Makefile RenderTexture/Makefile Makefile example/Makefile
49 dos2unix license.txt
50 # New FSF Address
51 for FILE in src/*.h src/*.cpp include/opencsg.h
52 do
53   sed -i s/"59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"/"51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"/ $FILE
54 done
55
56 # Use Fedora's glew
57 rm -rf glew/
58
59 %build
60 qmake-qt4
61 %{__make}
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 # No make install
66 chmod g-w lib/*
67 install -d $RPM_BUILD_ROOT/%{_libdir}
68 install -d $RPM_BUILD_ROOT/%{_includedir}
69 cp -pP lib/* $RPM_BUILD_ROOT/%{_libdir}/
70 cp -p include/opencsg.h $RPM_BUILD_ROOT/%{_includedir}/
71
72 %post -p /sbin/ldconfig
73 %postun -p /sbin/ldconfig
74
75 %files
76 %defattr(644,root,root,755)
77 %doc changelog.txt doc license.txt
78 %attr(755,root,root) %{_libdir}/libopencsg.so.*.*
79 %attr(755,root,root) %ghost %{_libdir}/libopencsg.so.1
80
81 %files devel
82 %defattr(644,root,root,755)
83 %{_includedir}/*
84 %attr(755,root,root) %{_libdir}/libopencsg.so
85
86 %changelog
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
This page took 0.083198 seconds and 2 git commands to generate.