]> git.pld-linux.org Git - packages/qt5-qtxmlpatterns.git/blob - qt5-qtxmlpatterns.spec
add qml bcond for XmlListModel (requires Qt5Qml)
[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     # requires Qt5Qml module
6
7 %define         orgname         qtxmlpatterns
8 %define         qtbase_ver      %{version}
9 %define         qttools_ver     5.8
10 Summary:        The Qt5 XmlPatterns library
11 Summary(pl.UTF-8):      Biblioteka Qt5 XmlPatterns
12 Name:           qt5-%{orgname}
13 Version:        5.14.2
14 Release:        1
15 License:        LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0
16 Group:          Libraries
17 Source0:        http://download.qt.io/official_releases/qt/5.14/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz
18 # Source0-md5:  10fa480c2066f9305a4000d0f5d966a3
19 Source1:        http://download.qt.io/official_releases/qt/5.14/%{version}/submodules/qttranslations-everywhere-src-%{version}.tar.xz
20 # Source1-md5:  bcf8b00e49f4fe4271ff4651bf32aca8
21 URL:            http://www.qt.io/
22 BuildRequires:  OpenGL-devel
23 BuildRequires:  Qt5Core-devel >= %{qtbase_ver}
24 BuildRequires:  Qt5Gui-devel >= %{qtbase_ver}
25 BuildRequires:  Qt5Network-devel >= %{qtbase_ver}
26 %{?with_qml:BuildRequires:      Qt5Qml-devel >= %{qtbase_ver}}
27 BuildRequires:  Qt5Widgets-devel >= %{qtbase_ver}
28 %if %{with doc}
29 BuildRequires:  qt5-assistant >= %{qttools_ver}
30 %endif
31 BuildRequires:  qt5-build >= %{qtbase_ver}
32 %{?with_qm:BuildRequires:       qt5-linguist >= %{qttools_ver}}
33 BuildRequires:  qt5-qmake >= %{qtbase_ver}
34 BuildRequires:  rpmbuild(macros) >= 1.654
35 BuildRequires:  tar >= 1:1.22
36 BuildRequires:  xz
37 Obsoletes:      Qt5Quick-xmllistmodel < 5.12.1
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
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
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 doc
90 Summary:        Qt5 XmlPatterns documentation in HTML format
91 Summary(pl.UTF-8):      Dokumentacja do biblioteki Qt5 XmlPatterns w formacie HTML
92 Group:          Documentation
93 Requires:       qt5-doc-common >= %{qtbase_ver}
94 %if "%{_rpmversion}" >= "5"
95 BuildArch:      noarch
96 %endif
97
98 %description doc
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.
118
119 %package examples
120 Summary:        Qt5 XmlPatterns examples
121 Summary(pl.UTF-8):      Przykłady do biblioteki Qt5 XmlPatterns
122 Group:          X11/Development/Libraries
123 %if "%{_rpmversion}" >= "5"
124 BuildArch:      noarch
125 %endif
126
127 %description examples
128 Qt5 XmlPatterns examples.
129
130 %description examples -l pl.UTF-8
131 Przykłady do biblioteki Qt5 XmlPatterns.
132
133 %prep
134 %setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1}
135
136 %build
137 qmake-qt5
138 %{__make}
139 %{?with_doc:%{__make} docs}
140
141 %if %{with qm}
142 cd qttranslations-everywhere-src-%{version}
143 qmake-qt5
144 %{__make}
145 cd ..
146 %endif
147
148 %install
149 rm -rf $RPM_BUILD_ROOT
150 %{__make} install \
151         INSTALL_ROOT=$RPM_BUILD_ROOT
152
153 %if %{with doc}
154 %{__make} install_docs \
155         INSTALL_ROOT=$RPM_BUILD_ROOT
156 %endif
157
158 %if %{with qm}
159 %{__make} -C qttranslations-everywhere-src-%{version} install \
160         INSTALL_ROOT=$RPM_BUILD_ROOT
161 # keep only qtxmlpatterns
162 %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtconnectivity,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquickcontrols2,qtserialport,qtscript,qtwebengine,qtwebsockets}_*.qm
163 %endif
164
165 # useless symlinks
166 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
167 # actually drop *.la, follow policy of not packaging them when *.pc exist
168 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
169
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
177 # Prepare some files list
178 ifecho() {
179         r="$RPM_BUILD_ROOT$2"
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 }
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 }
198
199 echo "%defattr(644,root,root,755)" > examples.files
200 ifecho_tree examples %{_examplesdir}/qt5/xmlpatterns
201
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
216 %clean
217 rm -rf $RPM_BUILD_ROOT
218
219 %post   -n Qt5XmlPatterns -p /sbin/ldconfig
220 %postun -n Qt5XmlPatterns -p /sbin/ldconfig
221
222 %files -n Qt5XmlPatterns -f qtxmlpatterns.lang
223 %defattr(644,root,root,755)
224 %doc LICENSE.GPL3-EXCEPT dist/changes-*
225 %attr(755,root,root) %{_libdir}/libQt5XmlPatterns.so.*.*.*
226 %attr(755,root,root) %ghost %{_libdir}/libQt5XmlPatterns.so.5
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
231
232 %if %{with qml}
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
237 %endif
238
239 %files -n Qt5XmlPatterns-devel
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_libdir}/libQt5XmlPatterns.so
242 %{_libdir}/libQt5XmlPatterns.prl
243 %{_includedir}/qt5/QtXmlPatterns
244 %{_pkgconfigdir}/Qt5XmlPatterns.pc
245 %{_libdir}/cmake/Qt5XmlPatterns
246 %{qt5dir}/mkspecs/modules/qt_lib_xmlpatterns.pri
247 %{qt5dir}/mkspecs/modules/qt_lib_xmlpatterns_private.pri
248
249 %if %{with doc}
250 %files doc
251 %defattr(644,root,root,755)
252 %{_docdir}/qt5-doc/qtxmlpatterns
253
254 %files doc-qch
255 %defattr(644,root,root,755)
256 %{_docdir}/qt5-doc/qtxmlpatterns.qch
257 %endif
258
259 %files examples -f examples.files
260 %defattr(644,root,root,755)
261 # XXX: dir shared with qt5-qtbase-examples
262 %dir %{_examplesdir}/qt5
This page took 0.073831 seconds and 3 git commands to generate.