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