]>
Commit | Line | Data |
---|---|---|
7ff1fe90 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Documentation | |
4 | %bcond_without webengine # WebEngine plugin | |
5 | ||
b3971eef JB |
6 | %ifarch x32 |
7 | %undefine webengine | |
8 | %endif | |
9 | ||
7ff1fe90 JB |
10 | %define orgname qtwebview |
11 | %define qtbase_ver %{version} | |
12 | %define qtdeclarative_ver %{version} | |
13 | %define qttools_ver %{version} | |
14 | %define qtwebengine_ver %{version} | |
15 | Summary: The Qt5 WebView library | |
16 | Summary(pl.UTF-8): Biblioteka Qt5 WebView | |
17 | Name: qt5-%{orgname} | |
18 | Version: 5.15.2 | |
19 | Release: 1 | |
20 | License: LGPL v3 or GPL v2+ or commercial | |
21 | Group: X11/Libraries | |
22 | Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz | |
23 | # Source0-md5: 5ed6778d83cf7a49128af201eb0ebf64 | |
24 | URL: https://www.qt.io/ | |
25 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} | |
26 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} | |
27 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
28 | BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
29 | %{?with_webengine:BuildRequires: Qt5WebEngine-devel >= %{qtwebengine_ver}} | |
30 | %if %{with doc} | |
31 | BuildRequires: qt5-assistant >= %{qttools_ver} | |
32 | BuildRequires: qt5-doc-common >= %{qttools_ver} | |
33 | %endif | |
34 | BuildRequires: qt5-build >= %{qtbase_ver} | |
35 | BuildRequires: qt5-qmake >= %{qtbase_ver} | |
36 | BuildRequires: rpm-build >= 4.6 | |
37 | BuildRequires: rpmbuild(macros) >= 1.752 | |
38 | BuildRequires: tar >= 1:1.22 | |
39 | BuildRequires: xz | |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %define specflags -fno-strict-aliasing | |
43 | %define qt5dir %{_libdir}/qt5 | |
44 | ||
45 | %description | |
46 | Qt is a cross-platform application and UI framework. Using Qt, you can | |
47 | write web-enabled applications once and deploy them across desktop, | |
48 | mobile and embedded systems without rewriting the source code. | |
49 | ||
50 | This package contains Qt5 WebView library. | |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
54 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
55 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
56 | źródłowego. | |
57 | ||
58 | Ten pakiet zawiera bibliotekę Qt5 WebView. | |
59 | ||
60 | %package -n Qt5WebView | |
61 | Summary: The Qt5 WebView library | |
62 | Summary(pl.UTF-8): Biblioteka Qt5 WebView | |
63 | Group: X11/Libraries | |
64 | Requires: Qt5Core >= %{qtbase_ver} | |
65 | Requires: Qt5Gui >= %{qtbase_ver} | |
66 | Requires: Qt5Qml >= %{qtdeclarative_ver} | |
67 | Requires: Qt5Quick >= %{qtdeclarative_ver} | |
68 | ||
69 | %description -n Qt5WebView | |
70 | Qt5 WebView library. | |
71 | ||
72 | %description -n Qt5WebView -l pl.UTF-8 | |
73 | Biblioteka Qt5 WebView. | |
74 | ||
75 | %package -n Qt5WebView-devel | |
76 | Summary: Qt5 WebView - development files | |
77 | Summary(pl.UTF-8): Biblioteka Qt5 WebView - pliki programistyczne | |
78 | Group: X11/Development/Libraries | |
79 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
80 | Requires: Qt5Gui-devel >= %{qtbase_ver} | |
b3971eef | 81 | Requires: Qt5WebView = %{version}-%{release} |
7ff1fe90 JB |
82 | |
83 | %description -n Qt5WebView-devel | |
84 | Qt5 WebView - development files. | |
85 | ||
86 | %description -n Qt5WebView-devel -l pl.UTF-8 | |
87 | Biblioteka Qt5 WebView - pliki programistyczne. | |
88 | ||
89 | %package -n Qt5WebView-plugin-webengine | |
90 | Summary: Qt5 WebView library WebEngine plugin | |
91 | Summary(pl.UTF-8): Wtyczka WebEngine do biblioteki Qt5 WebView | |
92 | Group: X11/Libraries | |
93 | Requires: Qt5WebEngine >= %{qtwebengine_ver} | |
94 | Requires: Qt5WebView = %{version}-%{release} | |
95 | ||
96 | %description -n Qt5WebView-plugin-webengine | |
97 | Qt5 WebView library WebEngine plugin. | |
98 | ||
99 | %description -n Qt5WebView-plugin-webengine -l pl.UTF-8 | |
100 | Wtyczka WebEngine do biblioteki Qt5 WebView. | |
101 | ||
102 | %package doc | |
103 | Summary: Qt5 WebView documentation in HTML format | |
104 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebView w formacie HTML | |
105 | Group: Documentation | |
106 | Requires: qt5-doc-common >= %{qtbase_ver} | |
107 | BuildArch: noarch | |
108 | ||
109 | %description doc | |
110 | Qt5 WebView documentation in HTML format. | |
111 | ||
112 | %description doc -l pl.UTF-8 | |
113 | Dokumentacja do biblioteki Qt5 WebView w formacie HTML. | |
114 | ||
115 | %package doc-qch | |
116 | Summary: Qt5 WebView documentation in QCH format | |
117 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebView w formacie QCH | |
118 | Group: Documentation | |
119 | Requires: qt5-doc-common >= %{qtbase_ver} | |
120 | BuildArch: noarch | |
121 | ||
122 | %description doc-qch | |
123 | Qt5 WebView documentation in QCH format. | |
124 | ||
125 | %description doc-qch -l pl.UTF-8 | |
126 | Dokumentacja do biblioteki Qt5 WebView w formacie QCH. | |
127 | ||
128 | %package examples | |
129 | Summary: Qt5 WebView examples | |
130 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 WebView | |
131 | Group: X11/Development/Libraries | |
132 | BuildArch: noarch | |
133 | ||
134 | %description examples | |
135 | Qt5 WebView examples. | |
136 | ||
137 | %description examples -l pl.UTF-8 | |
138 | Przykłady do biblioteki Qt5 WebView. | |
139 | ||
140 | %prep | |
141 | %setup -q -n %{orgname}-everywhere-src-%{version} | |
142 | ||
143 | %build | |
144 | qmake-qt5 | |
145 | %{__make} | |
146 | %{?with_doc:%{__make} docs} | |
147 | ||
148 | %install | |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
151 | %{__make} install \ | |
152 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
153 | ||
154 | %if %{with doc} | |
155 | %{__make} install_docs \ | |
156 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
157 | %endif | |
158 | ||
159 | # useless symlinks | |
160 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?? | |
161 | # obsoleted by pkg-config | |
162 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
163 | ||
164 | # remove compiled examples (package only sources) | |
165 | for d in $RPM_BUILD_ROOT%{_examplesdir}/qt5/webview/* ; do | |
166 | [ -d "$d" ] && %{__rm} "$d/$(basename $d)" | |
167 | done | |
168 | ||
169 | %clean | |
170 | rm -rf $RPM_BUILD_ROOT | |
171 | ||
172 | %post -n Qt5WebView -p /sbin/ldconfig | |
173 | %postun -n Qt5WebView -p /sbin/ldconfig | |
174 | ||
175 | %files -n Qt5WebView | |
176 | %defattr(644,root,root,755) | |
177 | %doc dist/changes-* | |
178 | # R: Qt5Core Qt5Qml | |
179 | %attr(755,root,root) %{_libdir}/libQt5WebView.so.*.*.* | |
180 | %attr(755,root,root) %ghost %{_libdir}/libQt5WebView.so.5 | |
181 | %dir %{qt5dir}/plugins/webview | |
182 | %dir %{qt5dir}/qml/QtWebView | |
183 | # R: Qt5Core Qt5Qml Qt5Quick Qt5WebView | |
184 | %attr(755,root,root) %{qt5dir}/qml/QtWebView/libdeclarative_webview.so | |
185 | %{qt5dir}/qml/QtWebView/plugins.qmltypes | |
186 | %{qt5dir}/qml/QtWebView/qmldir | |
187 | ||
188 | %files -n Qt5WebView-devel | |
189 | %defattr(644,root,root,755) | |
190 | %attr(755,root,root) %{_libdir}/libQt5WebView.so | |
191 | %{_libdir}/libQt5WebView.prl | |
192 | %{_includedir}/qt5/QtWebView | |
193 | %{_pkgconfigdir}/Qt5WebView.pc | |
194 | %dir %{_libdir}/cmake/Qt5WebView | |
195 | %{_libdir}/cmake/Qt5WebView/Qt5WebViewConfig*.cmake | |
196 | %{qt5dir}/mkspecs/modules/qt_lib_webview.pri | |
197 | %{qt5dir}/mkspecs/modules/qt_lib_webview_private.pri | |
198 | ||
199 | %if %{with webengine} | |
200 | %files -n Qt5WebView-plugin-webengine | |
201 | %defattr(644,root,root,755) | |
202 | %attr(755,root,root) %{qt5dir}/plugins/webview/libqtwebview_webengine.so | |
203 | %{_libdir}/cmake/Qt5WebView/Qt5WebView_QWebEngineWebViewPlugin.cmake | |
204 | %endif | |
205 | ||
206 | %if %{with doc} | |
207 | %files doc | |
208 | %defattr(644,root,root,755) | |
209 | %{_docdir}/qt5-doc/qtwebview | |
210 | ||
211 | %files doc-qch | |
212 | %defattr(644,root,root,755) | |
213 | %{_docdir}/qt5-doc/qtwebview.qch | |
214 | %endif | |
215 | ||
216 | %files examples | |
217 | %defattr(644,root,root,755) | |
218 | # XXX: dir shared with qt5-qtbase-examples | |
219 | %dir %{_examplesdir}/qt5 | |
220 | %{_examplesdir}/qt5/webview |