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