]> git.pld-linux.org Git - packages/qt5-qtwebchannel.git/blame - qt5-qtwebchannel.spec
use macro for qmake invocation
[packages/qt5-qtwebchannel.git] / qt5-qtwebchannel.spec
CommitLineData
1302c287
JB
1#
2# Conditional build:
a0bb59d8 3%bcond_without doc # Documentation
1302c287
JB
4
5%define orgname qtwebchannel
6%define qtbase_ver %{version}
7%define qtdeclarative_ver %{version}
8%define qttools_ver %{version}
a4e247e7 9%define qtwebsockets_ver %{version}
1302c287
JB
10Summary: The Qt5 WebChannel library
11Summary(pl.UTF-8): Biblioteka Qt5 WebChannel
12Name: qt5-%{orgname}
653fbbae
JP
13Version: 5.15.4
14Release: 1
a4e247e7 15License: LGPL v3 or GPL v2 or GPL v3 or commercial
1302c287 16Group: X11/Libraries
9683c42a 17Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz
653fbbae 18# Source0-md5: 790a627fd53a94f1f779be6d5ee76cc6
a4e247e7 19URL: https://www.qt.io/
1302c287
JB
20BuildRequires: Qt5Core-devel >= %{qtbase_ver}
21BuildRequires: Qt5Network-devel >= %{qtbase_ver}
22BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver}
23BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver}
a4e247e7
JB
24# for examples
25BuildRequires: Qt5WebSockets-devel >= %{qtwebsockets_ver}
a0bb59d8 26%if %{with doc}
1302c287
JB
27BuildRequires: qt5-assistant >= %{qttools_ver}
28%endif
29BuildRequires: qt5-build >= %{qtbase_ver}
30BuildRequires: qt5-qmake >= %{qtbase_ver}
9f2ec506 31BuildRequires: rpm-build >= 4.6
5a3b2c95 32BuildRequires: rpmbuild(macros) >= 2.016
1302c287
JB
33BuildRequires: tar >= 1:1.22
34BuildRequires: xz
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%define specflags -fno-strict-aliasing
38%define qt5dir %{_libdir}/qt5
39
40%description
41Qt is a cross-platform application and UI framework. Using Qt, you can
42write web-enabled applications once and deploy them across desktop,
43mobile and embedded systems without rewriting the source code.
44
45This package contains Qt5 WebChannel library.
46
47%description -l pl.UTF-8
48Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika.
49Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w
50systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu
51źródłowego.
52
53Ten pakiet zawiera bibliotekę Qt5 WebChannel.
54
55%package -n Qt5WebChannel
56Summary: The Qt5 WebChannel library
57Summary(pl.UTF-8): Biblioteka Qt5 WebChannel
58Group: Libraries
59Requires: Qt5Core >= %{qtbase_ver}
60Requires: Qt5Network >= %{qtbase_ver}
61Requires: Qt5Qml >= %{qtdeclarative_ver}
62
63%description -n Qt5WebChannel
64Qt5 WebChannel library provides seamless integration of C++ and QML
65applications with HTML/JavaScript clients.
66
67%description -n Qt5WebChannel -l pl.UTF-8
68Biblioteka Qt5 WebChannel udostępnia integrację aplikacji C++ i QML z
69klientami w HTML-u/JavaScripcie.
70
71%package -n Qt5WebChannel-devel
72Summary: Qt5 WebChannel library - development files
73Summary(pl.UTF-8): Biblioteka Qt5 WebChannel - pliki programistyczne
74Group: Development/Libraries
75Requires: Qt5Core-devel >= %{qtbase_ver}
76Requires: Qt5Network-devel >= %{qtbase_ver}
77Requires: Qt5Qml-devel >= %{qtdeclarative_ver}
78Requires: Qt5WebChannel = %{version}-%{release}
79
80%description -n Qt5WebChannel-devel
81Qt5 WebChannel library - development files.
82
83%description -n Qt5WebChannel-devel -l pl.UTF-8
84Biblioteka Qt5 WebChannel - pliki programistyczne.
85
86%package doc
87Summary: Qt5 WebChannel documentation in HTML format
88Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebChannel w formacie HTML
89Group: Documentation
90Requires: qt5-doc-common >= %{qtbase_ver}
d770636d 91BuildArch: noarch
1302c287
JB
92
93%description doc
94Qt5 WebChannel documentation in HTML format.
95
96%description doc -l pl.UTF-8
97Dokumentacja do biblioteki Qt5 WebChannel w formacie HTML.
98
99%package doc-qch
100Summary: Qt5 WebChannel documentation in QCH format
101Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebChannel w formacie QCH
102Group: Documentation
103Requires: qt5-doc-common >= %{qtbase_ver}
d770636d 104BuildArch: noarch
1302c287
JB
105
106%description doc-qch
107Qt5 WebChannel documentation in QCH format.
108
109%description doc-qch -l pl.UTF-8
110Dokumentacja do biblioteki Qt5 WebChannel w formacie QCH.
111
112%package examples
113Summary: Qt5 WebChannel examples
114Summary(pl.UTF-8): Przykłady do biblioteki Qt5 WebChannel
115Group: X11/Development/Libraries
d770636d 116BuildArch: noarch
1302c287
JB
117
118%description examples
119Qt5 WebChannel examples.
120
121%description examples -l pl.UTF-8
122Przykłady do biblioteki Qt5 WebChannel.
123
124%prep
c7f74bb9 125%setup -q -n %{orgname}-everywhere-src-%{version}
1302c287 126
898b061f
JP
127%{__sed} -i -e '1{
128 s,^#!.*bin/env node,#!/usr/bin/node,
129}' \
130 examples/webchannel/qwclient/qwclient.js
131
1302c287 132%build
5a3b2c95 133%{qmake_qt5}
1302c287 134%{__make}
a0bb59d8 135%{?with_doc:%{__make} docs}
1302c287
JB
136
137%install
138rm -rf $RPM_BUILD_ROOT
139%{__make} install \
140 INSTALL_ROOT=$RPM_BUILD_ROOT
141
a0bb59d8
JR
142%if %{with doc}
143%{__make} install_docs \
1302c287 144 INSTALL_ROOT=$RPM_BUILD_ROOT
a0bb59d8 145%endif
1302c287
JB
146
147# useless symlinks
c7f74bb9 148%{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
1302c287
JB
149# actually drop *.la, follow policy of not packaging them when *.pc exist
150%{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
151
152# Prepare some files list
153ifecho() {
154 r="$RPM_BUILD_ROOT$2"
155 if [ -d "$r" ]; then
156 echo "%%dir $2" >> $1.files
157 elif [ -x "$r" ] ; then
158 echo "%%attr(755,root,root) $2" >> $1.files
159 elif [ -f "$r" ]; then
160 echo "$2" >> $1.files
161 else
162 echo "Error generation $1 files list!"
163 echo "$r: no such file or directory!"
164 return 1
165 fi
166}
167ifecho_tree() {
168 ifecho $1 $2
169 for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
170 ifecho $1 $2/$f
171 done
172}
173
174echo "%defattr(644,root,root,755)" > examples.files
1302c287
JB
175ifecho_tree examples %{_examplesdir}/qt5/webchannel
176
177%clean
178rm -rf $RPM_BUILD_ROOT
179
180%post -n Qt5WebChannel -p /sbin/ldconfig
181%postun -n Qt5WebChannel -p /sbin/ldconfig
182
183%files -n Qt5WebChannel
184%defattr(644,root,root,755)
c7f74bb9 185%doc LICENSE.GPL3-EXCEPT README.md
a4e247e7 186# R: Core Qml
1302c287
JB
187%attr(755,root,root) %{_libdir}/libQt5WebChannel.so.*.*.*
188%attr(755,root,root) %ghost %{_libdir}/libQt5WebChannel.so.5
189%dir %{qt5dir}/qml/QtWebChannel
a4e247e7 190# R: Core Qml
1302c287
JB
191%attr(755,root,root) %{qt5dir}/qml/QtWebChannel/libdeclarative_webchannel.so
192%{qt5dir}/qml/QtWebChannel/plugins.qmltypes
193%{qt5dir}/qml/QtWebChannel/qmldir
194
195%files -n Qt5WebChannel-devel
196%defattr(644,root,root,755)
197%attr(755,root,root) %{_libdir}/libQt5WebChannel.so
198%{_libdir}/libQt5WebChannel.prl
199%{_includedir}/qt5/QtWebChannel
200%{_pkgconfigdir}/Qt5WebChannel.pc
201%{_libdir}/cmake/Qt5WebChannel
202%{qt5dir}/mkspecs/modules/qt_lib_webchannel.pri
203%{qt5dir}/mkspecs/modules/qt_lib_webchannel_private.pri
204
a0bb59d8 205%if %{with doc}
1302c287
JB
206%files doc
207%defattr(644,root,root,755)
208%{_docdir}/qt5-doc/qtwebchannel
209
1302c287
JB
210%files doc-qch
211%defattr(644,root,root,755)
212%{_docdir}/qt5-doc/qtwebchannel.qch
213%endif
214
215%files examples -f examples.files
216%defattr(644,root,root,755)
217# XXX: dir shared with qt5-qtbase-examples
218%dir %{_examplesdir}/qt5
This page took 0.117367 seconds and 4 git commands to generate.