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