]>
Commit | Line | Data |
---|---|---|
2e35b2d0 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without qch # documentation in QCH format | |
b4b9963c | 4 | %bcond_without qm # QM translations |
5231269b WF |
5 | |
6 | %define orgname qtscript | |
2e35b2d0 JB |
7 | %define qtbase_ver %{version} |
8 | %define qttools_ver %{version} | |
9 | Summary: The Qt5 Script libraries | |
10 | Summary(pl.UTF-8): Biblioteki Qt5 Script | |
5231269b | 11 | Name: qt5-%{orgname} |
5f5554de | 12 | Version: 5.5.1 |
5f4659da JB |
13 | Release: 1 |
14 | License: LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0 | |
2e35b2d0 | 15 | Group: Libraries |
5f5554de JB |
16 | Source0: http://download.qt.io/official_releases/qt/5.5/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz |
17 | # Source0-md5: 7abbe43ec935004a9312387b4aa6b07f | |
18 | Source1: http://download.qt.io/official_releases/qt/5.5/%{version}/submodules/qttranslations-opensource-src-%{version}.tar.xz | |
19 | # Source1-md5: 1f89d53fe759db123b4b6d9de9d9e8c9 | |
20 | URL: http://www.qt.io/ | |
5f4659da | 21 | BuildRequires: OpenGL-devel |
2e35b2d0 | 22 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} |
5f4659da JB |
23 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} |
24 | BuildRequires: Qt5Widgets-devel >= %{qtbase_ver} | |
2e35b2d0 | 25 | %if %{with qch} |
fb7d1112 | 26 | BuildRequires: qt5-assistant >= %{qttools_ver} |
2e35b2d0 JB |
27 | %endif |
28 | BuildRequires: qt5-build >= %{qtbase_ver} | |
b4b9963c | 29 | %{?with_qm:BuildRequires: qt5-linguist >= %{qttools_ver}} |
2e35b2d0 | 30 | BuildRequires: qt5-qmake >= %{qtbase_ver} |
5231269b | 31 | BuildRequires: rpmbuild(macros) >= 1.654 |
527f73a8 ER |
32 | BuildRequires: tar >= 1:1.22 |
33 | BuildRequires: xz | |
5231269b WF |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
5231269b | 36 | %define specflags -fno-strict-aliasing |
2e35b2d0 | 37 | %define qt5dir %{_libdir}/qt5 |
5231269b WF |
38 | |
39 | %description | |
2e35b2d0 JB |
40 | Qt is a cross-platform application and UI framework. Using Qt, you can |
41 | write web-enabled applications once and deploy them across desktop, | |
42 | mobile and embedded systems without rewriting the source code. | |
43 | ||
44 | This package contains Qt5 Script libraries. | |
45 | ||
46 | %description -l pl.UTF-8 | |
47 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
48 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
49 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
50 | źródłowego. | |
51 | ||
52 | Ten pakiet zawiera biblioteki Qt5 Script. | |
5231269b | 53 | |
d8e87b8e | 54 | %package -n Qt5Script |
8781bf15 JB |
55 | Summary: The Qt5 Script library |
56 | Summary(pl.UTF-8): Biblioteka Qt5 Script | |
2e35b2d0 | 57 | Group: Libraries |
5f4659da | 58 | Requires: Qt5Core >= %{qtbase_ver} |
2e35b2d0 | 59 | Obsoletes: qt5-qtscript |
d8e87b8e WF |
60 | |
61 | %description -n Qt5Script | |
8781bf15 | 62 | Qt5 Script library provides classes for making Qt 5 applications |
2e35b2d0 JB |
63 | scriptable. |
64 | ||
bbe5576e | 65 | %description -n Qt5Script -l pl.UTF-8 |
8781bf15 | 66 | Biblioteka Qt5 Script dostarcza klasy pozwalające na oskryptowanie |
2e35b2d0 | 67 | aplikacji Qt 5. |
d8e87b8e WF |
68 | |
69 | %package -n Qt5Script-devel | |
8781bf15 JB |
70 | Summary: Qt5 Script library - development files |
71 | Summary(pl.UTF-8): Biblioteka Qt5 Script - pliki programistyczne | |
2e35b2d0 | 72 | Group: Development/Libraries |
5f4659da | 73 | Requires: Qt5Core-devel >= %{qtbase_ver} |
d8e87b8e | 74 | Requires: Qt5Script = %{version}-%{release} |
2e35b2d0 | 75 | Obsoletes: qt5-qtscript-devel |
5231269b | 76 | |
d8e87b8e | 77 | %description -n Qt5Script-devel |
8781bf15 | 78 | Qt5 Script library - development files. |
2e35b2d0 JB |
79 | |
80 | %description -n Qt5Script-devel -l pl.UTF-8 | |
8781bf15 JB |
81 | Biblioteka Qt5 Script - pliki programistyczne. |
82 | ||
83 | %package -n Qt5ScriptTools | |
84 | Summary: The Qt5 ScriptTools libraries | |
85 | Summary(pl.UTF-8): Biblioteki Qt5 ScriptTools | |
86 | Group: Libraries | |
87 | Requires: Qt5Gui >= %{qtbase_ver} | |
88 | Requires: Qt5Script = %{version}-%{release} | |
89 | Requires: Qt5Widgets >= %{qtbase_ver} | |
90 | ||
91 | %description -n Qt5ScriptTools | |
92 | Qt5 ScriptTools library provides additional components for | |
93 | applications that use Qt5 Script. | |
94 | ||
bbe5576e | 95 | %description -n Qt5ScriptTools -l pl.UTF-8 |
8781bf15 JB |
96 | Biblioteki Qt5 ScriptTools dostarczaja dodatkowe komponenty dla |
97 | aplikacji wykorzystujących bibliotekę Qt5 Script. | |
98 | ||
99 | %package -n Qt5ScriptTools-devel | |
100 | Summary: Qt5 ScriptTools library - development files | |
101 | Summary(pl.UTF-8): Biblioteka Qt5 ScriptTools - pliki programistyczne | |
102 | Group: Development/Libraries | |
103 | Requires: OpenGL-devel | |
104 | Requires: Qt5Gui-devel >= %{qtbase_ver} | |
105 | Requires: Qt5Script-devel = %{version}-%{release} | |
106 | Requires: Qt5ScriptTools = %{version}-%{release} | |
107 | Requires: Qt5Widgets-devel >= %{qtbase_ver} | |
108 | ||
109 | %description -n Qt5ScriptTools-devel | |
110 | Qt5 ScriptTools library - development files. | |
111 | ||
112 | %description -n Qt5ScriptTools-devel -l pl.UTF-8 | |
113 | Biblioteka Qt5 ScriptTools - pliki programistyczne. | |
5231269b WF |
114 | |
115 | %package doc | |
2e35b2d0 JB |
116 | Summary: Qt5 Script documentation in HTML format |
117 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Script w formacie HTML | |
5231269b | 118 | Group: Documentation |
2e35b2d0 | 119 | Requires: qt5-doc-common >= %{qtbase_ver} |
527f73a8 ER |
120 | %if "%{_rpmversion}" >= "5" |
121 | BuildArch: noarch | |
122 | %endif | |
5231269b WF |
123 | |
124 | %description doc | |
2e35b2d0 JB |
125 | Qt5 Script documentation in HTML format. |
126 | ||
127 | %description doc -l pl.UTF-8 | |
128 | Dokumentacja do bibliotek Qt5 Script w formacie HTML. | |
129 | ||
130 | %package doc-qch | |
131 | Summary: Qt5 Script documentation in QCH format | |
132 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Script w formacie QCH | |
133 | Group: Documentation | |
134 | Requires: qt5-doc-common >= %{qtbase_ver} | |
135 | %if "%{_rpmversion}" >= "5" | |
136 | BuildArch: noarch | |
137 | %endif | |
138 | ||
139 | %description doc-qch | |
140 | Qt5 Script documentation in QCH format. | |
141 | ||
142 | %description doc-qch -l pl.UTF-8 | |
143 | Dokumentacja do bibliotek Qt5 Script w formacie QCH. | |
5231269b WF |
144 | |
145 | %package examples | |
146 | Summary: Qt5 Script examples | |
2e35b2d0 | 147 | Summary(pl.UTF-8): Przykłady do bibliotek Qt5 Script |
5231269b | 148 | Group: X11/Development/Libraries |
527f73a8 ER |
149 | %if "%{_rpmversion}" >= "5" |
150 | BuildArch: noarch | |
151 | %endif | |
5231269b WF |
152 | |
153 | %description examples | |
2e35b2d0 JB |
154 | Qt5 Script examples. |
155 | ||
156 | %description examples -l pl.UTF-8 | |
157 | Przykłady do bibliotek Qt5 Script. | |
5231269b WF |
158 | |
159 | %prep | |
b4b9963c | 160 | %setup -q -n %{orgname}-opensource-src-%{version} %{?with_qm:-a1} |
5231269b WF |
161 | |
162 | %build | |
163 | qmake-qt5 | |
164 | %{__make} | |
2e35b2d0 | 165 | %{__make} %{!?with_qch:html_}docs |
5231269b | 166 | |
b4b9963c JB |
167 | %if %{with qm} |
168 | cd qttranslations-opensource-src-%{version} | |
169 | qmake-qt5 | |
170 | %{__make} | |
171 | cd .. | |
172 | %endif | |
173 | ||
5231269b WF |
174 | %install |
175 | rm -rf $RPM_BUILD_ROOT | |
176 | %{__make} install \ | |
177 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
178 | ||
2e35b2d0 | 179 | %{__make} install_%{!?with_qch:html_}docs \ |
5231269b WF |
180 | INSTALL_ROOT=$RPM_BUILD_ROOT |
181 | ||
b4b9963c JB |
182 | %if %{with qm} |
183 | %{__make} -C qttranslations-opensource-src-%{version} install \ | |
184 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
185 | # keep only qtscript | |
5f5554de | 186 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qmlviewer,qt,qtbase,qtconfig,qtconnectivity,qtdeclarative,qtlocation,qtmultimedia,qtquick1,qtquickcontrols,qtwebsockets,qtxmlpatterns}_*.qm |
b4b9963c JB |
187 | %endif |
188 | ||
5f4659da JB |
189 | # kill unnecessary -L%{_libdir} from *.la, *.prl, *.pc |
190 | %{__sed} -i -e "s,-L%{_libdir} \?,,g" \ | |
191 | $RPM_BUILD_ROOT%{_libdir}/*.{la,prl} \ | |
192 | $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc | |
193 | ||
2e35b2d0 JB |
194 | # useless symlinks |
195 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.? | |
196 | # actually drop *.la, follow policy of not packaging them when *.pc exist | |
197 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
198 | ||
5231269b WF |
199 | # Prepare some files list |
200 | ifecho() { | |
2e35b2d0 | 201 | r="$RPM_BUILD_ROOT$2" |
5231269b WF |
202 | if [ -d "$r" ]; then |
203 | echo "%%dir $2" >> $1.files | |
204 | elif [ -x "$r" ] ; then | |
205 | echo "%%attr(755,root,root) $2" >> $1.files | |
206 | elif [ -f "$r" ]; then | |
207 | echo "$2" >> $1.files | |
208 | else | |
209 | echo "Error generation $1 files list!" | |
210 | echo "$r: no such file or directory!" | |
211 | return 1 | |
212 | fi | |
213 | } | |
2e35b2d0 JB |
214 | ifecho_tree() { |
215 | ifecho $1 $2 | |
216 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
217 | ifecho $1 $2/$f | |
218 | done | |
219 | } | |
5231269b WF |
220 | |
221 | echo "%defattr(644,root,root,755)" > examples.files | |
2e35b2d0 | 222 | ifecho_tree examples %{_examplesdir}/qt5/script |
5231269b | 223 | |
b4b9963c JB |
224 | # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout |
225 | find_qt5_qm() | |
226 | { | |
227 | name="$1" | |
228 | find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \ | |
229 | sed -e "s:^$RPM_BUILD_ROOT::" \ | |
230 | -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:' | |
231 | } | |
232 | ||
233 | echo '%defattr(644,root,root,755)' > qtscript.lang | |
234 | %if %{with qm} | |
235 | find_qt5_qm qtscript >> qtscript.lang | |
236 | %endif | |
237 | ||
5231269b WF |
238 | %clean |
239 | rm -rf $RPM_BUILD_ROOT | |
240 | ||
2e35b2d0 JB |
241 | %post -n Qt5Script -p /sbin/ldconfig |
242 | %postun -n Qt5Script -p /sbin/ldconfig | |
5231269b | 243 | |
8781bf15 JB |
244 | %post -n Qt5ScriptTools -p /sbin/ldconfig |
245 | %postun -n Qt5ScriptTools -p /sbin/ldconfig | |
246 | ||
b4b9963c | 247 | %files -n Qt5Script -f qtscript.lang |
5231269b | 248 | %defattr(644,root,root,755) |
024c7896 | 249 | %doc LGPL_EXCEPTION.txt dist/changes-* |
2e35b2d0 JB |
250 | %attr(755,root,root) %{_libdir}/libQt5Script.so.*.*.* |
251 | %attr(755,root,root) %ghost %{_libdir}/libQt5Script.so.5 | |
5231269b | 252 | |
d8e87b8e | 253 | %files -n Qt5Script-devel |
5231269b WF |
254 | %defattr(644,root,root,755) |
255 | %attr(755,root,root) %{_libdir}/libQt5Script.so | |
5231269b | 256 | %{_libdir}/libQt5Script.prl |
5231269b | 257 | %{_includedir}/qt5/QtScript |
2e35b2d0 | 258 | %{_pkgconfigdir}/Qt5Script.pc |
2e35b2d0 | 259 | %{_libdir}/cmake/Qt5Script |
2e35b2d0 JB |
260 | %{qt5dir}/mkspecs/modules/qt_lib_script.pri |
261 | %{qt5dir}/mkspecs/modules/qt_lib_script_private.pri | |
8781bf15 JB |
262 | |
263 | %files -n Qt5ScriptTools | |
264 | %defattr(644,root,root,755) | |
265 | %attr(755,root,root) %{_libdir}/libQt5ScriptTools.so.*.*.* | |
266 | %attr(755,root,root) %ghost %{_libdir}/libQt5ScriptTools.so.5 | |
267 | ||
268 | %files -n Qt5ScriptTools-devel | |
269 | %defattr(644,root,root,755) | |
270 | %attr(755,root,root) %{_libdir}/libQt5ScriptTools.so | |
271 | %{_libdir}/libQt5ScriptTools.prl | |
272 | %{_includedir}/qt5/QtScriptTools | |
273 | %{_pkgconfigdir}/Qt5ScriptTools.pc | |
274 | %{_libdir}/cmake/Qt5ScriptTools | |
2e35b2d0 JB |
275 | %{qt5dir}/mkspecs/modules/qt_lib_scripttools.pri |
276 | %{qt5dir}/mkspecs/modules/qt_lib_scripttools_private.pri | |
5231269b WF |
277 | |
278 | %files doc | |
279 | %defattr(644,root,root,755) | |
2e35b2d0 JB |
280 | %{_docdir}/qt5-doc/qtscript |
281 | %{_docdir}/qt5-doc/qtscripttools | |
282 | ||
283 | %if %{with qch} | |
284 | %files doc-qch | |
285 | %defattr(644,root,root,755) | |
286 | %{_docdir}/qt5-doc/qtscript.qch | |
287 | %{_docdir}/qt5-doc/qtscripttools.qch | |
288 | %endif | |
5231269b WF |
289 | |
290 | %files examples -f examples.files | |
2e35b2d0 JB |
291 | %defattr(644,root,root,755) |
292 | # XXX: dir shared with qt5-qtbase-examples | |
293 | %dir %{_examplesdir}/qt5 |