]>
Commit | Line | Data |
---|---|---|
8d929887 JB |
1 | # TODO: nvtt |
2 | # | |
3 | # Conditional build: | |
a6dfb7c3 JR |
4 | %bcond_with fbx # Autodesk FBX SDK support (proprietary) |
5 | %bcond_with ffmpeg # FFmpeg support, needs ffmpeg < 5 | |
8d929887 | 6 | |
aa6260c4 | 7 | Summary: Open Scene Graph - real-time visualization library |
741aa9a5 | 8 | Summary(pl.UTF-8): Open Scene Graph - biblioteka do wizualizacji |
aa6260c4 | 9 | Name: OpenSceneGraph |
8d929887 | 10 | Version: 3.6.5 |
a6dfb7c3 | 11 | Release: 2 |
dc9af0b2 | 12 | License: OpenSceneGraph Public Licence (based on LGPL with exceptions) |
e14fd2e0 | 13 | Group: X11/Libraries |
8d929887 JB |
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 | |
27 | BuildRequires: OpenEXR-devel | |
28 | BuildRequires: OpenGL-devel >= 2 | |
0019aed0 JB |
29 | BuildRequires: Qt5Core-devel >= 5 |
30 | BuildRequires: Qt5Gui-devel >= 5 | |
31 | BuildRequires: Qt5OpenGL-devel >= 5 | |
32 | BuildRequires: Qt5Widgets-devel >= 5 | |
8d929887 JB |
33 | BuildRequires: SoXt-devel |
34 | BuildRequires: EGL-devel | |
35 | BuildRequires: SDL2-devel >= 2 | |
41ae154e JB |
36 | BuildRequires: asio-devel >= 1.11 |
37 | BuildRequires: boost-devel >= 1.37 | |
21b804c4 | 38 | BuildRequires: cairo-devel |
8d929887 JB |
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} | |
a6dfb7c3 | 44 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel} |
8d929887 JB |
45 | BuildRequires: fontconfig-devel |
46 | BuildRequires: freetype-devel >= 2 | |
47 | BuildRequires: gdal-devel | |
ec9562e7 | 48 | BuildRequires: giflib-devel |
8d929887 JB |
49 | BuildRequires: glib2-devel >= 2.0 |
50 | BuildRequires: gstreamer-plugins-base-devel | |
21b804c4 | 51 | BuildRequires: gtk+2-devel |
8d929887 JB |
52 | # only for osgviewerGTK, which is not built |
53 | #BuildRequires: gtkglext-devel | |
54 | BuildRequires: jasper-devel | |
55 | BuildRequires: libgta-devel | |
e14fd2e0 | 56 | BuildRequires: libjpeg-devel |
8d929887 | 57 | BuildRequires: liblas-devel |
aa6260c4 | 58 | BuildRequires: libpng-devel |
8d929887 | 59 | BuildRequires: librsvg-devel >= 1:2.35 |
e14fd2e0 | 60 | BuildRequires: libtiff-devel |
8d929887 JB |
61 | BuildRequires: libvncserver-devel |
62 | BuildRequires: lua52-devel >= 5.2 | |
7e1c418e | 63 | BuildRequires: pkgconfig |
21b804c4 | 64 | BuildRequires: poppler-glib-devel |
0019aed0 JB |
65 | BuildRequires: qt5-build >= 5 |
66 | BuildRequires: qt5-qmake >= 5 | |
8d929887 | 67 | BuildRequires: rpmbuild(macros) >= 1.605 |
654f31ce | 68 | BuildRequires: unzip |
8d929887 JB |
69 | BuildRequires: xorg-lib-libX11-devel |
70 | BuildRequires: xorg-lib-libXinerama-devel | |
71 | BuildRequires: xorg-lib-libXrandr-devel | |
aa6260c4 | 72 | BuildRequires: zlib-devel |
b1b72335 | 73 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
aa6260c4 | 74 | |
6ea9c807 JR |
75 | %define specflags -std=c++11 |
76 | ||
aa6260c4 | 77 | %description |
30ec309c | 78 | The Open Scene Graph is a cross-platform C++/OpenGL library for the |
79 | real-time visualization. | |
aa6260c4 | 80 | |
4043c7f8 | 81 | %description -l pl.UTF-8 |
e14fd2e0 JB |
82 | Open Scene Graph to wieloplatformowa oparta o C++ i OpenGL biblioteka |
83 | do wizualizacji w czasie rzeczywistym. | |
aa6260c4 | 84 | |
8d929887 JB |
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 | ||
aa6260c4 | 98 | %package devel |
0a55f959 | 99 | Summary: Header files for Open Scene Graph |
741aa9a5 | 100 | Summary(pl.UTF-8): Pliki nagłówkowe dla Open Scene Graph |
e14fd2e0 | 101 | Group: Development/Libraries |
f372d505 | 102 | Requires: %{name} = %{version}-%{release} |
e14fd2e0 | 103 | |
0a55f959 | 104 | %description devel |
aa6260c4 | 105 | Headers file for OSD library. |
e14fd2e0 | 106 | |
4043c7f8 JR |
107 | %description devel -l pl.UTF-8 |
108 | Pliki nagłówkowe dla biblioteki Open Scene Graph. | |
aa6260c4 | 109 | |
110 | %package examples | |
0a55f959 | 111 | Summary: Examples for Open Scene Graph |
741aa9a5 | 112 | Summary(pl.UTF-8): Przykłady dla Open Scene Graph |
e14fd2e0 | 113 | Group: Development/Libraries |
f372d505 | 114 | Requires: %{name} = %{version}-%{release} |
e14fd2e0 | 115 | |
aa6260c4 | 116 | %description examples |
e14fd2e0 | 117 | Examples for Open Scene Graph Library. |
aa6260c4 | 118 | |
4043c7f8 JR |
119 | %description examples -l pl.UTF-8 |
120 | Przykłady dla biblioteki Open Scene Graph. | |
e14fd2e0 | 121 | |
aa6260c4 | 122 | %prep |
8d929887 | 123 | %setup -q -n %{name}-%{name}-%{version} |
dc4bfa5c | 124 | %patch0 -p1 |
41ae154e | 125 | %patch1 -p1 |
8d929887 JB |
126 | %patch2 -p1 |
127 | %patch3 -p1 | |
aa6260c4 | 128 | |
aa6260c4 | 129 | %build |
d320e70d | 130 | install -d build |
aae24add | 131 | cd build |
8d929887 | 132 | %cmake .. \ |
0019aed0 | 133 | -DDESIRED_QT_VERSION=5 \ |
8d929887 JB |
134 | %if "%{_lib}" == "lib64" |
135 | -DLIB_POSTFIX=64 \ | |
136 | %endif | |
137 | %if "%{_lib}" == "libx32" | |
564f3b9e JR |
138 | -DLIB_POSTFIX=x32 \ |
139 | %endif | |
a6dfb7c3 | 140 | %{!?with_ffmpeg:-DCMAKE_DISABLE_FIND_PACKAGE_FFmpeg=1} \ |
8d929887 JB |
141 | -DOSG_USE_LOCAL_LUA_SOURCE=OFF |
142 | ||
aae24add | 143 | %{__make} |
aa6260c4 | 144 | |
145 | %install | |
146 | rm -rf $RPM_BUILD_ROOT | |
aae24add | 147 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
dc9af0b2 | 148 | |
82ff5fc4 | 149 | cp -a examples/osg* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
bc23ad7f JB |
150 | |
151 | %{__make} -C build install \ | |
152 | DESTDIR=$RPM_BUILD_ROOT | |
aa6260c4 | 153 | |
aa6260c4 | 154 | %clean |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
e14fd2e0 JB |
157 | %post -p /sbin/ldconfig |
158 | %postun -p /sbin/ldconfig | |
159 | ||
aa6260c4 | 160 | %files |
e14fd2e0 | 161 | %defattr(644,root,root,755) |
8d929887 | 162 | %doc AUTHORS.txt ChangeLog LICENSE.txt NEWS.txt README.md |
d320e70d | 163 | %attr(755,root,root) %{_libdir}/libOpenThreads.so.*.*.* |
8d929887 | 164 | %attr(755,root,root) %ghost %{_libdir}/libOpenThreads.so.21 |
d320e70d | 165 | %attr(755,root,root) %{_libdir}/libosg.so.*.*.* |
8d929887 | 166 | %attr(755,root,root) %ghost %{_libdir}/libosg.so.161 |
d320e70d | 167 | %attr(755,root,root) %{_libdir}/libosgAnimation.so.*.*.* |
8d929887 | 168 | %attr(755,root,root) %ghost %{_libdir}/libosgAnimation.so.161 |
d320e70d | 169 | %attr(755,root,root) %{_libdir}/libosgDB.so.*.*.* |
8d929887 | 170 | %attr(755,root,root) %ghost %{_libdir}/libosgDB.so.161 |
d320e70d | 171 | %attr(755,root,root) %{_libdir}/libosgFX.so.*.*.* |
8d929887 | 172 | %attr(755,root,root) %ghost %{_libdir}/libosgFX.so.161 |
d320e70d | 173 | %attr(755,root,root) %{_libdir}/libosgGA.so.*.*.* |
8d929887 | 174 | %attr(755,root,root) %ghost %{_libdir}/libosgGA.so.161 |
d320e70d | 175 | %attr(755,root,root) %{_libdir}/libosgManipulator.so.*.*.* |
8d929887 | 176 | %attr(755,root,root) %ghost %{_libdir}/libosgManipulator.so.161 |
d320e70d | 177 | %attr(755,root,root) %{_libdir}/libosgParticle.so.*.*.* |
8d929887 | 178 | %attr(755,root,root) %ghost %{_libdir}/libosgParticle.so.161 |
7362f54e | 179 | %attr(755,root,root) %{_libdir}/libosgPresentation.so.*.*.* |
8d929887 JB |
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 | |
d320e70d | 183 | %attr(755,root,root) %{_libdir}/libosgShadow.so.*.*.* |
8d929887 | 184 | %attr(755,root,root) %ghost %{_libdir}/libosgShadow.so.161 |
d320e70d | 185 | %attr(755,root,root) %{_libdir}/libosgSim.so.*.*.* |
8d929887 | 186 | %attr(755,root,root) %ghost %{_libdir}/libosgSim.so.161 |
d320e70d | 187 | %attr(755,root,root) %{_libdir}/libosgTerrain.so.*.*.* |
8d929887 | 188 | %attr(755,root,root) %ghost %{_libdir}/libosgTerrain.so.161 |
d320e70d | 189 | %attr(755,root,root) %{_libdir}/libosgText.so.*.*.* |
8d929887 | 190 | %attr(755,root,root) %ghost %{_libdir}/libosgText.so.161 |
a08cd58a | 191 | %attr(755,root,root) %{_libdir}/libosgUI.so.*.*.* |
8d929887 | 192 | %attr(755,root,root) %ghost %{_libdir}/libosgUI.so.161 |
d320e70d | 193 | %attr(755,root,root) %{_libdir}/libosgUtil.so.*.*.* |
8d929887 | 194 | %attr(755,root,root) %ghost %{_libdir}/libosgUtil.so.161 |
d320e70d | 195 | %attr(755,root,root) %{_libdir}/libosgViewer.so.*.*.* |
8d929887 | 196 | %attr(755,root,root) %ghost %{_libdir}/libosgViewer.so.161 |
d320e70d | 197 | %attr(755,root,root) %{_libdir}/libosgVolume.so.*.*.* |
8d929887 | 198 | %attr(755,root,root) %ghost %{_libdir}/libosgVolume.so.161 |
d320e70d | 199 | %attr(755,root,root) %{_libdir}/libosgWidget.so.*.*.* |
8d929887 | 200 | %attr(755,root,root) %ghost %{_libdir}/libosgWidget.so.161 |
aae24add RT |
201 | |
202 | %files plugins | |
203 | %defattr(644,root,root,755) | |
66751831 BZ |
204 | %dir %{_libdir}/osgPlugins-%{version} |
205 | %attr(755,root,root) %{_libdir}/osgPlugins-%{version}/*.so | |
aa6260c4 | 206 | |
207 | %files devel | |
e14fd2e0 | 208 | %defattr(644,root,root,755) |
d320e70d JB |
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 | |
7362f54e | 217 | %attr(755,root,root) %{_libdir}/libosgPresentation.so |
8d929887 | 218 | #%attr(755,root,root) %{_libdir}/libosgQt.so |
d320e70d JB |
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 | |
a08cd58a | 223 | %attr(755,root,root) %{_libdir}/libosgUI.so |
d320e70d JB |
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 | |
dc9af0b2 | 229 | %{_includedir}/osg* |
d320e70d JB |
230 | %{_pkgconfigdir}/openscenegraph.pc |
231 | %{_pkgconfigdir}/openthreads.pc | |
5ecf278e SS |
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 | |
8d929887 | 239 | #%{_pkgconfigdir}/openscenegraph-osgQt.pc |
5ecf278e SS |
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 | |
aa6260c4 | 248 | |
249 | %files examples | |
e14fd2e0 | 250 | %defattr(644,root,root,755) |
8d929887 JB |
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 | |
f372d505 | 257 | %{_examplesdir}/%{name}-%{version} |