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