]> git.pld-linux.org Git - packages/Coin.git/blob - Coin.spec
- updated to 4.0.2
[packages/Coin.git] / Coin.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation (with man pages)
4 %bcond_without  static_libs     # static library
5
6 Summary:        High-level, retained-mode toolkit for effective 3D graphics development
7 Summary(pl.UTF-8):      Wysokopoziomowy toolkit do efektywnego rozwijania grafiki 3D
8 Name:           Coin
9 Version:        4.0.2
10 Release:        1
11 License:        BSD
12 Group:          X11/Libraries
13 Source0:        https://github.com/coin3d/coin/releases/download/v%{version}/coin-%{version}-src.tar.gz
14 # Source0-md5:  1dd89262e2e9e44a046e803515387bdf
15 Patch0:         %{name}-link.patch
16 URL:            https://github.com/coin3d/coin/wiki
17 BuildRequires:  OpenAL-devel
18 BuildRequires:  OpenGL-GLU-devel
19 BuildRequires:  OpenGL-devel
20 BuildRequires:  boost-devel
21 BuildRequires:  bzip2-devel
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
27 BuildRequires:  libstdc++-devel
28 BuildRequires:  pkgconfig
29 BuildRequires:  simage-devel
30 BuildRequires:  xorg-lib-libX11-devel
31 BuildRequires:  zlib-devel
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 High-level, retained-mode toolkit for effective 3D graphics
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.
42
43 %package devel
44 Summary:        Header files for Coin3D library
45 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Coin3D
46 Group:          X11/Development/Libraries
47 Requires:       %{name} = %{version}-%{release}
48 Obsoletes:      openinventor-devel < 2.2
49 Obsoletes:      sgi-OpenInventor-devel < 2.2
50
51 %description devel
52 Header files for Coin3D library.
53
54 %description devel -l pl.UTF-8
55 Pliki nagłówkowe biblioteki Coin3D.
56
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}
62
63 %description static
64 Static Coin3D library.
65
66 %description static -l pl.UTF-8
67 Statyczna biblioteka Coin3D.
68
69 %package apidocs
70 Summary:        API documentation for Coin library
71 Summary(pl.UTF-8):      Dokumentacja API biblioteki Coin
72 Group:          Documentation
73 BuildArch:      noarch
74
75 %description apidocs
76 API documentation for Coin library.
77
78 %description apidocs -l pl.UTF-8
79 Dokumentacja API biblioteki Coin.
80
81 %prep
82 %setup -q -n coin
83 %patch0 -p1
84
85 %build
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
123
124 %install
125 rm -rf $RPM_BUILD_ROOT
126
127 %if %{with static_libs}
128 %{__make} -C builddir-static install \
129         DESTDIR=$RPM_BUILD_ROOT
130 %endif
131
132 %{__make} -C builddir install \
133         DESTDIR=$RPM_BUILD_ROOT
134
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/{_*_,[a-z]*}.3
144 %endif
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %post   -p /sbin/ldconfig
150 %postun -p /sbin/ldconfig
151
152 %files
153 %defattr(644,root,root,755)
154 %doc AUTHORS COPYING ChangeLog FAQ FAQ.legal NEWS README.UNIX README.md RELNOTES THANKS
155 %attr(755,root,root) %{_libdir}/libCoin.so.*.*.*
156 %attr(755,root,root) %ghost %{_libdir}/libCoin.so.80
157 %{_datadir}/%{name}
158
159 %files devel
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_bindir}/coin-config
162 %attr(755,root,root) %{_libdir}/libCoin.so
163 %dir %{_includedir}/Inventor
164 %{_includedir}/Inventor/C
165 %{_includedir}/Inventor/VRMLnodes
166 %{_includedir}/Inventor/actions
167 %{_includedir}/Inventor/annex
168 %{_includedir}/Inventor/bundles
169 %{_includedir}/Inventor/caches
170 %{_includedir}/Inventor/collision
171 %{_includedir}/Inventor/details
172 %{_includedir}/Inventor/draggers
173 %{_includedir}/Inventor/elements
174 %{_includedir}/Inventor/engines
175 %{_includedir}/Inventor/errors
176 %{_includedir}/Inventor/events
177 %{_includedir}/Inventor/fields
178 %{_includedir}/Inventor/lists
179 %{_includedir}/Inventor/lock
180 %{_includedir}/Inventor/manips
181 %{_includedir}/Inventor/misc
182 %{_includedir}/Inventor/navigation
183 %{_includedir}/Inventor/nodekits
184 %{_includedir}/Inventor/nodes
185 %{_includedir}/Inventor/projectors
186 %{_includedir}/Inventor/scxml
187 %{_includedir}/Inventor/sensors
188 %{_includedir}/Inventor/system
189 %{_includedir}/Inventor/threads
190 %{_includedir}/Inventor/tools
191 %{_includedir}/Inventor/Sb*.h
192 %{_includedir}/Inventor/So*.h
193 %{_includedir}/Inventor/non_winsys.h
194 %{_includedir}/Inventor/oivwin32.h
195 %{_includedir}/SoDebug.h
196 %{_includedir}/SoWinEnterScope.h
197 %{_includedir}/SoWinLeaveScope.h
198 %{_pkgconfigdir}/Coin.pc
199 %{_libdir}/cmake/Coin-%{version}
200 %{_mandir}/man1/coin-config.1*
201 %if %{with apidocs}
202 %{_mandir}/man3/Coin*.3*
203 %{_mandir}/man3/Sb*.3*
204 %{_mandir}/man3/Sc*.3*
205 %{_mandir}/man3/So*.3*
206 %endif
207
208 %if %{with static_libs}
209 %files static
210 %defattr(644,root,root,755)
211 %{_libdir}/libCoin.a
212 %endif
213
214 %if %{with apidocs}
215 %files apidocs
216 %defattr(644,root,root,755)
217 %doc builddir/html/*.{css,html,js,png}
218 %endif
This page took 0.148642 seconds and 4 git commands to generate.