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