]>
Commit | Line | Data |
---|---|---|
bc4d8343 JB |
1 | # |
2 | # Conditional build: | |
f5cf276d | 3 | %bcond_without apidocs # API documentation |
bc4d8343 | 4 | %bcond_without static_libs # static library |
f5cf276d | 5 | %bcond_with qt4 # Qt4 instead of Qt5 |
bcc3495f JB |
6 | %bcond_without qt5 # Qt5 (default) |
7 | %bcond_with qt6 # Qt6 instead of Qt5 | |
8 | ||
9 | %if %{with qt4} || %{with qt6} | |
10 | %undefine with_qt5 | |
11 | %endif | |
12 | %if %{without qt4} && %{without qt5} && %{without qt6} | |
13 | %{error: at least one Qt version must be enabled} | |
14 | %endif | |
21be1716 | 15 | |
bc4d8343 JB |
16 | Summary: Qt GUI component toolkit library for Coin |
17 | Summary(pl.UTF-8): Biblioteka komponentu graficznego interfejsu Qt dla biblioteki Coin | |
4c1945f6 | 18 | Name: SoQt |
bcc3495f | 19 | Version: 1.6.2 |
f5cf276d JB |
20 | Release: 1 |
21 | License: BSD | |
25e879a1 | 22 | Group: X11/Libraries |
f5cf276d | 23 | #Source0Download: https://github.com/coin3d/soqt/releases |
bcc3495f JB |
24 | Source0: https://github.com/coin3d/soqt/releases/download/v%{version}/soqt-%{version}-src.tar.gz |
25 | # Source0-md5: 70ef0990e009d806c59941d819a62c98 | |
bc4d8343 | 26 | Patch0: %{name}-pc.patch |
f5cf276d JB |
27 | URL: https://github.com/coin3d/soqt |
28 | BuildRequires: Coin-devel >= 4.0.0 | |
bc4d8343 | 29 | BuildRequires: OpenGL-GLX-devel |
f5cf276d | 30 | %if %{with qt4} |
bc4d8343 JB |
31 | BuildRequires: QtCore-devel >= 4 |
32 | BuildRequires: QtGui-devel >= 4 | |
33 | BuildRequires: QtOpenGL-devel >= 4 | |
bcc3495f JB |
34 | %endif |
35 | %if %{with qt5} | |
f5cf276d JB |
36 | BuildRequires: Qt5Core-devel >= 5 |
37 | BuildRequires: Qt5Gui-devel >= 5 | |
38 | BuildRequires: Qt5OpenGL-devel >= 5 | |
39 | BuildRequires: Qt5Widgets-devel >= 5 | |
40 | %endif | |
bcc3495f JB |
41 | %if %{with qt6} |
42 | BuildRequires: Qt6Core-devel >= 6 | |
43 | BuildRequires: Qt6Gui-devel >= 6 | |
44 | BuildRequires: Qt6OpenGL-devel >= 6 | |
45 | BuildRequires: Qt6Widgets-devel >= 6 | |
46 | %endif | |
f5cf276d JB |
47 | BuildRequires: cmake >= 3.0 |
48 | %{?with_apidocs:BuildRequires: doxygen} | |
bc4d8343 | 49 | BuildRequires: libstdc++-devel |
bc4d8343 | 50 | BuildRequires: pkgconfig |
f5cf276d | 51 | %if %{with qt4} |
bc4d8343 | 52 | BuildRequires: qt4-build >= 4 |
bcc3495f JB |
53 | %endif |
54 | %if %{with qt5} | |
f5cf276d JB |
55 | BuildRequires: qt5-build >= 5 |
56 | %endif | |
bcc3495f JB |
57 | %if %{with qt6} |
58 | BuildRequires: qt6-build >= 6 | |
59 | %endif | |
f5cf276d | 60 | BuildRequires: rpmbuild(macros) >= 1.752 |
bc4d8343 JB |
61 | BuildRequires: xorg-lib-libX11-devel |
62 | BuildRequires: xorg-lib-libXext-devel | |
63 | BuildRequires: xorg-lib-libXmu-devel | |
4c1945f6 MK |
64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
65 | ||
66 | %description | |
bc4d8343 JB |
67 | SoQt is a Qt GUI component toolkit library for Coin. It is also |
68 | compatible with SGI and TGS Open Inventor, and the API is based on the | |
69 | API of the InventorXt GUI component toolkit. | |
4c1945f6 MK |
70 | |
71 | %description -l pl.UTF-8 | |
bc4d8343 JB |
72 | SoQt to biblioteka toolkitu komponentu graficznego interfejsu |
73 | użytkownika (GUI) Qt dla biblioteki Coin. Jest zgodna także z | |
74 | biblioteką SGI i TGS Open Inventor, a API jest oparte na API toolkitu | |
75 | komponentu graficznego interfejsu użytkownika InventorXt. | |
4c1945f6 MK |
76 | |
77 | %package devel | |
bc4d8343 JB |
78 | Summary: Header files for SoQt library |
79 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki SoQt | |
80 | Group: X11/Development/Libraries | |
25e879a1 | 81 | Requires: %{name} = %{version}-%{release} |
f5cf276d JB |
82 | Requires: Coin-devel >= 4.0.0 |
83 | %if %{with qt4} | |
b3de0d4c | 84 | Requires: QtCore-devel >= 4 |
f5cf276d JB |
85 | Requires: QtGui-devel >= 4 |
86 | Requires: QtOpenGL-devel >= 4 | |
bcc3495f JB |
87 | %endif |
88 | %if %{with qt5} | |
f5cf276d JB |
89 | Requires: Qt5Core-devel >= 5 |
90 | Requires: Qt5Gui-devel >= 5 | |
91 | Requires: Qt5OpenGL-devel >= 5 | |
92 | Requires: Qt5Widgets-devel >= 5 | |
93 | %endif | |
bcc3495f JB |
94 | %if %{with qt6} |
95 | Requires: Qt6Core-devel >= 6 | |
96 | Requires: Qt6Gui-devel >= 6 | |
97 | Requires: Qt6OpenGL-devel >= 6 | |
98 | Requires: Qt6Widgets-devel >= 6 | |
99 | %endif | |
4c1945f6 MK |
100 | |
101 | %description devel | |
25e879a1 | 102 | Header files for SoQt library. |
4c1945f6 MK |
103 | |
104 | %description devel -l pl.UTF-8 | |
bc4d8343 JB |
105 | Pliki nagłówkowe biblioteki SoQt. |
106 | ||
107 | %package static | |
108 | Summary: Static SoQt library | |
109 | Summary(pl.UTF-8): Statyczna biblioteka SoQt | |
110 | Group: X11/Development/Libraries | |
111 | Requires: %{name} = %{version}-%{release} | |
4c1945f6 | 112 | |
bc4d8343 JB |
113 | %description static |
114 | Static SoQt library. | |
115 | ||
116 | %description static -l pl.UTF-8 | |
117 | Statyczna biblioteka SoQt. | |
4c1945f6 | 118 | |
f5cf276d JB |
119 | %package apidocs |
120 | Summary: API documentation for SoQt library | |
121 | Summary(pl.UTF-8): Dokumentacja API biblioteki SoQt | |
122 | Group: Documentation | |
6febb0fe | 123 | BuildArch: noarch |
f5cf276d JB |
124 | |
125 | %description apidocs | |
126 | API documentation for SoQt library. | |
127 | ||
128 | %description apidocs -l pl.UTF-8 | |
129 | Dokumentacja API biblioteki SoQt. | |
130 | ||
4c1945f6 | 131 | %prep |
f5cf276d | 132 | %setup -q -n soqt |
bc4d8343 | 133 | %patch0 -p1 |
4c1945f6 | 134 | |
bc4d8343 | 135 | %build |
f5cf276d JB |
136 | install -d builddir |
137 | cd builddir | |
138 | %cmake .. \ | |
139 | %if %{with apidocs} | |
140 | -DSOQT_BUILD_DOCUMENTATION=ON \ | |
141 | -DSOQT_BUILD_DOC_MAN=ON \ | |
142 | %endif | |
bcc3495f JB |
143 | %{!?with_qt5:-DSOQT_USE_QT5=OFF} \ |
144 | %{!?with_qt6:-DSOQT_USE_QT6=OFF} | |
4c1945f6 | 145 | |
f5cf276d JB |
146 | %{__make} |
147 | cd .. | |
148 | ||
149 | %if %{with static_libs} | |
150 | install -d builddir-static | |
151 | cd builddir-static | |
152 | %cmake .. \ | |
153 | -DSOQT_BUILD_SHARED_LIBS=OFF \ | |
bcc3495f JB |
154 | %{!?with_qt5:-DSOQT_USE_QT5=OFF} \ |
155 | %{!?with_qt6:-DSOQT_USE_QT6=OFF} | |
4c1945f6 | 156 | |
bc4d8343 | 157 | %{__make} |
f5cf276d JB |
158 | cd .. |
159 | %endif | |
4c1945f6 MK |
160 | |
161 | %install | |
162 | rm -rf $RPM_BUILD_ROOT | |
4c1945f6 | 163 | |
f5cf276d JB |
164 | %if %{with static_libs} |
165 | %{__make} -C builddir-static install \ | |
166 | DESTDIR=$RPM_BUILD_ROOT | |
167 | %endif | |
168 | ||
169 | %{__make} -C builddir install \ | |
4c1945f6 MK |
170 | DESTDIR=$RPM_BUILD_ROOT |
171 | ||
f5cf276d JB |
172 | %if %{with apidocs} |
173 | # packaged as %doc | |
174 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html | |
175 | # to common names etc. | |
176 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/{_*_,components,devices,misc,viewers}.3 | |
177 | %endif | |
bc4d8343 | 178 | |
4c1945f6 MK |
179 | %clean |
180 | rm -rf $RPM_BUILD_ROOT | |
181 | ||
4c1945f6 MK |
182 | %post -p /sbin/ldconfig |
183 | %postun -p /sbin/ldconfig | |
4c1945f6 | 184 | |
4c1945f6 MK |
185 | %files |
186 | %defattr(644,root,root,755) | |
bc4d8343 | 187 | %doc AUTHORS BUGS.txt COPYING ChangeLog FAQ NEWS README |
25e879a1 | 188 | %attr(755,root,root) %{_libdir}/libSoQt.so.*.*.* |
bc4d8343 | 189 | %attr(755,root,root) %ghost %{_libdir}/libSoQt.so.20 |
f5cf276d | 190 | %{_datadir}/SoQt |
25e879a1 | 191 | |
25e879a1 | 192 | %files devel |
4c1945f6 | 193 | %defattr(644,root,root,755) |
bc4d8343 | 194 | %attr(755,root,root) %{_libdir}/libSoQt.so |
25e879a1 | 195 | %{_includedir}/Inventor/Qt |
bc4d8343 | 196 | %{_pkgconfigdir}/SoQt.pc |
f5cf276d JB |
197 | %{_libdir}/cmake/SoQt-%{version} |
198 | %if %{with apidocs} | |
199 | %{_mandir}/man3/SoQt*.3* | |
200 | %endif | |
bc4d8343 JB |
201 | |
202 | %if %{with static_libs} | |
203 | %files static | |
204 | %defattr(644,root,root,755) | |
205 | %{_libdir}/libSoQt.a | |
206 | %endif | |
f5cf276d JB |
207 | |
208 | %if %{with apidocs} | |
209 | %files apidocs | |
210 | %defattr(644,root,root,755) | |
211 | %doc builddir/html/*.{css,html,js,png} | |
212 | %endif |