]>
Commit | Line | Data |
---|---|---|
4438e5e3 JB |
1 | # |
2 | # Conditional build: | |
07abe1ad | 3 | %bcond_without doc # Documentation |
676483bf | 4 | %bcond_without qm # QM translations |
277f7745 | 5 | %bcond_without qml # requires Qt5Qml module |
8a1c70dd WF |
6 | |
7 | %define orgname qtxmlpatterns | |
4438e5e3 | 8 | %define qtbase_ver %{version} |
393248c6 | 9 | %define qttools_ver 5.8 |
b520251e JB |
10 | Summary: The Qt5 XmlPatterns library |
11 | Summary(pl.UTF-8): Biblioteka Qt5 XmlPatterns | |
8a1c70dd | 12 | Name: qt5-%{orgname} |
d71c53ee | 13 | Version: 5.14.2 |
a470c3a8 | 14 | Release: 1 |
a0ef4c0a | 15 | License: LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0 |
b520251e | 16 | Group: Libraries |
c55b966d | 17 | Source0: http://download.qt.io/official_releases/qt/5.14/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz |
d71c53ee | 18 | # Source0-md5: 10fa480c2066f9305a4000d0f5d966a3 |
c55b966d | 19 | Source1: http://download.qt.io/official_releases/qt/5.14/%{version}/submodules/qttranslations-everywhere-src-%{version}.tar.xz |
d71c53ee | 20 | # Source1-md5: bcf8b00e49f4fe4271ff4651bf32aca8 |
545af933 | 21 | URL: http://www.qt.io/ |
a470c3a8 JB |
22 | BuildRequires: OpenGL-devel |
23 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} | |
24 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} | |
25 | BuildRequires: Qt5Network-devel >= %{qtbase_ver} | |
277f7745 | 26 | %{?with_qml:BuildRequires: Qt5Qml-devel >= %{qtbase_ver}} |
a470c3a8 | 27 | BuildRequires: Qt5Widgets-devel >= %{qtbase_ver} |
07abe1ad | 28 | %if %{with doc} |
4438e5e3 JB |
29 | BuildRequires: qt5-assistant >= %{qttools_ver} |
30 | %endif | |
31 | BuildRequires: qt5-build >= %{qtbase_ver} | |
676483bf | 32 | %{?with_qm:BuildRequires: qt5-linguist >= %{qttools_ver}} |
4438e5e3 | 33 | BuildRequires: qt5-qmake >= %{qtbase_ver} |
8a1c70dd | 34 | BuildRequires: rpmbuild(macros) >= 1.654 |
0cfd16be ER |
35 | BuildRequires: tar >= 1:1.22 |
36 | BuildRequires: xz | |
2efca746 | 37 | Obsoletes: Qt5Quick-xmllistmodel < 5.12.1 |
8a1c70dd WF |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
8a1c70dd | 40 | %define specflags -fno-strict-aliasing |
4438e5e3 | 41 | %define qt5dir %{_libdir}/qt5 |
8a1c70dd WF |
42 | |
43 | %description | |
4438e5e3 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 XmlPatterns 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 XmlPatterns. | |
57 | ||
58 | %package -n Qt5XmlPatterns | |
59 | Summary: The Qt5 XmlPatterns library | |
60 | Summary(pl.UTF-8): Biblioteka Qt5 XmlPatterns | |
61 | Group: Libraries | |
62 | Requires: Qt5Core >= %{qtbase_ver} | |
a470c3a8 | 63 | Requires: Qt5Network >= %{qtbase_ver} |
4438e5e3 | 64 | Obsoletes: qt5-qtxmlpatterns |
8a1c70dd | 65 | |
4438e5e3 | 66 | %description -n Qt5XmlPatterns |
533cfea2 JB |
67 | Qt5 XmlPatterns library provides support for XPath, XQuery, XSLT and |
68 | XML Schema validation. | |
4438e5e3 | 69 | |
94ac5271 | 70 | %description -n Qt5XmlPatterns -l pl.UTF-8 |
533cfea2 JB |
71 | Biblioteka Qt5 XmlPatterns zapewnia obsługę XPath, XQuery, XSLT oraz |
72 | sprawdzanie poprawności wg XML Schema. | |
4438e5e3 JB |
73 | |
74 | %package -n Qt5XmlPatterns-devel | |
75 | Summary: Qt5 XmlPatterns library - development files | |
76 | Summary(pl.UTF-8): Biblioteka Qt5 XmlPatterns - pliki programistyczne | |
b520251e | 77 | Group: Development/Libraries |
4438e5e3 | 78 | Requires: Qt5Core-devel >= %{qtbase_ver} |
a470c3a8 | 79 | Requires: Qt5Network-devel >= %{qtbase_ver} |
4438e5e3 JB |
80 | Requires: Qt5XmlPatterns = %{version}-%{release} |
81 | Obsoletes: qt5-qtxmlpatterns-devel | |
82 | ||
83 | %description -n Qt5XmlPatterns-devel | |
84 | Qt5 XmlPatterns library - development files. | |
8a1c70dd | 85 | |
4438e5e3 JB |
86 | %description -n Qt5XmlPatterns-devel -l pl.UTF-8 |
87 | Biblioteka Qt5 XmlPatterns - pliki programistyczne. | |
8a1c70dd WF |
88 | |
89 | %package doc | |
4438e5e3 JB |
90 | Summary: Qt5 XmlPatterns documentation in HTML format |
91 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 XmlPatterns w formacie HTML | |
8a1c70dd | 92 | Group: Documentation |
7ab71ca0 | 93 | Requires: qt5-doc-common >= %{qtbase_ver} |
8abe4cc8 ER |
94 | %if "%{_rpmversion}" >= "5" |
95 | BuildArch: noarch | |
96 | %endif | |
8a1c70dd WF |
97 | |
98 | %description doc | |
4438e5e3 JB |
99 | Qt5 XmlPatterns documentation in HTML format. |
100 | ||
101 | %description doc -l pl.UTF-8 | |
102 | Dokumentacja do biblioteki Qt5 XmlPatterns w formacie HTML. | |
103 | ||
104 | %package doc-qch | |
105 | Summary: Qt5 XmlPatterns documentation in QCH format | |
106 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 XmlPatterns w formacie QCH | |
107 | Group: Documentation | |
108 | Requires: qt5-doc-common >= %{qtbase_ver} | |
109 | %if "%{_rpmversion}" >= "5" | |
110 | BuildArch: noarch | |
111 | %endif | |
112 | ||
113 | %description doc-qch | |
114 | Qt5 XmlPatterns documentation in QCH format. | |
115 | ||
116 | %description doc-qch -l pl.UTF-8 | |
117 | Dokumentacja do biblioteki Qt5 XmlPatterns w formacie QCH. | |
8a1c70dd WF |
118 | |
119 | %package examples | |
120 | Summary: Qt5 XmlPatterns examples | |
4438e5e3 | 121 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 XmlPatterns |
8a1c70dd | 122 | Group: X11/Development/Libraries |
8abe4cc8 ER |
123 | %if "%{_rpmversion}" >= "5" |
124 | BuildArch: noarch | |
125 | %endif | |
8a1c70dd WF |
126 | |
127 | %description examples | |
4438e5e3 JB |
128 | Qt5 XmlPatterns examples. |
129 | ||
130 | %description examples -l pl.UTF-8 | |
131 | Przykłady do biblioteki Qt5 XmlPatterns. | |
8a1c70dd WF |
132 | |
133 | %prep | |
50788a17 | 134 | %setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1} |
8a1c70dd WF |
135 | |
136 | %build | |
137 | qmake-qt5 | |
138 | %{__make} | |
07abe1ad | 139 | %{?with_doc:%{__make} docs} |
8a1c70dd | 140 | |
676483bf | 141 | %if %{with qm} |
50788a17 | 142 | cd qttranslations-everywhere-src-%{version} |
676483bf JB |
143 | qmake-qt5 |
144 | %{__make} | |
145 | cd .. | |
146 | %endif | |
147 | ||
8a1c70dd WF |
148 | %install |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | %{__make} install \ | |
151 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
152 | ||
07abe1ad JR |
153 | %if %{with doc} |
154 | %{__make} install_docs \ | |
8a1c70dd | 155 | INSTALL_ROOT=$RPM_BUILD_ROOT |
07abe1ad | 156 | %endif |
8a1c70dd | 157 | |
676483bf | 158 | %if %{with qm} |
50788a17 | 159 | %{__make} -C qttranslations-everywhere-src-%{version} install \ |
676483bf JB |
160 | INSTALL_ROOT=$RPM_BUILD_ROOT |
161 | # keep only qtxmlpatterns | |
2efca746 | 162 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtconnectivity,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquickcontrols2,qtserialport,qtscript,qtwebengine,qtwebsockets}_*.qm |
676483bf JB |
163 | %endif |
164 | ||
4438e5e3 | 165 | # useless symlinks |
50788a17 | 166 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?? |
4438e5e3 JB |
167 | # actually drop *.la, follow policy of not packaging them when *.pc exist |
168 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
169 | ||
a470c3a8 JB |
170 | # symlinks in system bin dir |
171 | install -d $RPM_BUILD_ROOT%{_bindir} | |
172 | cd $RPM_BUILD_ROOT%{_bindir} | |
173 | ln -sf ../%{_lib}/qt5/bin/xmlpatterns xmlpatterns-qt5 | |
174 | ln -sf ../%{_lib}/qt5/bin/xmlpatternsvalidator xmlpatternsvalidator-qt5 | |
175 | cd - | |
176 | ||
8a1c70dd WF |
177 | # Prepare some files list |
178 | ifecho() { | |
a470c3a8 | 179 | r="$RPM_BUILD_ROOT$2" |
8a1c70dd WF |
180 | if [ -d "$r" ]; then |
181 | echo "%%dir $2" >> $1.files | |
182 | elif [ -x "$r" ] ; then | |
183 | echo "%%attr(755,root,root) $2" >> $1.files | |
184 | elif [ -f "$r" ]; then | |
185 | echo "$2" >> $1.files | |
186 | else | |
187 | echo "Error generation $1 files list!" | |
188 | echo "$r: no such file or directory!" | |
189 | return 1 | |
190 | fi | |
191 | } | |
a470c3a8 JB |
192 | ifecho_tree() { |
193 | ifecho $1 $2 | |
194 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
195 | ifecho $1 $2/$f | |
196 | done | |
197 | } | |
8a1c70dd WF |
198 | |
199 | echo "%defattr(644,root,root,755)" > examples.files | |
a470c3a8 | 200 | ifecho_tree examples %{_examplesdir}/qt5/xmlpatterns |
8a1c70dd | 201 | |
676483bf JB |
202 | # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout |
203 | find_qt5_qm() | |
204 | { | |
205 | name="$1" | |
206 | find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \ | |
207 | sed -e "s:^$RPM_BUILD_ROOT::" \ | |
208 | -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:' | |
209 | } | |
210 | ||
211 | echo '%defattr(644,root,root,755)' > qtxmlpatterns.lang | |
212 | %if %{with qm} | |
213 | find_qt5_qm qtxmlpatterns >> qtxmlpatterns.lang | |
214 | %endif | |
215 | ||
8a1c70dd WF |
216 | %clean |
217 | rm -rf $RPM_BUILD_ROOT | |
218 | ||
4438e5e3 JB |
219 | %post -n Qt5XmlPatterns -p /sbin/ldconfig |
220 | %postun -n Qt5XmlPatterns -p /sbin/ldconfig | |
8a1c70dd | 221 | |
676483bf | 222 | %files -n Qt5XmlPatterns -f qtxmlpatterns.lang |
8a1c70dd | 223 | %defattr(644,root,root,755) |
50788a17 | 224 | %doc LICENSE.GPL3-EXCEPT dist/changes-* |
4438e5e3 JB |
225 | %attr(755,root,root) %{_libdir}/libQt5XmlPatterns.so.*.*.* |
226 | %attr(755,root,root) %ghost %{_libdir}/libQt5XmlPatterns.so.5 | |
a470c3a8 JB |
227 | %attr(755,root,root) %{_bindir}/xmlpatterns-qt5 |
228 | %attr(755,root,root) %{_bindir}/xmlpatternsvalidator-qt5 | |
229 | %attr(755,root,root) %{qt5dir}/bin/xmlpatterns | |
230 | %attr(755,root,root) %{qt5dir}/bin/xmlpatternsvalidator | |
8a1c70dd | 231 | |
277f7745 | 232 | %if %{with qml} |
8553a390 JP |
233 | %dir %{qt5dir}/qml/QtQuick/XmlListModel |
234 | %{qt5dir}/qml/QtQuick/XmlListModel/libqmlxmllistmodelplugin.so | |
235 | %{qt5dir}/qml/QtQuick/XmlListModel/plugins.qmltypes | |
236 | %{qt5dir}/qml/QtQuick/XmlListModel/qmldir | |
277f7745 | 237 | %endif |
8553a390 | 238 | |
a470c3a8 | 239 | %files -n Qt5XmlPatterns-devel |
8a1c70dd WF |
240 | %defattr(644,root,root,755) |
241 | %attr(755,root,root) %{_libdir}/libQt5XmlPatterns.so | |
8a1c70dd | 242 | %{_libdir}/libQt5XmlPatterns.prl |
8a1c70dd | 243 | %{_includedir}/qt5/QtXmlPatterns |
4438e5e3 JB |
244 | %{_pkgconfigdir}/Qt5XmlPatterns.pc |
245 | %{_libdir}/cmake/Qt5XmlPatterns | |
a470c3a8 JB |
246 | %{qt5dir}/mkspecs/modules/qt_lib_xmlpatterns.pri |
247 | %{qt5dir}/mkspecs/modules/qt_lib_xmlpatterns_private.pri | |
8a1c70dd | 248 | |
07abe1ad | 249 | %if %{with doc} |
8a1c70dd WF |
250 | %files doc |
251 | %defattr(644,root,root,755) | |
4438e5e3 JB |
252 | %{_docdir}/qt5-doc/qtxmlpatterns |
253 | ||
4438e5e3 JB |
254 | %files doc-qch |
255 | %defattr(644,root,root,755) | |
256 | %{_docdir}/qt5-doc/qtxmlpatterns.qch | |
257 | %endif | |
8a1c70dd WF |
258 | |
259 | %files examples -f examples.files | |
a470c3a8 JB |
260 | %defattr(644,root,root,755) |
261 | # XXX: dir shared with qt5-qtbase-examples | |
262 | %dir %{_examplesdir}/qt5 |