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