]> git.pld-linux.org Git - SPECS.git/blob - qt5-qtxmlpatterns.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / qt5-qtxmlpatterns.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Documentation
4 %bcond_without  qm      # QM translations
5 %bcond_without  qml     # Quick xmllistmodel plugin
6
7 %define         orgname                 qtxmlpatterns
8 %define         qtbase_ver              %{version}
9 %define         qttools_ver             5.9
10 %define         qtdeclarative_ver       %{version}
11 Summary:        The Qt5 XmlPatterns library
12 Summary(pl.UTF-8):      Biblioteka Qt5 XmlPatterns
13 Name:           qt5-%{orgname}
14 Version:        5.15.13
15 Release:        1
16 License:        LGPL v3 or GPL v2 or GPL v3 or commercial
17 Group:          Libraries
18 Source0:        https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz
19 # Source0-md5:  90dec28420a6ad63b6ab8a531e976ad2
20 Source1:        https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/qttranslations-everywhere-opensource-src-%{version}.tar.xz
21 # Source1-md5:  a7fe34c317fbba74a9f97c36679fec47
22 URL:            https://www.qt.io/
23 BuildRequires:  OpenGL-devel
24 BuildRequires:  Qt5Core-devel >= %{qtbase_ver}
25 BuildRequires:  Qt5Gui-devel >= %{qtbase_ver}
26 BuildRequires:  Qt5Network-devel >= %{qtbase_ver}
27 %{?with_qml:BuildRequires:      Qt5Qml-devel >= %{qtdeclarative_ver}}
28 BuildRequires:  Qt5Widgets-devel >= %{qtbase_ver}
29 %if %{with doc}
30 BuildRequires:  qt5-assistant >= %{qttools_ver}
31 %endif
32 BuildRequires:  qt5-build >= %{qtbase_ver}
33 %{?with_qm:BuildRequires:       qt5-linguist >= %{qttools_ver}}
34 BuildRequires:  qt5-qmake >= %{qtbase_ver}
35 BuildRequires:  rpm-build >= 4.6
36 BuildRequires:  rpmbuild(macros) >= 2.016
37 BuildRequires:  tar >= 1:1.22
38 BuildRequires:  xz
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %define         specflags       -fno-strict-aliasing
42 %define         qt5dir          %{_libdir}/qt5
43
44 %description
45 Qt is a cross-platform application and UI framework. Using Qt, you can
46 write web-enabled applications once and deploy them across desktop,
47 mobile and embedded systems without rewriting the source code.
48
49 This package contains Qt5 XmlPatterns libraries.
50
51 %description -l pl.UTF-8
52 Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika.
53 Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w
54 systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu
55 źródłowego.
56
57 Ten pakiet zawiera biblioteki Qt5 XmlPatterns.
58
59 %package -n Qt5XmlPatterns
60 Summary:        The Qt5 XmlPatterns library
61 Summary(pl.UTF-8):      Biblioteka Qt5 XmlPatterns
62 Group:          Libraries
63 %requires_eq_to Qt5Core Qt5Core-devel
64 Requires:       Qt5Network >= %{qtbase_ver}
65 Obsoletes:      qt5-qtxmlpatterns < 5.3.0
66
67 %description -n Qt5XmlPatterns
68 Qt5 XmlPatterns library provides support for XPath, XQuery, XSLT and
69 XML Schema validation.
70
71 %description -n Qt5XmlPatterns -l pl.UTF-8
72 Biblioteka Qt5 XmlPatterns zapewnia obsługę XPath, XQuery, XSLT oraz
73 sprawdzanie poprawności wg XML Schema.
74
75 %package -n Qt5XmlPatterns-devel
76 Summary:        Qt5 XmlPatterns library - development files
77 Summary(pl.UTF-8):      Biblioteka Qt5 XmlPatterns - pliki programistyczne
78 Group:          Development/Libraries
79 Requires:       Qt5Core-devel >= %{qtbase_ver}
80 Requires:       Qt5Network-devel >= %{qtbase_ver}
81 Requires:       Qt5XmlPatterns = %{version}-%{release}
82 Obsoletes:      qt5-qtxmlpatterns-devel < 5.3.0
83
84 %description -n Qt5XmlPatterns-devel
85 Qt5 XmlPatterns library - development files.
86
87 %description -n Qt5XmlPatterns-devel -l pl.UTF-8
88 Biblioteka Qt5 XmlPatterns - pliki programistyczne.
89
90 %package -n Qt5Quick-xmllistmodel
91 Summary:        XmlListModel plugin for Qt5 Quick
92 Summary(pl.UTF-8):      Wtyczka XmlListModel dla Qt5 Quick
93 Group:          X11/Libraries
94 Requires:       Qt5Qml >= %{qtdeclarative_ver}
95 Requires:       Qt5Quick >= %{qtdeclarative_ver}
96 Requires:       Qt5XmlPatterns = %{version}-%{release}
97
98 %description -n Qt5Quick-xmllistmodel
99 XmlListModel plugin for Qt5 Quick provides QML types for creating
100 models from XML data.
101
102 %description -n Qt5Quick-xmllistmodel -l pl.UTF-8
103 Wtyczka XmlListModel dla Qt5 Quick dostarcza typy QML do tworzenia
104 modeli z danych XML.
105
106 %package doc
107 Summary:        Qt5 XmlPatterns documentation in HTML format
108 Summary(pl.UTF-8):      Dokumentacja do biblioteki Qt5 XmlPatterns w formacie HTML
109 Group:          Documentation
110 Requires:       qt5-doc-common >= %{qtbase_ver}
111 BuildArch:      noarch
112
113 %description doc
114 Qt5 XmlPatterns documentation in HTML format.
115
116 %description doc -l pl.UTF-8
117 Dokumentacja do biblioteki Qt5 XmlPatterns w formacie HTML.
118
119 %package doc-qch
120 Summary:        Qt5 XmlPatterns documentation in QCH format
121 Summary(pl.UTF-8):      Dokumentacja do biblioteki Qt5 XmlPatterns w formacie QCH
122 Group:          Documentation
123 Requires:       qt5-doc-common >= %{qtbase_ver}
124 BuildArch:      noarch
125
126 %description doc-qch
127 Qt5 XmlPatterns documentation in QCH format.
128
129 %description doc-qch -l pl.UTF-8
130 Dokumentacja do biblioteki Qt5 XmlPatterns w formacie QCH.
131
132 %package examples
133 Summary:        Qt5 XmlPatterns examples
134 Summary(pl.UTF-8):      Przykłady do biblioteki Qt5 XmlPatterns
135 Group:          X11/Development/Libraries
136 BuildArch:      noarch
137
138 %description examples
139 Qt5 XmlPatterns examples.
140
141 %description examples -l pl.UTF-8
142 Przykłady do biblioteki Qt5 XmlPatterns.
143
144 %prep
145 %setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1}
146
147 %build
148 %{qmake_qt5}
149 %{__make}
150 %{?with_doc:%{__make} docs}
151
152 %if %{with qm}
153 cd qttranslations-everywhere-src-%{version}
154 %{qmake_qt5}
155 %{__make}
156 cd ..
157 %endif
158
159 %install
160 rm -rf $RPM_BUILD_ROOT
161 %{__make} install \
162         INSTALL_ROOT=$RPM_BUILD_ROOT
163
164 %if %{with doc}
165 %{__make} install_docs \
166         INSTALL_ROOT=$RPM_BUILD_ROOT
167 %endif
168
169 %if %{with qm}
170 %{__make} -C qttranslations-everywhere-src-%{version} install \
171         INSTALL_ROOT=$RPM_BUILD_ROOT
172 # keep only qtxmlpatterns
173 %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtconnectivity,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquickcontrols2,qtserialport,qtscript,qtwebengine,qtwebsockets}_*.qm
174 %endif
175
176 # useless symlinks
177 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
178 # actually drop *.la, follow policy of not packaging them when *.pc exist
179 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
180
181 # symlinks in system bin dir
182 install -d $RPM_BUILD_ROOT%{_bindir}
183 cd $RPM_BUILD_ROOT%{_bindir}
184 ln -sf ../%{_lib}/qt5/bin/xmlpatterns xmlpatterns-qt5
185 ln -sf ../%{_lib}/qt5/bin/xmlpatternsvalidator xmlpatternsvalidator-qt5
186 cd -
187
188 # Prepare some files list
189 ifecho() {
190         r="$RPM_BUILD_ROOT$2"
191         if [ -d "$r" ]; then
192                 echo "%%dir $2" >> $1.files
193         elif [ -x "$r" ] ; then
194                 echo "%%attr(755,root,root) $2" >> $1.files
195         elif [ -f "$r" ]; then
196                 echo "$2" >> $1.files
197         else
198                 echo "Error generation $1 files list!"
199                 echo "$r: no such file or directory!"
200                 return 1
201         fi
202 }
203 ifecho_tree() {
204         ifecho $1 $2
205         for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
206                 ifecho $1 $2/$f
207         done
208 }
209
210 echo "%defattr(644,root,root,755)" > examples.files
211 ifecho_tree examples %{_examplesdir}/qt5/xmlpatterns
212
213 # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout
214 find_qt5_qm()
215 {
216         name="$1"
217         find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \
218                 sed -e "s:^$RPM_BUILD_ROOT::" \
219                     -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:'
220 }
221
222 echo '%defattr(644,root,root,755)' > qtxmlpatterns.lang
223 %if %{with qm}
224 find_qt5_qm qtxmlpatterns >> qtxmlpatterns.lang
225 %endif
226
227 %clean
228 rm -rf $RPM_BUILD_ROOT
229
230 %post   -n Qt5XmlPatterns -p /sbin/ldconfig
231 %postun -n Qt5XmlPatterns -p /sbin/ldconfig
232
233 %files -n Qt5XmlPatterns -f qtxmlpatterns.lang
234 %defattr(644,root,root,755)
235 %doc LICENSE.GPL3-EXCEPT dist/changes-*
236 %attr(755,root,root) %{_libdir}/libQt5XmlPatterns.so.*.*.*
237 %attr(755,root,root) %ghost %{_libdir}/libQt5XmlPatterns.so.5
238 %attr(755,root,root) %{_bindir}/xmlpatterns-qt5
239 %attr(755,root,root) %{_bindir}/xmlpatternsvalidator-qt5
240 %attr(755,root,root) %{qt5dir}/bin/xmlpatterns
241 %attr(755,root,root) %{qt5dir}/bin/xmlpatternsvalidator
242
243 %files -n Qt5XmlPatterns-devel
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_libdir}/libQt5XmlPatterns.so
246 %{_libdir}/libQt5XmlPatterns.prl
247 %{_includedir}/qt5/QtXmlPatterns
248 %{_pkgconfigdir}/Qt5XmlPatterns.pc
249 %{_libdir}/cmake/Qt5XmlPatterns
250 %{qt5dir}/mkspecs/modules/qt_lib_xmlpatterns.pri
251 %{qt5dir}/mkspecs/modules/qt_lib_xmlpatterns_private.pri
252
253 %if %{with qml}
254 %files -n Qt5Quick-xmllistmodel
255 %defattr(644,root,root,755)
256 %dir %{qt5dir}/qml/QtQuick/XmlListModel
257 %{qt5dir}/qml/QtQuick/XmlListModel/libqmlxmllistmodelplugin.so
258 %{qt5dir}/qml/QtQuick/XmlListModel/plugins.qmltypes
259 %{qt5dir}/qml/QtQuick/XmlListModel/qmldir
260 %endif
261
262 %if %{with doc}
263 %files doc
264 %defattr(644,root,root,755)
265 %{_docdir}/qt5-doc/qtxmlpatterns
266
267 %files doc-qch
268 %defattr(644,root,root,755)
269 %{_docdir}/qt5-doc/qtxmlpatterns.qch
270 %endif
271
272 %files examples -f examples.files
273 %defattr(644,root,root,755)
274 # XXX: dir shared with qt5-qtbase-examples
275 %dir %{_examplesdir}/qt5
This page took 1.127805 seconds and 3 git commands to generate.