]> git.pld-linux.org Git - packages/qt5-qtwebsockets.git/blame - qt5-qtwebsockets.spec
up to 5.15.1
[packages/qt5-qtwebsockets.git] / qt5-qtwebsockets.spec
CommitLineData
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}
10Summary: The Qt5 WebSockets library
11Summary(pl.UTF-8): Biblioteka Qt5 WebSockets
12Name: qt5-%{orgname}
9874f68a 13Version: 5.15.1
90ca793e
JB
14Release: 1
15License: LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0
16Group: X11/Libraries
959d7091 17Source0: http://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz
9874f68a 18# Source0-md5: 3a772b4732542c7c200610d4d78313af
959d7091 19Source1: http://download.qt.io/official_releases/qt/5.15/%{version}/submodules/qttranslations-everywhere-src-%{version}.tar.xz
9874f68a 20# Source1-md5: 4742dfcb8fa21a899341daabab241716
2cb2e89b 21URL: http://www.qt.io/
90ca793e
JB
22BuildRequires: Qt5Core-devel >= %{qtbase_ver}
23BuildRequires: Qt5Network-devel >= %{qtbase_ver}
24BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver}
25BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver}
26BuildRequires: Qt5Sql-devel >= %{qtbase_ver}
70084c35 27%if %{with doc}
90ca793e
JB
28BuildRequires: qt5-assistant >= %{qttools_ver}
29%endif
30BuildRequires: qt5-build >= %{qtbase_ver}
2cb2e89b 31%{?with_qm:BuildRequires: qt5-linguist >= 5.2}
90ca793e
JB
32BuildRequires: qt5-qmake >= %{qtbase_ver}
33BuildRequires: rpmbuild(macros) >= 1.654
34BuildRequires: tar >= 1:1.22
35BuildRequires: xz
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%define specflags -fno-strict-aliasing
39%define qt5dir %{_libdir}/qt5
40
41%description
42Qt is a cross-platform application and UI framework. Using Qt, you can
43write web-enabled applications once and deploy them across desktop,
44mobile and embedded systems without rewriting the source code.
45
46This package contains Qt5 WebSockets library.
47
48%description -l pl.UTF-8
49Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika.
50Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w
51systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu
52źródłowego.
53
54Ten pakiet zawiera bibliotekę Qt5 WebSockets.
55
56%package -n Qt5WebSockets
57Summary: The Qt5 WebSockets library
58Summary(pl.UTF-8): Biblioteka Qt5 WebSockets
59Group: Libraries
60Requires: Qt5Core >= %{qtbase_ver}
61Requires: Qt5Network >= %{qtbase_ver}
62Requires: Qt5Sql >= %{qtbase_ver}
63Requires: Qt5Qml >= %{qtdeclarative_ver}
64
65%description -n Qt5WebSockets
66Qt5 WebSockets library provides WebSockets communication classes.
67
1b9ddffe 68%description -n Qt5WebSockets -l pl.UTF-8
90ca793e
JB
69Biblioteka Qt5 WebSockets dostarcza klasy do komunikacji przez
70WebSockets.
71
72%package -n Qt5WebSockets-devel
73Summary: Qt5 WebSockets library - development files
74Summary(pl.UTF-8): Biblioteka Qt5 WebSockets - pliki programistyczne
75Group: Development/Libraries
76Requires: Qt5Core-devel >= %{qtbase_ver}
77Requires: Qt5Network-devel >= %{qtbase_ver}
78Requires: Qt5Sql-devel >= %{qtbase_ver}
79Requires: Qt5WebSockets = %{version}-%{release}
80
81%description -n Qt5WebSockets-devel
82Qt5 WebSockets library - development files.
83
84%description -n Qt5WebSockets-devel -l pl.UTF-8
85Biblioteka Qt5 WebSockets - pliki programistyczne.
86
87%package doc
88Summary: Qt5 WebSockets documentation in HTML format
89Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebSockets w formacie HTML
90Group: Documentation
91Requires: qt5-doc-common >= %{qtbase_ver}
92%if "%{_rpmversion}" >= "5"
93BuildArch: noarch
94%endif
95
96%description doc
97Qt5 WebSockets documentation in HTML format.
98
99%description doc -l pl.UTF-8
100Dokumentacja do biblioteki Qt5 WebSockets w formacie HTML.
101
102%package doc-qch
103Summary: Qt5 WebSockets documentation in QCH format
104Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebSockets w formacie QCH
105Group: Documentation
106Requires: qt5-doc-common >= %{qtbase_ver}
107%if "%{_rpmversion}" >= "5"
108BuildArch: noarch
109%endif
110
111%description doc-qch
112Qt5 WebSockets documentation in QCH format.
113
114%description doc-qch -l pl.UTF-8
115Dokumentacja do biblioteki Qt5 WebSockets w formacie QCH.
116
117%package examples
118Summary: Qt5 WebSockets examples
119Summary(pl.UTF-8): Przykłady do biblioteki Qt5 WebSockets
120Group: X11/Development/Libraries
121%if "%{_rpmversion}" >= "5"
122BuildArch: noarch
123%endif
124
125%description examples
126Qt5 WebSockets examples.
127
128%description examples -l pl.UTF-8
129Przykł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
135qmake-qt5
136%{__make}
70084c35 137%{?with_doc:%{__make} docs}
90ca793e 138
2cb2e89b 139%if %{with qm}
13b981ef 140cd qttranslations-everywhere-src-%{version}
2cb2e89b
JB
141qmake-qt5
142%{__make}
143cd ..
144%endif
145
90ca793e
JB
146%install
147rm -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
169ifecho() {
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}
183ifecho_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
190echo "%defattr(644,root,root,755)" > examples.files
191ifecho_tree examples %{_examplesdir}/qt5/websockets
192
2cb2e89b
JB
193# find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout
194find_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
202echo '%defattr(644,root,root,755)' > qtwebsockets.lang
203%if %{with qm}
204find_qt5_qm qtwebsockets >> qtwebsockets.lang
205%endif
206
90ca793e
JB
207%clean
208rm -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
This page took 0.226592 seconds and 4 git commands to generate.