]> git.pld-linux.org Git - packages/qt5-qtwebchannel.git/blob - qt5-qtwebchannel.spec
use macro for qmake invocation
[packages/qt5-qtwebchannel.git] / qt5-qtwebchannel.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Documentation
4
5 %define         orgname         qtwebchannel
6 %define         qtbase_ver              %{version}
7 %define         qtdeclarative_ver       %{version}
8 %define         qttools_ver             %{version}
9 %define         qtwebsockets_ver        %{version}
10 Summary:        The Qt5 WebChannel library
11 Summary(pl.UTF-8):      Biblioteka Qt5 WebChannel
12 Name:           qt5-%{orgname}
13 Version:        5.15.4
14 Release:        1
15 License:        LGPL v3 or GPL v2 or GPL v3 or commercial
16 Group:          X11/Libraries
17 Source0:        https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz
18 # Source0-md5:  790a627fd53a94f1f779be6d5ee76cc6
19 URL:            https://www.qt.io/
20 BuildRequires:  Qt5Core-devel >= %{qtbase_ver}
21 BuildRequires:  Qt5Network-devel >= %{qtbase_ver}
22 BuildRequires:  Qt5Qml-devel >= %{qtdeclarative_ver}
23 BuildRequires:  Qt5Quick-devel >= %{qtdeclarative_ver}
24 # for examples
25 BuildRequires:  Qt5WebSockets-devel >= %{qtwebsockets_ver}
26 %if %{with doc}
27 BuildRequires:  qt5-assistant >= %{qttools_ver}
28 %endif
29 BuildRequires:  qt5-build >= %{qtbase_ver}
30 BuildRequires:  qt5-qmake >= %{qtbase_ver}
31 BuildRequires:  rpm-build >= 4.6
32 BuildRequires:  rpmbuild(macros) >= 2.016
33 BuildRequires:  tar >= 1:1.22
34 BuildRequires:  xz
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         specflags       -fno-strict-aliasing
38 %define         qt5dir          %{_libdir}/qt5
39
40 %description
41 Qt is a cross-platform application and UI framework. Using Qt, you can
42 write web-enabled applications once and deploy them across desktop,
43 mobile and embedded systems without rewriting the source code.
44
45 This package contains Qt5 WebChannel library.
46
47 %description -l pl.UTF-8
48 Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika.
49 Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w
50 systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu
51 źródłowego.
52
53 Ten pakiet zawiera bibliotekę Qt5 WebChannel.
54
55 %package -n Qt5WebChannel
56 Summary:        The Qt5 WebChannel library
57 Summary(pl.UTF-8):      Biblioteka Qt5 WebChannel
58 Group:          Libraries
59 Requires:       Qt5Core >= %{qtbase_ver}
60 Requires:       Qt5Network >= %{qtbase_ver}
61 Requires:       Qt5Qml >= %{qtdeclarative_ver}
62
63 %description -n Qt5WebChannel
64 Qt5 WebChannel library provides seamless integration of C++ and QML
65 applications with HTML/JavaScript clients.
66
67 %description -n Qt5WebChannel -l pl.UTF-8
68 Biblioteka Qt5 WebChannel udostępnia integrację aplikacji C++ i QML z
69 klientami w HTML-u/JavaScripcie.
70
71 %package -n Qt5WebChannel-devel
72 Summary:        Qt5 WebChannel library - development files
73 Summary(pl.UTF-8):      Biblioteka Qt5 WebChannel - pliki programistyczne
74 Group:          Development/Libraries
75 Requires:       Qt5Core-devel >= %{qtbase_ver}
76 Requires:       Qt5Network-devel >= %{qtbase_ver}
77 Requires:       Qt5Qml-devel >= %{qtdeclarative_ver}
78 Requires:       Qt5WebChannel = %{version}-%{release}
79
80 %description -n Qt5WebChannel-devel
81 Qt5 WebChannel library - development files.
82
83 %description -n Qt5WebChannel-devel -l pl.UTF-8
84 Biblioteka Qt5 WebChannel - pliki programistyczne.
85
86 %package doc
87 Summary:        Qt5 WebChannel documentation in HTML format
88 Summary(pl.UTF-8):      Dokumentacja do biblioteki Qt5 WebChannel w formacie HTML
89 Group:          Documentation
90 Requires:       qt5-doc-common >= %{qtbase_ver}
91 BuildArch:      noarch
92
93 %description doc
94 Qt5 WebChannel documentation in HTML format.
95
96 %description doc -l pl.UTF-8
97 Dokumentacja do biblioteki Qt5 WebChannel w formacie HTML.
98
99 %package doc-qch
100 Summary:        Qt5 WebChannel documentation in QCH format
101 Summary(pl.UTF-8):      Dokumentacja do biblioteki Qt5 WebChannel w formacie QCH
102 Group:          Documentation
103 Requires:       qt5-doc-common >= %{qtbase_ver}
104 BuildArch:      noarch
105
106 %description doc-qch
107 Qt5 WebChannel documentation in QCH format.
108
109 %description doc-qch -l pl.UTF-8
110 Dokumentacja do biblioteki Qt5 WebChannel w formacie QCH.
111
112 %package examples
113 Summary:        Qt5 WebChannel examples
114 Summary(pl.UTF-8):      Przykłady do biblioteki Qt5 WebChannel
115 Group:          X11/Development/Libraries
116 BuildArch:      noarch
117
118 %description examples
119 Qt5 WebChannel examples.
120
121 %description examples -l pl.UTF-8
122 Przykłady do biblioteki Qt5 WebChannel.
123
124 %prep
125 %setup -q -n %{orgname}-everywhere-src-%{version}
126
127 %{__sed} -i -e '1{
128         s,^#!.*bin/env node,#!/usr/bin/node,
129 }' \
130         examples/webchannel/qwclient/qwclient.js
131
132 %build
133 %{qmake_qt5}
134 %{__make}
135 %{?with_doc:%{__make} docs}
136
137 %install
138 rm -rf $RPM_BUILD_ROOT
139 %{__make} install \
140         INSTALL_ROOT=$RPM_BUILD_ROOT
141
142 %if %{with doc}
143 %{__make} install_docs \
144         INSTALL_ROOT=$RPM_BUILD_ROOT
145 %endif
146
147 # useless symlinks
148 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
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
153 ifecho() {
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 }
167 ifecho_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
174 echo "%defattr(644,root,root,755)" > examples.files
175 ifecho_tree examples %{_examplesdir}/qt5/webchannel
176
177 %clean
178 rm -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)
185 %doc LICENSE.GPL3-EXCEPT README.md
186 # R: Core Qml
187 %attr(755,root,root) %{_libdir}/libQt5WebChannel.so.*.*.*
188 %attr(755,root,root) %ghost %{_libdir}/libQt5WebChannel.so.5
189 %dir %{qt5dir}/qml/QtWebChannel
190 # R: Core Qml
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
205 %if %{with doc}
206 %files doc
207 %defattr(644,root,root,755)
208 %{_docdir}/qt5-doc/qtwebchannel
209
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.084059 seconds and 3 git commands to generate.