]> git.pld-linux.org Git - packages/qt5-qtxmlpatterns.git/blob - qt5-qtxmlpatterns.spec
- unconditional noarch subpackages
[packages/qt5-qtxmlpatterns.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.2
15 Release:        3
16 License:        LGPL v3 or GPL v2 or GPL v3 or commercial
17 Group:          Libraries
18 Source0:        http://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz
19 # Source0-md5:  ef96631d72399cfa495f223ef21bb039
20 Source1:        http://download.qt.io/official_releases/qt/5.15/%{version}/submodules/qttranslations-everywhere-src-%{version}.tar.xz
21 # Source1-md5:  9b66cdb64402e8fd9e843f8a7120abb1
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:  rpmbuild(macros) >= 1.752
36 BuildRequires:  tar >= 1:1.22
37 BuildRequires:  xz
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         specflags       -fno-strict-aliasing
41 %define         qt5dir          %{_libdir}/qt5
42
43 %description
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}
63 Requires:       Qt5Network >= %{qtbase_ver}
64 Obsoletes:      qt5-qtxmlpatterns < 5.3.0
65
66 %description -n Qt5XmlPatterns
67 Qt5 XmlPatterns library provides support for XPath, XQuery, XSLT and
68 XML Schema validation.
69
70 %description -n Qt5XmlPatterns -l pl.UTF-8
71 Biblioteka Qt5 XmlPatterns zapewnia obsługę XPath, XQuery, XSLT oraz
72 sprawdzanie poprawności wg XML Schema.
73
74 %package -n Qt5XmlPatterns-devel
75 Summary:        Qt5 XmlPatterns library - development files
76 Summary(pl.UTF-8):      Biblioteka Qt5 XmlPatterns - pliki programistyczne
77 Group:          Development/Libraries
78 Requires:       Qt5Core-devel >= %{qtbase_ver}
79 Requires:       Qt5Network-devel >= %{qtbase_ver}
80 Requires:       Qt5XmlPatterns = %{version}-%{release}
81 Obsoletes:      qt5-qtxmlpatterns-devel < 5.3.0
82
83 %description -n Qt5XmlPatterns-devel
84 Qt5 XmlPatterns library - development files.
85
86 %description -n Qt5XmlPatterns-devel -l pl.UTF-8
87 Biblioteka Qt5 XmlPatterns - pliki programistyczne.
88
89 %package -n Qt5Quick-xmllistmodel
90 Summary:        XmlListModel plugin for Qt5 Quick
91 Summary(pl.UTF-8):      Wtyczka XmlListModel dla Qt5 Quick
92 Group:          X11/Libraries
93 Requires:       Qt5Qml >= %{qtdeclarative_ver}
94 Requires:       Qt5Quick >= %{qtdeclarative_ver}
95 Requires:       Qt5XmlPatterns = %{version}-%{release}
96
97 %description -n Qt5Quick-xmllistmodel
98 XmlListModel plugin for Qt5 Quick provides QML types for creating
99 models from XML data.
100
101 %description -n Qt5Quick-xmllistmodel -l pl.UTF-8
102 Wtyczka XmlListModel dla Qt5 Quick dostarcza typy QML do tworzenia
103 modeli z danych XML.
104
105 %package doc
106 Summary:        Qt5 XmlPatterns documentation in HTML format
107 Summary(pl.UTF-8):      Dokumentacja do biblioteki Qt5 XmlPatterns w formacie HTML
108 Group:          Documentation
109 Requires:       qt5-doc-common >= %{qtbase_ver}
110 BuildArch:      noarch
111
112 %description doc
113 Qt5 XmlPatterns documentation in HTML format.
114
115 %description doc -l pl.UTF-8
116 Dokumentacja do biblioteki Qt5 XmlPatterns w formacie HTML.
117
118 %package doc-qch
119 Summary:        Qt5 XmlPatterns documentation in QCH format
120 Summary(pl.UTF-8):      Dokumentacja do biblioteki Qt5 XmlPatterns w formacie QCH
121 Group:          Documentation
122 Requires:       qt5-doc-common >= %{qtbase_ver}
123 BuildArch:      noarch
124
125 %description doc-qch
126 Qt5 XmlPatterns documentation in QCH format.
127
128 %description doc-qch -l pl.UTF-8
129 Dokumentacja do biblioteki Qt5 XmlPatterns w formacie QCH.
130
131 %package examples
132 Summary:        Qt5 XmlPatterns examples
133 Summary(pl.UTF-8):      Przykłady do biblioteki Qt5 XmlPatterns
134 Group:          X11/Development/Libraries
135 BuildArch:      noarch
136
137 %description examples
138 Qt5 XmlPatterns examples.
139
140 %description examples -l pl.UTF-8
141 Przykłady do biblioteki Qt5 XmlPatterns.
142
143 %prep
144 %setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1}
145
146 %build
147 qmake-qt5
148 %{__make}
149 %{?with_doc:%{__make} docs}
150
151 %if %{with qm}
152 cd qttranslations-everywhere-src-%{version}
153 qmake-qt5
154 %{__make}
155 cd ..
156 %endif
157
158 %install
159 rm -rf $RPM_BUILD_ROOT
160 %{__make} install \
161         INSTALL_ROOT=$RPM_BUILD_ROOT
162
163 %if %{with doc}
164 %{__make} install_docs \
165         INSTALL_ROOT=$RPM_BUILD_ROOT
166 %endif
167
168 %if %{with qm}
169 %{__make} -C qttranslations-everywhere-src-%{version} install \
170         INSTALL_ROOT=$RPM_BUILD_ROOT
171 # keep only qtxmlpatterns
172 %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtconnectivity,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquickcontrols2,qtserialport,qtscript,qtwebengine,qtwebsockets}_*.qm
173 %endif
174
175 # useless symlinks
176 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
177 # actually drop *.la, follow policy of not packaging them when *.pc exist
178 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
179
180 # symlinks in system bin dir
181 install -d $RPM_BUILD_ROOT%{_bindir}
182 cd $RPM_BUILD_ROOT%{_bindir}
183 ln -sf ../%{_lib}/qt5/bin/xmlpatterns xmlpatterns-qt5
184 ln -sf ../%{_lib}/qt5/bin/xmlpatternsvalidator xmlpatternsvalidator-qt5
185 cd -
186
187 # Prepare some files list
188 ifecho() {
189         r="$RPM_BUILD_ROOT$2"
190         if [ -d "$r" ]; then
191                 echo "%%dir $2" >> $1.files
192         elif [ -x "$r" ] ; then
193                 echo "%%attr(755,root,root) $2" >> $1.files
194         elif [ -f "$r" ]; then
195                 echo "$2" >> $1.files
196         else
197                 echo "Error generation $1 files list!"
198                 echo "$r: no such file or directory!"
199                 return 1
200         fi
201 }
202 ifecho_tree() {
203         ifecho $1 $2
204         for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
205                 ifecho $1 $2/$f
206         done
207 }
208
209 echo "%defattr(644,root,root,755)" > examples.files
210 ifecho_tree examples %{_examplesdir}/qt5/xmlpatterns
211
212 # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout
213 find_qt5_qm()
214 {
215         name="$1"
216         find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \
217                 sed -e "s:^$RPM_BUILD_ROOT::" \
218                     -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:'
219 }
220
221 echo '%defattr(644,root,root,755)' > qtxmlpatterns.lang
222 %if %{with qm}
223 find_qt5_qm qtxmlpatterns >> qtxmlpatterns.lang
224 %endif
225
226 %clean
227 rm -rf $RPM_BUILD_ROOT
228
229 %post   -n Qt5XmlPatterns -p /sbin/ldconfig
230 %postun -n Qt5XmlPatterns -p /sbin/ldconfig
231
232 %files -n Qt5XmlPatterns -f qtxmlpatterns.lang
233 %defattr(644,root,root,755)
234 %doc LICENSE.GPL3-EXCEPT dist/changes-*
235 %attr(755,root,root) %{_libdir}/libQt5XmlPatterns.so.*.*.*
236 %attr(755,root,root) %ghost %{_libdir}/libQt5XmlPatterns.so.5
237 %attr(755,root,root) %{_bindir}/xmlpatterns-qt5
238 %attr(755,root,root) %{_bindir}/xmlpatternsvalidator-qt5
239 %attr(755,root,root) %{qt5dir}/bin/xmlpatterns
240 %attr(755,root,root) %{qt5dir}/bin/xmlpatternsvalidator
241
242 %files -n Qt5XmlPatterns-devel
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_libdir}/libQt5XmlPatterns.so
245 %{_libdir}/libQt5XmlPatterns.prl
246 %{_includedir}/qt5/QtXmlPatterns
247 %{_pkgconfigdir}/Qt5XmlPatterns.pc
248 %{_libdir}/cmake/Qt5XmlPatterns
249 %{qt5dir}/mkspecs/modules/qt_lib_xmlpatterns.pri
250 %{qt5dir}/mkspecs/modules/qt_lib_xmlpatterns_private.pri
251
252 %if %{with qml}
253 %files -n Qt5Quick-xmllistmodel
254 %defattr(644,root,root,755)
255 %dir %{qt5dir}/qml/QtQuick/XmlListModel
256 %{qt5dir}/qml/QtQuick/XmlListModel/libqmlxmllistmodelplugin.so
257 %{qt5dir}/qml/QtQuick/XmlListModel/plugins.qmltypes
258 %{qt5dir}/qml/QtQuick/XmlListModel/qmldir
259 %endif
260
261 %if %{with doc}
262 %files doc
263 %defattr(644,root,root,755)
264 %{_docdir}/qt5-doc/qtxmlpatterns
265
266 %files doc-qch
267 %defattr(644,root,root,755)
268 %{_docdir}/qt5-doc/qtxmlpatterns.qch
269 %endif
270
271 %files examples -f examples.files
272 %defattr(644,root,root,755)
273 # XXX: dir shared with qt5-qtbase-examples
274 %dir %{_examplesdir}/qt5
This page took 0.082216 seconds and 3 git commands to generate.