]>
Commit | Line | Data |
---|---|---|
fe21aefb | 1 | # |
899bef05 | 2 | # Conditional build: |
e9103d17 | 3 | %bcond_without apidocs # API documentation (with man pages) |
899bef05 | 4 | %bcond_without static_libs # static library |
e05060fa | 5 | |
fe21aefb | 6 | Summary: High-level, retained-mode toolkit for effective 3D graphics development |
899bef05 | 7 | Summary(pl.UTF-8): Wysokopoziomowy toolkit do efektywnego rozwijania grafiki 3D |
fe21aefb | 8 | Name: Coin |
e9103d17 JB |
9 | Version: 4.0.0 |
10 | Release: 1 | |
11 | License: BSD | |
466db9d4 | 12 | Group: X11/Libraries |
e9103d17 JB |
13 | Source0: https://github.com/coin3d/coin/releases/download/%{name}-%{version}/%{name}-%{version}-src.tar.gz |
14 | # Source0-md5: 2377d11b38c8eddd92d8bb240f5bf4ee | |
15 | Patch0: %{name}-link.patch | |
16 | URL: https://github.com/coin3d/coin/wiki | |
17 | BuildRequires: OpenAL-devel | |
466db9d4 | 18 | BuildRequires: OpenGL-GLU-devel |
19 | BuildRequires: OpenGL-devel | |
e9103d17 | 20 | BuildRequires: boost-devel |
899bef05 | 21 | BuildRequires: bzip2-devel |
e9103d17 JB |
22 | BuildRequires: cmake >= 3.0 |
23 | %{?with_apidocs:BuildRequires: doxygen} | |
24 | BuildRequires: expat-devel >= 1:2.2.6 | |
25 | BuildRequires: fontconfig-devel | |
26 | BuildRequires: freetype-devel >= 2 | |
466db9d4 | 27 | BuildRequires: libstdc++-devel |
aa71e61c | 28 | BuildRequires: pkgconfig |
e9103d17 | 29 | BuildRequires: simage-devel |
466db9d4 | 30 | BuildRequires: xorg-lib-libX11-devel |
899bef05 | 31 | BuildRequires: zlib-devel |
fe21aefb MK |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
466db9d4 | 34 | %description |
35 | High-level, retained-mode toolkit for effective 3D graphics | |
899bef05 JB |
36 | development. It's fully compatible with SGI Open Inventor 2.1. |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Wysokopoziomowy toolkit trybu przechowującego do efektywnego | |
40 | rozwijania grafiki 3D. Jest w pełni kompatybilny z pakietem SGI Open | |
41 | Inventor 2.1. | |
fe21aefb MK |
42 | |
43 | %package devel | |
899bef05 JB |
44 | Summary: Header files for Coin3D library |
45 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Coin3D | |
466db9d4 | 46 | Group: X11/Development/Libraries |
14b3cc83 | 47 | Requires: %{name} = %{version}-%{release} |
3f4e6aa9 JB |
48 | Obsoletes: openinventor-devel |
49 | Obsoletes: sgi-OpenInventor-devel | |
fe21aefb MK |
50 | |
51 | %description devel | |
899bef05 | 52 | Header files for Coin3D library. |
fe21aefb MK |
53 | |
54 | %description devel -l pl.UTF-8 | |
899bef05 | 55 | Pliki nagłówkowe biblioteki Coin3D. |
fe21aefb | 56 | |
899bef05 JB |
57 | %package static |
58 | Summary: Static Coin3D library | |
59 | Summary(pl.UTF-8): Statyczna biblioteka Coin3D | |
60 | Group: X11/Development/Libraries | |
61 | Requires: %{name}-devel = %{version}-%{release} | |
fe21aefb | 62 | |
899bef05 JB |
63 | %description static |
64 | Static Coin3D library. | |
fe21aefb | 65 | |
899bef05 JB |
66 | %description static -l pl.UTF-8 |
67 | Statyczna biblioteka Coin3D. | |
fe21aefb | 68 | |
e9103d17 JB |
69 | %package apidocs |
70 | Summary: API documentation for Coin library | |
71 | Summary(pl.UTF-8): Dokumentacja API biblioteki Coin | |
72 | Group: Documentation | |
73 | %{?noarchpackage} | |
74 | ||
75 | %description apidocs | |
76 | API documentation for Coin library. | |
77 | ||
78 | %description apidocs -l pl.UTF-8 | |
79 | Dokumentacja API biblioteki Coin. | |
80 | ||
899bef05 | 81 | %prep |
e9103d17 | 82 | %setup -q -n coin |
899bef05 | 83 | %patch0 -p1 |
fe21aefb MK |
84 | |
85 | %build | |
e9103d17 JB |
86 | # COIN_HAVE_JAVASCRIPT=OFF because it relies on obsolete JS_GetStringBytes function |
87 | %define cmake_opts \\\ | |
88 | -DCOIN_BUILD_TESTS=OFF \\\ | |
89 | -DCOIN_HAVE_JAVASCRIPT=OFF \\\ | |
90 | -DFONTCONFIG_RUNTIME_LINKING=OFF \\\ | |
91 | -DFREETYPE_RUNTIME_LINKING=OFF \\\ | |
92 | -DGLU_RUNTIME_LINKING=OFF \\\ | |
93 | -DLIBBZIP2_RUNTIME_LINKING=OFF \\\ | |
94 | -DOPENAL_RUNTIME_LINKING=OFF \\\ | |
95 | -DSIMAGE_RUNTIME_LINKING=OFF \\\ | |
96 | -DSPIDERMONKEY_INCLUDE_DIR=/usr/include/js187 \\\ | |
97 | -DSPIDERMONKEY_RUNTIME_LINKING=OFF \\\ | |
98 | -DZLIB_RUNTIME_LINKING=OFF \\\ | |
99 | -DUSE_EXTERNAL_EXPAT=ON | |
100 | ||
101 | install -d builddir | |
102 | cd builddir | |
103 | %cmake .. \ | |
104 | %{cmake_opts} \ | |
105 | %if %{with apidocs} | |
106 | -DCOIN_BUILD_DOCUMENTATION=ON \ | |
107 | -DCOIN_BUILD_DOCUMENTATION_MAN=ON | |
108 | %endif | |
109 | ||
110 | %{__make} | |
111 | cd .. | |
112 | ||
113 | %if %{with static_libs} | |
114 | install -d builddir-static | |
115 | cd builddir-static | |
116 | %cmake .. \ | |
117 | %{cmake_opts} \ | |
118 | -DCOIN_BUILD_SHARED_LIBS=OFF | |
119 | ||
120 | %{__make} | |
121 | cd .. | |
122 | %endif | |
fe21aefb MK |
123 | |
124 | %install | |
125 | rm -rf $RPM_BUILD_ROOT | |
899bef05 | 126 | |
e9103d17 JB |
127 | %if %{with static_libs} |
128 | %{__make} -C builddir-static install \ | |
129 | DESTDIR=$RPM_BUILD_ROOT | |
130 | %endif | |
fe21aefb | 131 | |
e9103d17 | 132 | %{__make} -C builddir install \ |
fe21aefb MK |
133 | DESTDIR=$RPM_BUILD_ROOT |
134 | ||
e9103d17 JB |
135 | # missed by cmake suite |
136 | install -d $RPM_BUILD_ROOT%{_mandir}/man1 | |
137 | cp -p man/man1/coin-config.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
138 | ||
139 | %if %{with apidocs} | |
140 | # packaged as %doc | |
141 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html | |
142 | # too generic names, not public API etc. | |
143 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/{JS*,SpiderMonkey_t,VRMLnodes,XML,_*_,[a-z]*}.3 | |
144 | %endif | |
145 | # bogus location | |
146 | %{__rm} -r $RPM_BUILD_ROOT%{_infodir}/Coin4 | |
899bef05 | 147 | |
fe21aefb MK |
148 | %clean |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
fe21aefb MK |
151 | %post -p /sbin/ldconfig |
152 | %postun -p /sbin/ldconfig | |
fe21aefb | 153 | |
fe21aefb MK |
154 | %files |
155 | %defattr(644,root,root,755) | |
899bef05 | 156 | %doc AUTHORS COPYING ChangeLog FAQ FAQ.legal NEWS README README.UNIX RELNOTES THANKS |
466db9d4 | 157 | %attr(755,root,root) %{_libdir}/libCoin.so.*.*.* |
e9103d17 | 158 | %attr(755,root,root) %ghost %{_libdir}/libCoin.so.80 |
fe21aefb | 159 | %{_datadir}/%{name} |
fe21aefb | 160 | |
14b3cc83 | 161 | %files devel |
fe21aefb | 162 | %defattr(644,root,root,755) |
e05060fa | 163 | %attr(755,root,root) %{_bindir}/coin-config |
e9103d17 | 164 | %attr(755,root,root) %{_libdir}/libCoin.so |
899bef05 JB |
165 | %dir %{_includedir}/Inventor |
166 | %{_includedir}/Inventor/C | |
167 | %{_includedir}/Inventor/VRMLnodes | |
168 | %{_includedir}/Inventor/actions | |
169 | %{_includedir}/Inventor/annex | |
170 | %{_includedir}/Inventor/bundles | |
171 | %{_includedir}/Inventor/caches | |
172 | %{_includedir}/Inventor/collision | |
173 | %{_includedir}/Inventor/details | |
174 | %{_includedir}/Inventor/draggers | |
175 | %{_includedir}/Inventor/elements | |
176 | %{_includedir}/Inventor/engines | |
177 | %{_includedir}/Inventor/errors | |
178 | %{_includedir}/Inventor/events | |
179 | %{_includedir}/Inventor/fields | |
180 | %{_includedir}/Inventor/lists | |
181 | %{_includedir}/Inventor/lock | |
182 | %{_includedir}/Inventor/manips | |
183 | %{_includedir}/Inventor/misc | |
e9103d17 | 184 | %{_includedir}/Inventor/navigation |
899bef05 JB |
185 | %{_includedir}/Inventor/nodekits |
186 | %{_includedir}/Inventor/nodes | |
187 | %{_includedir}/Inventor/projectors | |
188 | %{_includedir}/Inventor/scxml | |
189 | %{_includedir}/Inventor/sensors | |
190 | %{_includedir}/Inventor/system | |
191 | %{_includedir}/Inventor/threads | |
192 | %{_includedir}/Inventor/tools | |
193 | %{_includedir}/Inventor/Sb*.h | |
194 | %{_includedir}/Inventor/So*.h | |
195 | %{_includedir}/Inventor/non_winsys.h | |
196 | %{_includedir}/Inventor/oivwin32.h | |
14b3cc83 MK |
197 | %{_includedir}/SoDebug.h |
198 | %{_includedir}/SoWinEnterScope.h | |
199 | %{_includedir}/SoWinLeaveScope.h | |
899bef05 | 200 | %{_pkgconfigdir}/Coin.pc |
e9103d17 | 201 | %{_libdir}/cmake/Coin-%{version} |
e05060fa | 202 | %{_mandir}/man1/coin-config.1* |
e9103d17 JB |
203 | %if %{with apidocs} |
204 | %{_mandir}/man3/Coin*.3* | |
899bef05 JB |
205 | %{_mandir}/man3/Sb*.3* |
206 | %{_mandir}/man3/Sc*.3* | |
207 | %{_mandir}/man3/So*.3* | |
e9103d17 | 208 | %endif |
899bef05 JB |
209 | |
210 | %if %{with static_libs} | |
211 | %files static | |
212 | %defattr(644,root,root,755) | |
213 | %{_libdir}/libCoin.a | |
214 | %endif | |
e9103d17 JB |
215 | |
216 | %if %{with apidocs} | |
217 | %files apidocs | |
218 | %defattr(644,root,root,755) | |
219 | %doc builddir/html/*.{css,html,js,png} | |
220 | %endif |