]>
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} |
b81b7482 | 13 | Version: 5.15.14 |
4854a934 | 14 | Release: 1 |
cfe701a4 | 15 | License: LGPL v3 or GPL v2 or GPL v3 or commercial |
2e35b2d0 | 16 | Group: Libraries |
091179e4 | 17 | Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz |
b81b7482 | 18 | # Source0-md5: 72439f00aacb9978ecb6ffda41eacd93 |
091179e4 | 19 | Source1: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/qttranslations-everywhere-opensource-src-%{version}.tar.xz |
b81b7482 | 20 | # Source1-md5: 6f4f2fdf3466f8bc97a074258f124c13 |
cfe701a4 | 21 | URL: https://www.qt.io/ |
2e35b2d0 | 22 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} |
5f4659da JB |
23 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} |
24 | BuildRequires: Qt5Widgets-devel >= %{qtbase_ver} | |
2417ed72 JB |
25 | %if %{with examples} |
26 | BuildRequires: Qt5UiTools-devel >= %{qttools_ver} | |
27 | %endif | |
b0aefb90 | 28 | %if %{with doc} |
fb7d1112 | 29 | BuildRequires: qt5-assistant >= %{qttools_ver} |
2e35b2d0 JB |
30 | %endif |
31 | BuildRequires: qt5-build >= %{qtbase_ver} | |
b4b9963c | 32 | %{?with_qm:BuildRequires: qt5-linguist >= %{qttools_ver}} |
2e35b2d0 | 33 | BuildRequires: qt5-qmake >= %{qtbase_ver} |
583593c9 | 34 | BuildRequires: rpm-build >= 4.6 |
e187ce67 | 35 | BuildRequires: rpmbuild(macros) >= 2.016 |
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 |
ba88be87 | 62 | %requires_eq_to Qt5Core Qt5Core-devel |
5c5a321a | 63 | Obsoletes: qt5-qtscript < 5.3.0 |
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} |
5c5a321a | 79 | Obsoletes: qt5-qtscript-devel < 5.3.0 |
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 | |
8781bf15 JB |
107 | Requires: Qt5Script-devel = %{version}-%{release} |
108 | Requires: Qt5ScriptTools = %{version}-%{release} | |
8781bf15 JB |
109 | |
110 | %description -n Qt5ScriptTools-devel | |
111 | Qt5 ScriptTools library - development files. | |
112 | ||
113 | %description -n Qt5ScriptTools-devel -l pl.UTF-8 | |
114 | Biblioteka Qt5 ScriptTools - pliki programistyczne. | |
5231269b WF |
115 | |
116 | %package doc | |
2e35b2d0 JB |
117 | Summary: Qt5 Script documentation in HTML format |
118 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Script w formacie HTML | |
5231269b | 119 | Group: Documentation |
2e35b2d0 | 120 | Requires: qt5-doc-common >= %{qtbase_ver} |
04290b2e | 121 | BuildArch: noarch |
5231269b WF |
122 | |
123 | %description doc | |
2e35b2d0 JB |
124 | Qt5 Script documentation in HTML format. |
125 | ||
126 | %description doc -l pl.UTF-8 | |
127 | Dokumentacja do bibliotek Qt5 Script w formacie HTML. | |
128 | ||
129 | %package doc-qch | |
130 | Summary: Qt5 Script documentation in QCH format | |
131 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Script w formacie QCH | |
132 | Group: Documentation | |
133 | Requires: qt5-doc-common >= %{qtbase_ver} | |
04290b2e | 134 | BuildArch: noarch |
2e35b2d0 JB |
135 | |
136 | %description doc-qch | |
137 | Qt5 Script documentation in QCH format. | |
138 | ||
139 | %description doc-qch -l pl.UTF-8 | |
140 | Dokumentacja do bibliotek Qt5 Script w formacie QCH. | |
5231269b WF |
141 | |
142 | %package examples | |
143 | Summary: Qt5 Script examples | |
2e35b2d0 | 144 | Summary(pl.UTF-8): Przykłady do bibliotek Qt5 Script |
5231269b | 145 | Group: X11/Development/Libraries |
04290b2e | 146 | BuildArch: noarch |
5231269b WF |
147 | |
148 | %description examples | |
2e35b2d0 JB |
149 | Qt5 Script examples. |
150 | ||
151 | %description examples -l pl.UTF-8 | |
152 | Przykłady do bibliotek Qt5 Script. | |
5231269b WF |
153 | |
154 | %prep | |
a3d24763 | 155 | %setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1} |
5231269b WF |
156 | |
157 | %build | |
e187ce67 | 158 | %{qmake_qt5} |
5231269b | 159 | %{__make} |
799bb678 | 160 | %{?with_doc:%{__make} docs} |
5231269b | 161 | |
b4b9963c | 162 | %if %{with qm} |
a3d24763 | 163 | cd qttranslations-everywhere-src-%{version} |
e187ce67 | 164 | %{qmake_qt5} |
b4b9963c JB |
165 | %{__make} |
166 | cd .. | |
167 | %endif | |
168 | ||
5231269b WF |
169 | %install |
170 | rm -rf $RPM_BUILD_ROOT | |
cfe701a4 | 171 | |
5231269b WF |
172 | %{__make} install \ |
173 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
174 | ||
b0aefb90 JR |
175 | %if %{with doc} |
176 | %{__make} install_docs \ | |
5231269b | 177 | INSTALL_ROOT=$RPM_BUILD_ROOT |
b0aefb90 | 178 | %endif |
5231269b | 179 | |
b4b9963c | 180 | %if %{with qm} |
a3d24763 | 181 | %{__make} -C qttranslations-everywhere-src-%{version} install \ |
b4b9963c JB |
182 | INSTALL_ROOT=$RPM_BUILD_ROOT |
183 | # keep only qtscript | |
66da5155 | 184 | %{__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 |
185 | %endif |
186 | ||
5f4659da JB |
187 | # kill unnecessary -L%{_libdir} from *.la, *.prl, *.pc |
188 | %{__sed} -i -e "s,-L%{_libdir} \?,,g" \ | |
189 | $RPM_BUILD_ROOT%{_libdir}/*.{la,prl} \ | |
190 | $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc | |
191 | ||
2e35b2d0 | 192 | # useless symlinks |
a3d24763 | 193 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?? |
2e35b2d0 JB |
194 | # actually drop *.la, follow policy of not packaging them when *.pc exist |
195 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
196 | ||
5231269b WF |
197 | # Prepare some files list |
198 | ifecho() { | |
2e35b2d0 | 199 | r="$RPM_BUILD_ROOT$2" |
5231269b WF |
200 | if [ -d "$r" ]; then |
201 | echo "%%dir $2" >> $1.files | |
202 | elif [ -x "$r" ] ; then | |
203 | echo "%%attr(755,root,root) $2" >> $1.files | |
204 | elif [ -f "$r" ]; then | |
205 | echo "$2" >> $1.files | |
206 | else | |
207 | echo "Error generation $1 files list!" | |
208 | echo "$r: no such file or directory!" | |
209 | return 1 | |
210 | fi | |
211 | } | |
2e35b2d0 JB |
212 | ifecho_tree() { |
213 | ifecho $1 $2 | |
214 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
215 | ifecho $1 $2/$f | |
216 | done | |
217 | } | |
5231269b WF |
218 | |
219 | echo "%defattr(644,root,root,755)" > examples.files | |
2e35b2d0 | 220 | ifecho_tree examples %{_examplesdir}/qt5/script |
5231269b | 221 | |
b4b9963c JB |
222 | # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout |
223 | find_qt5_qm() | |
224 | { | |
225 | name="$1" | |
226 | find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \ | |
227 | sed -e "s:^$RPM_BUILD_ROOT::" \ | |
228 | -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:' | |
229 | } | |
230 | ||
231 | echo '%defattr(644,root,root,755)' > qtscript.lang | |
232 | %if %{with qm} | |
233 | find_qt5_qm qtscript >> qtscript.lang | |
234 | %endif | |
235 | ||
5231269b WF |
236 | %clean |
237 | rm -rf $RPM_BUILD_ROOT | |
238 | ||
2e35b2d0 JB |
239 | %post -n Qt5Script -p /sbin/ldconfig |
240 | %postun -n Qt5Script -p /sbin/ldconfig | |
5231269b | 241 | |
8781bf15 JB |
242 | %post -n Qt5ScriptTools -p /sbin/ldconfig |
243 | %postun -n Qt5ScriptTools -p /sbin/ldconfig | |
244 | ||
b4b9963c | 245 | %files -n Qt5Script -f qtscript.lang |
5231269b | 246 | %defattr(644,root,root,755) |
a3d24763 | 247 | %doc LICENSE.GPL3-EXCEPT dist/changes-* |
2e35b2d0 JB |
248 | %attr(755,root,root) %{_libdir}/libQt5Script.so.*.*.* |
249 | %attr(755,root,root) %ghost %{_libdir}/libQt5Script.so.5 | |
5231269b | 250 | |
d8e87b8e | 251 | %files -n Qt5Script-devel |
5231269b WF |
252 | %defattr(644,root,root,755) |
253 | %attr(755,root,root) %{_libdir}/libQt5Script.so | |
5231269b | 254 | %{_libdir}/libQt5Script.prl |
5231269b | 255 | %{_includedir}/qt5/QtScript |
2e35b2d0 | 256 | %{_pkgconfigdir}/Qt5Script.pc |
2e35b2d0 | 257 | %{_libdir}/cmake/Qt5Script |
2e35b2d0 JB |
258 | %{qt5dir}/mkspecs/modules/qt_lib_script.pri |
259 | %{qt5dir}/mkspecs/modules/qt_lib_script_private.pri | |
8781bf15 JB |
260 | |
261 | %files -n Qt5ScriptTools | |
262 | %defattr(644,root,root,755) | |
263 | %attr(755,root,root) %{_libdir}/libQt5ScriptTools.so.*.*.* | |
264 | %attr(755,root,root) %ghost %{_libdir}/libQt5ScriptTools.so.5 | |
265 | ||
266 | %files -n Qt5ScriptTools-devel | |
267 | %defattr(644,root,root,755) | |
268 | %attr(755,root,root) %{_libdir}/libQt5ScriptTools.so | |
269 | %{_libdir}/libQt5ScriptTools.prl | |
270 | %{_includedir}/qt5/QtScriptTools | |
271 | %{_pkgconfigdir}/Qt5ScriptTools.pc | |
272 | %{_libdir}/cmake/Qt5ScriptTools | |
2e35b2d0 JB |
273 | %{qt5dir}/mkspecs/modules/qt_lib_scripttools.pri |
274 | %{qt5dir}/mkspecs/modules/qt_lib_scripttools_private.pri | |
5231269b | 275 | |
b0aefb90 | 276 | %if %{with doc} |
5231269b WF |
277 | %files doc |
278 | %defattr(644,root,root,755) | |
2e35b2d0 JB |
279 | %{_docdir}/qt5-doc/qtscript |
280 | %{_docdir}/qt5-doc/qtscripttools | |
281 | ||
2e35b2d0 JB |
282 | %files doc-qch |
283 | %defattr(644,root,root,755) | |
284 | %{_docdir}/qt5-doc/qtscript.qch | |
285 | %{_docdir}/qt5-doc/qtscripttools.qch | |
286 | %endif | |
5231269b | 287 | |
2417ed72 | 288 | %if %{with examples} |
5231269b | 289 | %files examples -f examples.files |
2e35b2d0 JB |
290 | %defattr(644,root,root,755) |
291 | # XXX: dir shared with qt5-qtbase-examples | |
292 | %dir %{_examplesdir}/qt5 | |
2417ed72 | 293 | %endif |