]>
Commit | Line | Data |
---|---|---|
90ca793e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without qch # documentation in QCH format | |
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} | |
22b7eef2 | 13 | Version: 5.8.0 |
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 | |
22b7eef2 JR |
17 | Source0: http://download.qt.io/official_releases/qt/5.8/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz |
18 | # Source0-md5: 99bbe29bb05a19b6fca7077eb07d7d1b | |
19 | Source1: http://download.qt.io/official_releases/qt/5.8/%{version}/submodules/qttranslations-opensource-src-%{version}.tar.xz | |
20 | # Source1-md5: b6c6748a923b9639c7d018cfdb04caf4 | |
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} | |
27 | %if %{with qch} | |
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 | |
2cb2e89b | 132 | %setup -q -n %{orgname}-opensource-src-%{version} %{?with_qm:-a1} |
90ca793e JB |
133 | |
134 | %build | |
135 | qmake-qt5 | |
136 | %{__make} | |
137 | %{__make} %{!?with_qch:html_}docs | |
138 | ||
2cb2e89b JB |
139 | %if %{with qm} |
140 | cd qttranslations-opensource-src-%{version} | |
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 | ||
151 | %{__make} install_%{!?with_qch:html_}docs \ | |
152 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
153 | ||
2cb2e89b JB |
154 | %if %{with qm} |
155 | %{__make} -C qttranslations-opensource-src-%{version} install \ | |
156 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
157 | # keep only qtwebsockets | |
158 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qmlviewer,qt,qtbase,qtconfig,qtconnectivity,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquick1,qtscript,qtxmlpatterns}_*.qm | |
159 | %endif | |
160 | ||
90ca793e JB |
161 | # useless symlinks |
162 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.? | |
163 | # actually drop *.la, follow policy of not packaging them when *.pc exist | |
164 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
165 | ||
166 | # Prepare some files list | |
167 | ifecho() { | |
168 | r="$RPM_BUILD_ROOT$2" | |
169 | if [ -d "$r" ]; then | |
170 | echo "%%dir $2" >> $1.files | |
171 | elif [ -x "$r" ] ; then | |
172 | echo "%%attr(755,root,root) $2" >> $1.files | |
173 | elif [ -f "$r" ]; then | |
174 | echo "$2" >> $1.files | |
175 | else | |
176 | echo "Error generation $1 files list!" | |
177 | echo "$r: no such file or directory!" | |
178 | return 1 | |
179 | fi | |
180 | } | |
181 | ifecho_tree() { | |
182 | ifecho $1 $2 | |
183 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
184 | ifecho $1 $2/$f | |
185 | done | |
186 | } | |
187 | ||
188 | echo "%defattr(644,root,root,755)" > examples.files | |
189 | ifecho_tree examples %{_examplesdir}/qt5/websockets | |
190 | ||
2cb2e89b JB |
191 | # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout |
192 | find_qt5_qm() | |
193 | { | |
194 | name="$1" | |
195 | find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \ | |
196 | sed -e "s:^$RPM_BUILD_ROOT::" \ | |
197 | -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:' | |
198 | } | |
199 | ||
200 | echo '%defattr(644,root,root,755)' > qtwebsockets.lang | |
201 | %if %{with qm} | |
202 | find_qt5_qm qtwebsockets >> qtwebsockets.lang | |
203 | %endif | |
204 | ||
90ca793e JB |
205 | %clean |
206 | rm -rf $RPM_BUILD_ROOT | |
207 | ||
208 | %post -n Qt5WebSockets -p /sbin/ldconfig | |
209 | %postun -n Qt5WebSockets -p /sbin/ldconfig | |
210 | ||
2cb2e89b | 211 | %files -n Qt5WebSockets -f qtwebsockets.lang |
90ca793e JB |
212 | %defattr(644,root,root,755) |
213 | %doc README.md | |
214 | %attr(755,root,root) %{_libdir}/libQt5WebSockets.so.*.*.* | |
215 | %attr(755,root,root) %ghost %{_libdir}/libQt5WebSockets.so.5 | |
216 | %dir %{qt5dir}/qml/Qt/WebSockets | |
90ca793e | 217 | %{qt5dir}/qml/Qt/WebSockets/qmldir |
2cb2e89b JB |
218 | %dir %{qt5dir}/qml/QtWebSockets |
219 | %attr(755,root,root) %{qt5dir}/qml/QtWebSockets/libdeclarative_qmlwebsockets.so | |
220 | %{qt5dir}/qml/QtWebSockets/plugins.qmltypes | |
221 | %{qt5dir}/qml/QtWebSockets/qmldir | |
90ca793e JB |
222 | |
223 | %files -n Qt5WebSockets-devel | |
224 | %defattr(644,root,root,755) | |
225 | %attr(755,root,root) %{_libdir}/libQt5WebSockets.so | |
226 | %{_libdir}/libQt5WebSockets.prl | |
227 | %{_includedir}/qt5/QtWebSockets | |
228 | %{_pkgconfigdir}/Qt5WebSockets.pc | |
229 | %{_libdir}/cmake/Qt5WebSockets | |
230 | %{qt5dir}/mkspecs/modules/qt_lib_websockets.pri | |
231 | %{qt5dir}/mkspecs/modules/qt_lib_websockets_private.pri | |
232 | ||
233 | %files doc | |
234 | %defattr(644,root,root,755) | |
235 | %{_docdir}/qt5-doc/qtwebsockets | |
236 | ||
237 | %if %{with qch} | |
238 | %files doc-qch | |
239 | %defattr(644,root,root,755) | |
240 | %{_docdir}/qt5-doc/qtwebsockets.qch | |
241 | %endif | |
242 | ||
243 | %files examples -f examples.files | |
244 | %defattr(644,root,root,755) | |
245 | # XXX: dir shared with qt5-qtbase-examples | |
246 | %dir %{_examplesdir}/qt5 |