]>
Commit | Line | Data |
---|---|---|
1302c287 JB |
1 | # |
2 | # Conditional build: | |
a0bb59d8 | 3 | %bcond_without doc # Documentation |
1302c287 JB |
4 | |
5 | %define orgname qtwebchannel | |
6 | %define qtbase_ver %{version} | |
7 | %define qtdeclarative_ver %{version} | |
8 | %define qttools_ver %{version} | |
a4e247e7 | 9 | %define qtwebsockets_ver %{version} |
1302c287 JB |
10 | Summary: The Qt5 WebChannel library |
11 | Summary(pl.UTF-8): Biblioteka Qt5 WebChannel | |
12 | Name: qt5-%{orgname} | |
57725332 JP |
13 | Version: 5.15.7 |
14 | Release: 1 | |
a4e247e7 | 15 | License: LGPL v3 or GPL v2 or GPL v3 or commercial |
1302c287 | 16 | Group: X11/Libraries |
9683c42a | 17 | Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz |
57725332 | 18 | # Source0-md5: ed28842c104c684898260e2b76c29fc1 |
3786adc2 | 19 | Patch0: parallel-install.patch |
a4e247e7 | 20 | URL: https://www.qt.io/ |
1302c287 JB |
21 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} |
22 | BuildRequires: Qt5Network-devel >= %{qtbase_ver} | |
23 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
24 | BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
a4e247e7 JB |
25 | # for examples |
26 | BuildRequires: Qt5WebSockets-devel >= %{qtwebsockets_ver} | |
a0bb59d8 | 27 | %if %{with doc} |
1302c287 JB |
28 | BuildRequires: qt5-assistant >= %{qttools_ver} |
29 | %endif | |
30 | BuildRequires: qt5-build >= %{qtbase_ver} | |
31 | BuildRequires: qt5-qmake >= %{qtbase_ver} | |
9f2ec506 | 32 | BuildRequires: rpm-build >= 4.6 |
5a3b2c95 | 33 | BuildRequires: rpmbuild(macros) >= 2.016 |
1302c287 JB |
34 | BuildRequires: tar >= 1:1.22 |
35 | BuildRequires: xz | |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
37 | ||
38 | %define specflags -fno-strict-aliasing | |
39 | %define qt5dir %{_libdir}/qt5 | |
40 | ||
41 | %description | |
42 | Qt is a cross-platform application and UI framework. Using Qt, you can | |
43 | write web-enabled applications once and deploy them across desktop, | |
44 | mobile and embedded systems without rewriting the source code. | |
45 | ||
46 | This package contains Qt5 WebChannel library. | |
47 | ||
48 | %description -l pl.UTF-8 | |
49 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
50 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
51 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
52 | źródłowego. | |
53 | ||
54 | Ten pakiet zawiera bibliotekę Qt5 WebChannel. | |
55 | ||
56 | %package -n Qt5WebChannel | |
57 | Summary: The Qt5 WebChannel library | |
58 | Summary(pl.UTF-8): Biblioteka Qt5 WebChannel | |
59 | Group: Libraries | |
60 | Requires: Qt5Core >= %{qtbase_ver} | |
61 | Requires: Qt5Network >= %{qtbase_ver} | |
62 | Requires: Qt5Qml >= %{qtdeclarative_ver} | |
63 | ||
64 | %description -n Qt5WebChannel | |
65 | Qt5 WebChannel library provides seamless integration of C++ and QML | |
66 | applications with HTML/JavaScript clients. | |
67 | ||
68 | %description -n Qt5WebChannel -l pl.UTF-8 | |
69 | Biblioteka Qt5 WebChannel udostępnia integrację aplikacji C++ i QML z | |
70 | klientami w HTML-u/JavaScripcie. | |
71 | ||
72 | %package -n Qt5WebChannel-devel | |
73 | Summary: Qt5 WebChannel library - development files | |
74 | Summary(pl.UTF-8): Biblioteka Qt5 WebChannel - pliki programistyczne | |
75 | Group: Development/Libraries | |
76 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
77 | Requires: Qt5Network-devel >= %{qtbase_ver} | |
78 | Requires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
79 | Requires: Qt5WebChannel = %{version}-%{release} | |
80 | ||
81 | %description -n Qt5WebChannel-devel | |
82 | Qt5 WebChannel library - development files. | |
83 | ||
84 | %description -n Qt5WebChannel-devel -l pl.UTF-8 | |
85 | Biblioteka Qt5 WebChannel - pliki programistyczne. | |
86 | ||
87 | %package doc | |
88 | Summary: Qt5 WebChannel documentation in HTML format | |
89 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebChannel w formacie HTML | |
90 | Group: Documentation | |
91 | Requires: qt5-doc-common >= %{qtbase_ver} | |
d770636d | 92 | BuildArch: noarch |
1302c287 JB |
93 | |
94 | %description doc | |
95 | Qt5 WebChannel documentation in HTML format. | |
96 | ||
97 | %description doc -l pl.UTF-8 | |
98 | Dokumentacja do biblioteki Qt5 WebChannel w formacie HTML. | |
99 | ||
100 | %package doc-qch | |
101 | Summary: Qt5 WebChannel documentation in QCH format | |
102 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebChannel w formacie QCH | |
103 | Group: Documentation | |
104 | Requires: qt5-doc-common >= %{qtbase_ver} | |
d770636d | 105 | BuildArch: noarch |
1302c287 JB |
106 | |
107 | %description doc-qch | |
108 | Qt5 WebChannel documentation in QCH format. | |
109 | ||
110 | %description doc-qch -l pl.UTF-8 | |
111 | Dokumentacja do biblioteki Qt5 WebChannel w formacie QCH. | |
112 | ||
113 | %package examples | |
114 | Summary: Qt5 WebChannel examples | |
115 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 WebChannel | |
116 | Group: X11/Development/Libraries | |
d770636d | 117 | BuildArch: noarch |
1302c287 JB |
118 | |
119 | %description examples | |
120 | Qt5 WebChannel examples. | |
121 | ||
122 | %description examples -l pl.UTF-8 | |
123 | Przykłady do biblioteki Qt5 WebChannel. | |
124 | ||
125 | %prep | |
c7f74bb9 | 126 | %setup -q -n %{orgname}-everywhere-src-%{version} |
3786adc2 | 127 | %patch0 -p1 |
1302c287 | 128 | |
898b061f JP |
129 | %{__sed} -i -e '1{ |
130 | s,^#!.*bin/env node,#!/usr/bin/node, | |
131 | }' \ | |
132 | examples/webchannel/qwclient/qwclient.js | |
133 | ||
1302c287 | 134 | %build |
5a3b2c95 | 135 | %{qmake_qt5} |
1302c287 | 136 | %{__make} |
a0bb59d8 | 137 | %{?with_doc:%{__make} docs} |
1302c287 JB |
138 | |
139 | %install | |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | %{__make} install \ | |
142 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
143 | ||
a0bb59d8 JR |
144 | %if %{with doc} |
145 | %{__make} install_docs \ | |
1302c287 | 146 | INSTALL_ROOT=$RPM_BUILD_ROOT |
a0bb59d8 | 147 | %endif |
1302c287 JB |
148 | |
149 | # useless symlinks | |
c7f74bb9 | 150 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?? |
1302c287 JB |
151 | # actually drop *.la, follow policy of not packaging them when *.pc exist |
152 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
153 | ||
154 | # Prepare some files list | |
155 | ifecho() { | |
156 | r="$RPM_BUILD_ROOT$2" | |
157 | if [ -d "$r" ]; then | |
158 | echo "%%dir $2" >> $1.files | |
159 | elif [ -x "$r" ] ; then | |
160 | echo "%%attr(755,root,root) $2" >> $1.files | |
161 | elif [ -f "$r" ]; then | |
162 | echo "$2" >> $1.files | |
163 | else | |
164 | echo "Error generation $1 files list!" | |
165 | echo "$r: no such file or directory!" | |
166 | return 1 | |
167 | fi | |
168 | } | |
169 | ifecho_tree() { | |
170 | ifecho $1 $2 | |
171 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
172 | ifecho $1 $2/$f | |
173 | done | |
174 | } | |
175 | ||
176 | echo "%defattr(644,root,root,755)" > examples.files | |
1302c287 JB |
177 | ifecho_tree examples %{_examplesdir}/qt5/webchannel |
178 | ||
179 | %clean | |
180 | rm -rf $RPM_BUILD_ROOT | |
181 | ||
182 | %post -n Qt5WebChannel -p /sbin/ldconfig | |
183 | %postun -n Qt5WebChannel -p /sbin/ldconfig | |
184 | ||
185 | %files -n Qt5WebChannel | |
186 | %defattr(644,root,root,755) | |
c7f74bb9 | 187 | %doc LICENSE.GPL3-EXCEPT README.md |
a4e247e7 | 188 | # R: Core Qml |
1302c287 JB |
189 | %attr(755,root,root) %{_libdir}/libQt5WebChannel.so.*.*.* |
190 | %attr(755,root,root) %ghost %{_libdir}/libQt5WebChannel.so.5 | |
191 | %dir %{qt5dir}/qml/QtWebChannel | |
a4e247e7 | 192 | # R: Core Qml |
1302c287 JB |
193 | %attr(755,root,root) %{qt5dir}/qml/QtWebChannel/libdeclarative_webchannel.so |
194 | %{qt5dir}/qml/QtWebChannel/plugins.qmltypes | |
195 | %{qt5dir}/qml/QtWebChannel/qmldir | |
196 | ||
197 | %files -n Qt5WebChannel-devel | |
198 | %defattr(644,root,root,755) | |
199 | %attr(755,root,root) %{_libdir}/libQt5WebChannel.so | |
200 | %{_libdir}/libQt5WebChannel.prl | |
201 | %{_includedir}/qt5/QtWebChannel | |
202 | %{_pkgconfigdir}/Qt5WebChannel.pc | |
203 | %{_libdir}/cmake/Qt5WebChannel | |
204 | %{qt5dir}/mkspecs/modules/qt_lib_webchannel.pri | |
205 | %{qt5dir}/mkspecs/modules/qt_lib_webchannel_private.pri | |
206 | ||
a0bb59d8 | 207 | %if %{with doc} |
1302c287 JB |
208 | %files doc |
209 | %defattr(644,root,root,755) | |
210 | %{_docdir}/qt5-doc/qtwebchannel | |
211 | ||
1302c287 JB |
212 | %files doc-qch |
213 | %defattr(644,root,root,755) | |
214 | %{_docdir}/qt5-doc/qtwebchannel.qch | |
215 | %endif | |
216 | ||
217 | %files examples -f examples.files | |
218 | %defattr(644,root,root,755) | |
219 | # XXX: dir shared with qt5-qtbase-examples | |
220 | %dir %{_examplesdir}/qt5 |