]>
Commit | Line | Data |
---|---|---|
1 | # TODO: nvtt | |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_with fbx # Autodesk FBX SDK support (proprietary) | |
5 | %bcond_with ffmpeg # FFmpeg support, needs ffmpeg < 5 | |
6 | ||
7 | Summary: Open Scene Graph - real-time visualization library | |
8 | Summary(pl.UTF-8): Open Scene Graph - biblioteka do wizualizacji | |
9 | Name: OpenSceneGraph | |
10 | Version: 3.6.5 | |
11 | Release: 3 | |
12 | License: OpenSceneGraph Public Licence (based on LGPL with exceptions) | |
13 | Group: X11/Libraries | |
14 | #Source0Download: https://github.com/openscenegraph/OpenSceneGraph/releases | |
15 | Source0: https://github.com/openscenegraph/OpenSceneGraph/archive/%{name}-%{version}.tar.gz | |
16 | # Source0-md5: 51b1c6ee5627246e78b23adbf0aa48f8 | |
17 | # https://src.fedoraproject.org/rpms/OpenSceneGraph/blob/rawhide/f/OpenSceneGraph_asio.patch | |
18 | Patch0: %{name}-asio.patch | |
19 | Patch1: %{name}-OpenCASCADE.patch | |
20 | Patch2: %{name}-gta.patch | |
21 | # https://src.fedoraproject.org/rpms/OpenSceneGraph/blob/rawhide/f/OpenSceneGraph-openexr3.patch | |
22 | Patch3: %{name}-openexr3.patch | |
23 | URL: https://www.openscenegraph.org/index.php/33-openscenegraph/4-front-page | |
24 | BuildRequires: Coin-devel | |
25 | BuildRequires: EGL-devel | |
26 | BuildRequires: OpenCASCADE-devel >= 7.8.0 | |
27 | BuildRequires: OpenEXR-devel | |
28 | BuildRequires: OpenGL-devel >= 2 | |
29 | BuildRequires: Qt5Core-devel >= 5 | |
30 | BuildRequires: Qt5Gui-devel >= 5 | |
31 | BuildRequires: Qt5OpenGL-devel >= 5 | |
32 | BuildRequires: Qt5Widgets-devel >= 5 | |
33 | BuildRequires: SoXt-devel | |
34 | BuildRequires: EGL-devel | |
35 | BuildRequires: SDL2-devel >= 2 | |
36 | BuildRequires: asio-devel >= 1.11 | |
37 | BuildRequires: boost-devel >= 1.37 | |
38 | BuildRequires: cairo-devel | |
39 | BuildRequires: cmake >= 2.8.0 | |
40 | BuildRequires: collada-dom-devel | |
41 | BuildRequires: curl-devel | |
42 | BuildRequires: dcmtk-devel | |
43 | %{?with_fbx:BuildRequires: fbxsdk-devel} | |
44 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel} | |
45 | BuildRequires: fontconfig-devel | |
46 | BuildRequires: freetype-devel >= 2 | |
47 | BuildRequires: gdal-devel | |
48 | BuildRequires: giflib-devel | |
49 | BuildRequires: glib2-devel >= 2.0 | |
50 | BuildRequires: gstreamer-plugins-base-devel | |
51 | BuildRequires: gtk+2-devel | |
52 | # only for osgviewerGTK, which is not built | |
53 | #BuildRequires: gtkglext-devel | |
54 | BuildRequires: jasper-devel | |
55 | BuildRequires: libgta-devel | |
56 | BuildRequires: libjpeg-devel | |
57 | BuildRequires: liblas-devel | |
58 | BuildRequires: libpng-devel | |
59 | BuildRequires: librsvg-devel >= 1:2.35 | |
60 | BuildRequires: libtiff-devel | |
61 | BuildRequires: libvncserver-devel | |
62 | BuildRequires: lua52-devel >= 5.2 | |
63 | BuildRequires: pkgconfig | |
64 | BuildRequires: poppler-glib-devel | |
65 | BuildRequires: qt5-build >= 5 | |
66 | BuildRequires: qt5-qmake >= 5 | |
67 | BuildRequires: rpmbuild(macros) >= 1.605 | |
68 | BuildRequires: unzip | |
69 | BuildRequires: xorg-lib-libX11-devel | |
70 | BuildRequires: xorg-lib-libXinerama-devel | |
71 | BuildRequires: xorg-lib-libXrandr-devel | |
72 | BuildRequires: zlib-devel | |
73 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
74 | ||
75 | #define specflags -std=c++11 | |
76 | ||
77 | %description | |
78 | The Open Scene Graph is a cross-platform C++/OpenGL library for the | |
79 | real-time visualization. | |
80 | ||
81 | %description -l pl.UTF-8 | |
82 | Open Scene Graph to wieloplatformowa oparta o C++ i OpenGL biblioteka | |
83 | do wizualizacji w czasie rzeczywistym. | |
84 | ||
85 | %package plugins | |
86 | Summary: Plugins for Open Scene Graph | |
87 | Summary(pl.UTF-8): Wtyczki dla biblioteki Open Scene Graph | |
88 | Group: Libraries | |
89 | Requires: %{name} = %{version}-%{release} | |
90 | Requires: librsvg-devel >= 1:2.35 | |
91 | ||
92 | %description plugins | |
93 | Plugins for Open Scene Graph library. | |
94 | ||
95 | %description plugins -l pl.UTF-8 | |
96 | Wtyczki dla biblioteki Open Scene Graph. | |
97 | ||
98 | %package devel | |
99 | Summary: Header files for Open Scene Graph | |
100 | Summary(pl.UTF-8): Pliki nagłówkowe dla Open Scene Graph | |
101 | Group: Development/Libraries | |
102 | Requires: %{name} = %{version}-%{release} | |
103 | ||
104 | %description devel | |
105 | Headers file for OSD library. | |
106 | ||
107 | %description devel -l pl.UTF-8 | |
108 | Pliki nagłówkowe dla biblioteki Open Scene Graph. | |
109 | ||
110 | %package examples | |
111 | Summary: Examples for Open Scene Graph | |
112 | Summary(pl.UTF-8): Przykłady dla Open Scene Graph | |
113 | Group: Development/Libraries | |
114 | Requires: %{name} = %{version}-%{release} | |
115 | ||
116 | %description examples | |
117 | Examples for Open Scene Graph Library. | |
118 | ||
119 | %description examples -l pl.UTF-8 | |
120 | Przykłady dla biblioteki Open Scene Graph. | |
121 | ||
122 | %prep | |
123 | %setup -q -n %{name}-%{name}-%{version} | |
124 | %patch0 -p1 | |
125 | %patch1 -p1 | |
126 | %patch2 -p1 | |
127 | %patch3 -p1 | |
128 | ||
129 | %build | |
130 | install -d build | |
131 | cd build | |
132 | %cmake .. \ | |
133 | -DDESIRED_QT_VERSION=5 \ | |
134 | %if "%{_lib}" == "lib64" | |
135 | -DLIB_POSTFIX=64 \ | |
136 | %endif | |
137 | %if "%{_lib}" == "libx32" | |
138 | -DLIB_POSTFIX=x32 \ | |
139 | %endif | |
140 | %{!?with_ffmpeg:-DCMAKE_DISABLE_FIND_PACKAGE_FFmpeg=1} \ | |
141 | -DOSG_USE_LOCAL_LUA_SOURCE=OFF | |
142 | ||
143 | %{__make} | |
144 | ||
145 | %install | |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
148 | ||
149 | cp -a examples/osg* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
150 | ||
151 | %{__make} -C build install \ | |
152 | DESTDIR=$RPM_BUILD_ROOT | |
153 | ||
154 | %clean | |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
157 | %post -p /sbin/ldconfig | |
158 | %postun -p /sbin/ldconfig | |
159 | ||
160 | %files | |
161 | %defattr(644,root,root,755) | |
162 | %doc AUTHORS.txt ChangeLog LICENSE.txt NEWS.txt README.md | |
163 | %attr(755,root,root) %{_libdir}/libOpenThreads.so.*.*.* | |
164 | %attr(755,root,root) %ghost %{_libdir}/libOpenThreads.so.21 | |
165 | %attr(755,root,root) %{_libdir}/libosg.so.*.*.* | |
166 | %attr(755,root,root) %ghost %{_libdir}/libosg.so.161 | |
167 | %attr(755,root,root) %{_libdir}/libosgAnimation.so.*.*.* | |
168 | %attr(755,root,root) %ghost %{_libdir}/libosgAnimation.so.161 | |
169 | %attr(755,root,root) %{_libdir}/libosgDB.so.*.*.* | |
170 | %attr(755,root,root) %ghost %{_libdir}/libosgDB.so.161 | |
171 | %attr(755,root,root) %{_libdir}/libosgFX.so.*.*.* | |
172 | %attr(755,root,root) %ghost %{_libdir}/libosgFX.so.161 | |
173 | %attr(755,root,root) %{_libdir}/libosgGA.so.*.*.* | |
174 | %attr(755,root,root) %ghost %{_libdir}/libosgGA.so.161 | |
175 | %attr(755,root,root) %{_libdir}/libosgManipulator.so.*.*.* | |
176 | %attr(755,root,root) %ghost %{_libdir}/libosgManipulator.so.161 | |
177 | %attr(755,root,root) %{_libdir}/libosgParticle.so.*.*.* | |
178 | %attr(755,root,root) %ghost %{_libdir}/libosgParticle.so.161 | |
179 | %attr(755,root,root) %{_libdir}/libosgPresentation.so.*.*.* | |
180 | %attr(755,root,root) %ghost %{_libdir}/libosgPresentation.so.161 | |
181 | #%attr(755,root,root) %{_libdir}/libosgQt.so.*.*.* | |
182 | #%attr(755,root,root) %ghost %{_libdir}/libosgQt.so.141 | |
183 | %attr(755,root,root) %{_libdir}/libosgShadow.so.*.*.* | |
184 | %attr(755,root,root) %ghost %{_libdir}/libosgShadow.so.161 | |
185 | %attr(755,root,root) %{_libdir}/libosgSim.so.*.*.* | |
186 | %attr(755,root,root) %ghost %{_libdir}/libosgSim.so.161 | |
187 | %attr(755,root,root) %{_libdir}/libosgTerrain.so.*.*.* | |
188 | %attr(755,root,root) %ghost %{_libdir}/libosgTerrain.so.161 | |
189 | %attr(755,root,root) %{_libdir}/libosgText.so.*.*.* | |
190 | %attr(755,root,root) %ghost %{_libdir}/libosgText.so.161 | |
191 | %attr(755,root,root) %{_libdir}/libosgUI.so.*.*.* | |
192 | %attr(755,root,root) %ghost %{_libdir}/libosgUI.so.161 | |
193 | %attr(755,root,root) %{_libdir}/libosgUtil.so.*.*.* | |
194 | %attr(755,root,root) %ghost %{_libdir}/libosgUtil.so.161 | |
195 | %attr(755,root,root) %{_libdir}/libosgViewer.so.*.*.* | |
196 | %attr(755,root,root) %ghost %{_libdir}/libosgViewer.so.161 | |
197 | %attr(755,root,root) %{_libdir}/libosgVolume.so.*.*.* | |
198 | %attr(755,root,root) %ghost %{_libdir}/libosgVolume.so.161 | |
199 | %attr(755,root,root) %{_libdir}/libosgWidget.so.*.*.* | |
200 | %attr(755,root,root) %ghost %{_libdir}/libosgWidget.so.161 | |
201 | ||
202 | %files plugins | |
203 | %defattr(644,root,root,755) | |
204 | %dir %{_libdir}/osgPlugins-%{version} | |
205 | %attr(755,root,root) %{_libdir}/osgPlugins-%{version}/*.so | |
206 | ||
207 | %files devel | |
208 | %defattr(644,root,root,755) | |
209 | %attr(755,root,root) %{_libdir}/libOpenThreads.so | |
210 | %attr(755,root,root) %{_libdir}/libosg.so | |
211 | %attr(755,root,root) %{_libdir}/libosgAnimation.so | |
212 | %attr(755,root,root) %{_libdir}/libosgDB.so | |
213 | %attr(755,root,root) %{_libdir}/libosgFX.so | |
214 | %attr(755,root,root) %{_libdir}/libosgGA.so | |
215 | %attr(755,root,root) %{_libdir}/libosgManipulator.so | |
216 | %attr(755,root,root) %{_libdir}/libosgParticle.so | |
217 | %attr(755,root,root) %{_libdir}/libosgPresentation.so | |
218 | #%attr(755,root,root) %{_libdir}/libosgQt.so | |
219 | %attr(755,root,root) %{_libdir}/libosgShadow.so | |
220 | %attr(755,root,root) %{_libdir}/libosgSim.so | |
221 | %attr(755,root,root) %{_libdir}/libosgTerrain.so | |
222 | %attr(755,root,root) %{_libdir}/libosgText.so | |
223 | %attr(755,root,root) %{_libdir}/libosgUI.so | |
224 | %attr(755,root,root) %{_libdir}/libosgUtil.so | |
225 | %attr(755,root,root) %{_libdir}/libosgViewer.so | |
226 | %attr(755,root,root) %{_libdir}/libosgVolume.so | |
227 | %attr(755,root,root) %{_libdir}/libosgWidget.so | |
228 | %{_includedir}/OpenThreads | |
229 | %{_includedir}/osg* | |
230 | %{_pkgconfigdir}/openscenegraph.pc | |
231 | %{_pkgconfigdir}/openthreads.pc | |
232 | %{_pkgconfigdir}/openscenegraph-osg.pc | |
233 | %{_pkgconfigdir}/openscenegraph-osgAnimation.pc | |
234 | %{_pkgconfigdir}/openscenegraph-osgDB.pc | |
235 | %{_pkgconfigdir}/openscenegraph-osgFX.pc | |
236 | %{_pkgconfigdir}/openscenegraph-osgGA.pc | |
237 | %{_pkgconfigdir}/openscenegraph-osgManipulator.pc | |
238 | %{_pkgconfigdir}/openscenegraph-osgParticle.pc | |
239 | #%{_pkgconfigdir}/openscenegraph-osgQt.pc | |
240 | %{_pkgconfigdir}/openscenegraph-osgShadow.pc | |
241 | %{_pkgconfigdir}/openscenegraph-osgSim.pc | |
242 | %{_pkgconfigdir}/openscenegraph-osgTerrain.pc | |
243 | %{_pkgconfigdir}/openscenegraph-osgText.pc | |
244 | %{_pkgconfigdir}/openscenegraph-osgUtil.pc | |
245 | %{_pkgconfigdir}/openscenegraph-osgViewer.pc | |
246 | %{_pkgconfigdir}/openscenegraph-osgVolume.pc | |
247 | %{_pkgconfigdir}/openscenegraph-osgWidget.pc | |
248 | ||
249 | %files examples | |
250 | %defattr(644,root,root,755) | |
251 | %attr(755,root,root) %{_bindir}/osgarchive | |
252 | %attr(755,root,root) %{_bindir}/osgconv | |
253 | %attr(755,root,root) %{_bindir}/osgfilecache | |
254 | %attr(755,root,root) %{_bindir}/osgversion | |
255 | %attr(755,root,root) %{_bindir}/osgviewer | |
256 | %attr(755,root,root) %{_bindir}/present3D | |
257 | %{_examplesdir}/%{name}-%{version} |