]>
Commit | Line | Data |
---|---|---|
90ca793e JB |
1 | # |
2 | # Conditional build: | |
70084c35 | 3 | %bcond_without doc # Documentation |
2cb2e89b | 4 | %bcond_without qm # QM translations |
90ca793e JB |
5 | |
6 | %define orgname qtwebsockets | |
7 | %define qtbase_ver %{version} | |
8 | %define qtdeclarative_ver %{version} | |
9 | %define qttools_ver %{version} | |
10 | Summary: The Qt5 WebSockets library | |
11 | Summary(pl.UTF-8): Biblioteka Qt5 WebSockets | |
12 | Name: qt5-%{orgname} | |
9874f68a | 13 | Version: 5.15.1 |
90ca793e JB |
14 | Release: 1 |
15 | License: LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0 | |
16 | Group: X11/Libraries | |
959d7091 | 17 | Source0: http://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz |
9874f68a | 18 | # Source0-md5: 3a772b4732542c7c200610d4d78313af |
959d7091 | 19 | Source1: http://download.qt.io/official_releases/qt/5.15/%{version}/submodules/qttranslations-everywhere-src-%{version}.tar.xz |
9874f68a | 20 | # Source1-md5: 4742dfcb8fa21a899341daabab241716 |
2cb2e89b | 21 | URL: http://www.qt.io/ |
90ca793e JB |
22 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} |
23 | BuildRequires: Qt5Network-devel >= %{qtbase_ver} | |
24 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
25 | BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
26 | BuildRequires: Qt5Sql-devel >= %{qtbase_ver} | |
70084c35 | 27 | %if %{with doc} |
90ca793e JB |
28 | BuildRequires: qt5-assistant >= %{qttools_ver} |
29 | %endif | |
30 | BuildRequires: qt5-build >= %{qtbase_ver} | |
2cb2e89b | 31 | %{?with_qm:BuildRequires: qt5-linguist >= 5.2} |
90ca793e JB |
32 | BuildRequires: qt5-qmake >= %{qtbase_ver} |
33 | BuildRequires: rpmbuild(macros) >= 1.654 | |
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 WebSockets 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 WebSockets. | |
55 | ||
56 | %package -n Qt5WebSockets | |
57 | Summary: The Qt5 WebSockets library | |
58 | Summary(pl.UTF-8): Biblioteka Qt5 WebSockets | |
59 | Group: Libraries | |
60 | Requires: Qt5Core >= %{qtbase_ver} | |
61 | Requires: Qt5Network >= %{qtbase_ver} | |
62 | Requires: Qt5Sql >= %{qtbase_ver} | |
63 | Requires: Qt5Qml >= %{qtdeclarative_ver} | |
64 | ||
65 | %description -n Qt5WebSockets | |
66 | Qt5 WebSockets library provides WebSockets communication classes. | |
67 | ||
1b9ddffe | 68 | %description -n Qt5WebSockets -l pl.UTF-8 |
90ca793e JB |
69 | Biblioteka Qt5 WebSockets dostarcza klasy do komunikacji przez |
70 | WebSockets. | |
71 | ||
72 | %package -n Qt5WebSockets-devel | |
73 | Summary: Qt5 WebSockets library - development files | |
74 | Summary(pl.UTF-8): Biblioteka Qt5 WebSockets - pliki programistyczne | |
75 | Group: Development/Libraries | |
76 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
77 | Requires: Qt5Network-devel >= %{qtbase_ver} | |
78 | Requires: Qt5Sql-devel >= %{qtbase_ver} | |
79 | Requires: Qt5WebSockets = %{version}-%{release} | |
80 | ||
81 | %description -n Qt5WebSockets-devel | |
82 | Qt5 WebSockets library - development files. | |
83 | ||
84 | %description -n Qt5WebSockets-devel -l pl.UTF-8 | |
85 | Biblioteka Qt5 WebSockets - pliki programistyczne. | |
86 | ||
87 | %package doc | |
88 | Summary: Qt5 WebSockets documentation in HTML format | |
89 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebSockets w formacie HTML | |
90 | Group: Documentation | |
91 | Requires: qt5-doc-common >= %{qtbase_ver} | |
92 | %if "%{_rpmversion}" >= "5" | |
93 | BuildArch: noarch | |
94 | %endif | |
95 | ||
96 | %description doc | |
97 | Qt5 WebSockets documentation in HTML format. | |
98 | ||
99 | %description doc -l pl.UTF-8 | |
100 | Dokumentacja do biblioteki Qt5 WebSockets w formacie HTML. | |
101 | ||
102 | %package doc-qch | |
103 | Summary: Qt5 WebSockets documentation in QCH format | |
104 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebSockets w formacie QCH | |
105 | Group: Documentation | |
106 | Requires: qt5-doc-common >= %{qtbase_ver} | |
107 | %if "%{_rpmversion}" >= "5" | |
108 | BuildArch: noarch | |
109 | %endif | |
110 | ||
111 | %description doc-qch | |
112 | Qt5 WebSockets documentation in QCH format. | |
113 | ||
114 | %description doc-qch -l pl.UTF-8 | |
115 | Dokumentacja do biblioteki Qt5 WebSockets w formacie QCH. | |
116 | ||
117 | %package examples | |
118 | Summary: Qt5 WebSockets examples | |
119 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 WebSockets | |
120 | Group: X11/Development/Libraries | |
121 | %if "%{_rpmversion}" >= "5" | |
122 | BuildArch: noarch | |
123 | %endif | |
124 | ||
125 | %description examples | |
126 | Qt5 WebSockets examples. | |
127 | ||
128 | %description examples -l pl.UTF-8 | |
129 | Przykłady do biblioteki Qt5 WebSockets. | |
130 | ||
131 | %prep | |
13b981ef | 132 | %setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1} |
90ca793e JB |
133 | |
134 | %build | |
135 | qmake-qt5 | |
136 | %{__make} | |
70084c35 | 137 | %{?with_doc:%{__make} docs} |
90ca793e | 138 | |
2cb2e89b | 139 | %if %{with qm} |
13b981ef | 140 | cd qttranslations-everywhere-src-%{version} |
2cb2e89b JB |
141 | qmake-qt5 |
142 | %{__make} | |
143 | cd .. | |
144 | %endif | |
145 | ||
90ca793e JB |
146 | %install |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | %{__make} install \ | |
149 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
150 | ||
70084c35 JR |
151 | %if %{with doc} |
152 | %{__make} install_docs \ | |
90ca793e | 153 | INSTALL_ROOT=$RPM_BUILD_ROOT |
70084c35 | 154 | %endif |
90ca793e | 155 | |
2cb2e89b | 156 | %if %{with qm} |
13b981ef | 157 | %{__make} -C qttranslations-everywhere-src-%{version} install \ |
2cb2e89b JB |
158 | INSTALL_ROOT=$RPM_BUILD_ROOT |
159 | # keep only qtwebsockets | |
339101f9 | 160 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtconnectivity,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquickcontrols2,qtserialport,qtscript,qtwebengine,qtxmlpatterns}_*.qm |
2cb2e89b JB |
161 | %endif |
162 | ||
90ca793e | 163 | # useless symlinks |
13b981ef | 164 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?? |
90ca793e JB |
165 | # actually drop *.la, follow policy of not packaging them when *.pc exist |
166 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
167 | ||
168 | # Prepare some files list | |
169 | ifecho() { | |
170 | r="$RPM_BUILD_ROOT$2" | |
171 | if [ -d "$r" ]; then | |
172 | echo "%%dir $2" >> $1.files | |
173 | elif [ -x "$r" ] ; then | |
174 | echo "%%attr(755,root,root) $2" >> $1.files | |
175 | elif [ -f "$r" ]; then | |
176 | echo "$2" >> $1.files | |
177 | else | |
178 | echo "Error generation $1 files list!" | |
179 | echo "$r: no such file or directory!" | |
180 | return 1 | |
181 | fi | |
182 | } | |
183 | ifecho_tree() { | |
184 | ifecho $1 $2 | |
185 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
186 | ifecho $1 $2/$f | |
187 | done | |
188 | } | |
189 | ||
190 | echo "%defattr(644,root,root,755)" > examples.files | |
191 | ifecho_tree examples %{_examplesdir}/qt5/websockets | |
192 | ||
2cb2e89b JB |
193 | # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout |
194 | find_qt5_qm() | |
195 | { | |
196 | name="$1" | |
197 | find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \ | |
198 | sed -e "s:^$RPM_BUILD_ROOT::" \ | |
199 | -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:' | |
200 | } | |
201 | ||
202 | echo '%defattr(644,root,root,755)' > qtwebsockets.lang | |
203 | %if %{with qm} | |
204 | find_qt5_qm qtwebsockets >> qtwebsockets.lang | |
205 | %endif | |
206 | ||
90ca793e JB |
207 | %clean |
208 | rm -rf $RPM_BUILD_ROOT | |
209 | ||
210 | %post -n Qt5WebSockets -p /sbin/ldconfig | |
211 | %postun -n Qt5WebSockets -p /sbin/ldconfig | |
212 | ||
2cb2e89b | 213 | %files -n Qt5WebSockets -f qtwebsockets.lang |
90ca793e JB |
214 | %defattr(644,root,root,755) |
215 | %doc README.md | |
216 | %attr(755,root,root) %{_libdir}/libQt5WebSockets.so.*.*.* | |
217 | %attr(755,root,root) %ghost %{_libdir}/libQt5WebSockets.so.5 | |
218 | %dir %{qt5dir}/qml/Qt/WebSockets | |
90ca793e | 219 | %{qt5dir}/qml/Qt/WebSockets/qmldir |
2cb2e89b JB |
220 | %dir %{qt5dir}/qml/QtWebSockets |
221 | %attr(755,root,root) %{qt5dir}/qml/QtWebSockets/libdeclarative_qmlwebsockets.so | |
222 | %{qt5dir}/qml/QtWebSockets/plugins.qmltypes | |
223 | %{qt5dir}/qml/QtWebSockets/qmldir | |
90ca793e JB |
224 | |
225 | %files -n Qt5WebSockets-devel | |
226 | %defattr(644,root,root,755) | |
227 | %attr(755,root,root) %{_libdir}/libQt5WebSockets.so | |
228 | %{_libdir}/libQt5WebSockets.prl | |
229 | %{_includedir}/qt5/QtWebSockets | |
230 | %{_pkgconfigdir}/Qt5WebSockets.pc | |
231 | %{_libdir}/cmake/Qt5WebSockets | |
232 | %{qt5dir}/mkspecs/modules/qt_lib_websockets.pri | |
233 | %{qt5dir}/mkspecs/modules/qt_lib_websockets_private.pri | |
234 | ||
70084c35 | 235 | %if %{with doc} |
90ca793e JB |
236 | %files doc |
237 | %defattr(644,root,root,755) | |
238 | %{_docdir}/qt5-doc/qtwebsockets | |
239 | ||
90ca793e JB |
240 | %files doc-qch |
241 | %defattr(644,root,root,755) | |
242 | %{_docdir}/qt5-doc/qtwebsockets.qch | |
243 | %endif | |
244 | ||
245 | %files examples -f examples.files | |
246 | %defattr(644,root,root,755) | |
247 | # XXX: dir shared with qt5-qtbase-examples | |
248 | %dir %{_examplesdir}/qt5 |