]> git.pld-linux.org Git - packages/qt5-qtwebsockets.git/blob - qt5-qtwebsockets.spec
up to 5.13.2
[packages/qt5-qtwebsockets.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.13.2
14 Release:        1
15 License:        LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0
16 Group:          X11/Libraries
17 Source0:        http://download.qt.io/official_releases/qt/5.13/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz
18 # Source0-md5:  eea14fda62a10a23fcf190fc8f9d3d27
19 Source1:        http://download.qt.io/official_releases/qt/5.13/%{version}/submodules/qttranslations-everywhere-src-%{version}.tar.xz
20 # Source1-md5:  fea07dab5b04fe170fc06987f4fd0b0f
21 URL:            http://www.qt.io/
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 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 Requires:       Qt5Sql >= %{qtbase_ver}
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:       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
132 %setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1}
133
134 %build
135 qmake-qt5
136 %{__make}
137 %{?with_doc:%{__make} docs}
138
139 %if %{with qm}
140 cd qttranslations-everywhere-src-%{version}
141 qmake-qt5
142 %{__make}
143 cd ..
144 %endif
145
146 %install
147 rm -rf $RPM_BUILD_ROOT
148 %{__make} install \
149         INSTALL_ROOT=$RPM_BUILD_ROOT
150
151 %if %{with doc}
152 %{__make} install_docs \
153         INSTALL_ROOT=$RPM_BUILD_ROOT
154 %endif
155
156 %if %{with qm}
157 %{__make} -C qttranslations-everywhere-src-%{version} install \
158         INSTALL_ROOT=$RPM_BUILD_ROOT
159 # keep only qtwebsockets
160 %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtconnectivity,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquickcontrols2,qtserialport,qtscript,qtwebengine,qtxmlpatterns}_*.qm
161 %endif
162
163 # useless symlinks
164 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
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
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
207 %clean
208 rm -rf $RPM_BUILD_ROOT
209
210 %post   -n Qt5WebSockets -p /sbin/ldconfig
211 %postun -n Qt5WebSockets -p /sbin/ldconfig
212
213 %files -n Qt5WebSockets -f qtwebsockets.lang
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
219 %{qt5dir}/qml/Qt/WebSockets/qmldir
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
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
235 %if %{with doc}
236 %files doc
237 %defattr(644,root,root,755)
238 %{_docdir}/qt5-doc/qtwebsockets
239
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.079243 seconds and 3 git commands to generate.