]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without doc # Documentation | |
4 | ||
5 | %define orgname qtcharts | |
6 | %define qtbase_ver %{version} | |
7 | %define qtdeclarative_ver %{version} | |
8 | %define qttools_ver %{version} | |
9 | Summary: The Qt5 Charts library | |
10 | Summary(pl.UTF-8): Biblioteka Qt5 Charts | |
11 | Name: qt5-%{orgname} | |
12 | Version: 5.15.7 | |
13 | Release: 1 | |
14 | License: GPL v3 or commercial | |
15 | Group: Libraries | |
16 | Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz | |
17 | # Source0-md5: d69820d04951ac727f11324b91244a62 | |
18 | URL: https://www.qt.io/ | |
19 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} | |
20 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} | |
21 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
22 | BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
23 | BuildRequires: Qt5Widgets-devel >= %{qtbase_ver} | |
24 | %if %{with doc} | |
25 | BuildRequires: qt5-assistant >= %{qttools_ver} | |
26 | %endif | |
27 | BuildRequires: qt5-build >= %{qtbase_ver} | |
28 | BuildRequires: qt5-qmake >= %{qtbase_ver} | |
29 | BuildRequires: rpm-build >= 4.6 | |
30 | BuildRequires: rpmbuild(macros) >= 2.016 | |
31 | BuildRequires: tar >= 1:1.22 | |
32 | BuildRequires: xz | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %define specflags -fno-strict-aliasing | |
36 | %define qt5dir %{_libdir}/qt5 | |
37 | ||
38 | %description | |
39 | Qt is a cross-platform application and UI framework. Using Qt, you can | |
40 | write web-enabled applications once and deploy them across desktop, | |
41 | mobile and embedded systems without rewriting the source code. | |
42 | ||
43 | This package contains Qt5 Charts library. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
47 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
48 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
49 | źródłowego. | |
50 | ||
51 | Ten pakiet zawiera bibliotekę Qt5 Charts. | |
52 | ||
53 | %package -n Qt5Charts | |
54 | Summary: The Qt5 Charts library | |
55 | Summary(pl.UTF-8): Biblioteka Qt5 Charts | |
56 | Group: Libraries | |
57 | Requires: Qt5Core >= %{qtbase_ver} | |
58 | Requires: Qt5Gui >= %{qtbase_ver} | |
59 | Requires: Qt5Widgets >= %{qtbase_ver} | |
60 | # for qml module | |
61 | Requires: Qt5Qml >= %{qtdeclarative_ver} | |
62 | Requires: Qt5Quick >= %{qtdeclarative_ver} | |
63 | ||
64 | %description -n Qt5Charts | |
65 | Qt Charts module provides a set of easy to use chart components. It | |
66 | uses the Qt Graphics View Framework, therefore charts can be easily | |
67 | integrated to modern user interfaces. | |
68 | ||
69 | %description -n Qt5Charts -l pl.UTF-8 | |
70 | Biblioteka Qt5 Charts udostępnia łatwe w użyciu komponenty do | |
71 | tworzenia wykresów. Wykorzystuje szkielet Qt Graphics View, dzięki | |
72 | czemu wykresy mogą być łatwo integrowane z nowoczesnymi interfejsami | |
73 | użytkownika. | |
74 | ||
75 | %package -n Qt5Charts-devel | |
76 | Summary: Qt5 Charts library - development files | |
77 | Summary(pl.UTF-8): Biblioteka Qt5 Charts - pliki programistyczne | |
78 | Group: Development/Libraries | |
79 | Requires: Qt5Charts = %{version}-%{release} | |
80 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
81 | Requires: Qt5Gui-devel >= %{qtbase_ver} | |
82 | Requires: Qt5Widgets-devel >= %{qtbase_ver} | |
83 | ||
84 | %description -n Qt5Charts-devel | |
85 | Qt5 Charts library - development files. | |
86 | ||
87 | %description -n Qt5Charts-devel -l pl.UTF-8 | |
88 | Biblioteka Qt5 Charts - pliki programistyczne. | |
89 | ||
90 | %package doc | |
91 | Summary: Qt5 Charts documentation in HTML format | |
92 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Charts w formacie HTML | |
93 | Group: Documentation | |
94 | Requires: qt5-doc-common >= %{qtbase_ver} | |
95 | BuildArch: noarch | |
96 | ||
97 | %description doc | |
98 | Qt5 Charts documentation in HTML format. | |
99 | ||
100 | %description doc -l pl.UTF-8 | |
101 | Dokumentacja do biblioteki Qt5 Charts w formacie HTML. | |
102 | ||
103 | %package doc-qch | |
104 | Summary: Qt5 Charts documentation in QCH format | |
105 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Charts w formacie QCH | |
106 | Group: Documentation | |
107 | Requires: qt5-doc-common >= %{qtbase_ver} | |
108 | BuildArch: noarch | |
109 | ||
110 | %description doc-qch | |
111 | Qt5 Charts documentation in QCH format. | |
112 | ||
113 | %description doc-qch -l pl.UTF-8 | |
114 | Dokumentacja do biblioteki Qt5 Charts w formacie QCH. | |
115 | ||
116 | %package examples | |
117 | Summary: Qt5 Charts examples | |
118 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 Charts | |
119 | Group: Development/Libraries | |
120 | BuildArch: noarch | |
121 | ||
122 | %description examples | |
123 | Qt5 Charts examples. | |
124 | ||
125 | %description examples -l pl.UTF-8 | |
126 | Przykłady do biblioteki Qt5 Charts. | |
127 | ||
128 | %prep | |
129 | %setup -q -n %{orgname}-everywhere-src-%{version} | |
130 | ||
131 | %build | |
132 | %{qmake_qt5} | |
133 | %{__make} | |
134 | %{?with_doc:%{__make} docs} | |
135 | ||
136 | %install | |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
139 | %{__make} install \ | |
140 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
141 | ||
142 | %if %{with doc} | |
143 | %{__make} install_docs \ | |
144 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
145 | %endif | |
146 | ||
147 | # useless symlinks | |
148 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?? | |
149 | # actually drop *.la, follow policy of not packaging them when *.pc exist | |
150 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
151 | ||
152 | # Prepare some files list | |
153 | ifecho() { | |
154 | r="$RPM_BUILD_ROOT$2" | |
155 | if [ -d "$r" ]; then | |
156 | echo "%%dir $2" >> $1.files | |
157 | elif [ -x "$r" ] ; then | |
158 | echo "%%attr(755,root,root) $2" >> $1.files | |
159 | elif [ -f "$r" ]; then | |
160 | echo "$2" >> $1.files | |
161 | else | |
162 | echo "Error generation $1 files list!" | |
163 | echo "$r: no such file or directory!" | |
164 | return 1 | |
165 | fi | |
166 | } | |
167 | ifecho_tree() { | |
168 | ifecho $1 $2 | |
169 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
170 | ifecho $1 $2/$f | |
171 | done | |
172 | } | |
173 | ||
174 | echo "%defattr(644,root,root,755)" > examples.files | |
175 | ifecho_tree examples %{_examplesdir}/qt5/charts | |
176 | ||
177 | %clean | |
178 | rm -rf $RPM_BUILD_ROOT | |
179 | ||
180 | %post -n Qt5Charts -p /sbin/ldconfig | |
181 | %postun -n Qt5Charts -p /sbin/ldconfig | |
182 | ||
183 | %files -n Qt5Charts | |
184 | %defattr(644,root,root,755) | |
185 | %doc LICENSE.GPL3 dist/changes-* | |
186 | # R: Core Gui Widgets | |
187 | %attr(755,root,root) %{_libdir}/libQt5Charts.so.*.*.* | |
188 | %attr(755,root,root) %ghost %{_libdir}/libQt5Charts.so.5 | |
189 | %dir %{qt5dir}/qml/QtCharts | |
190 | %{qt5dir}/qml/QtCharts/designer | |
191 | # R: Core Gui Qml Quick Widgets | |
192 | %attr(755,root,root) %{qt5dir}/qml/QtCharts/libqtchartsqml2.so | |
193 | %{qt5dir}/qml/QtCharts/plugins.qmltypes | |
194 | %{qt5dir}/qml/QtCharts/qmldir | |
195 | ||
196 | %files -n Qt5Charts-devel | |
197 | %defattr(644,root,root,755) | |
198 | %attr(755,root,root) %{_libdir}/libQt5Charts.so | |
199 | %{_libdir}/libQt5Charts.prl | |
200 | %{_includedir}/qt5/QtCharts | |
201 | %{_pkgconfigdir}/Qt5Charts.pc | |
202 | %{_libdir}/cmake/Qt5Charts | |
203 | %{qt5dir}/mkspecs/modules/qt_lib_charts.pri | |
204 | %{qt5dir}/mkspecs/modules/qt_lib_charts_private.pri | |
205 | ||
206 | %if %{with doc} | |
207 | %files doc | |
208 | %defattr(644,root,root,755) | |
209 | %{_docdir}/qt5-doc/qtcharts | |
210 | ||
211 | %files doc-qch | |
212 | %defattr(644,root,root,755) | |
213 | %{_docdir}/qt5-doc/qtcharts.qch | |
214 | %endif | |
215 | ||
216 | %files examples -f examples.files | |
217 | %defattr(644,root,root,755) | |
218 | # XXX: dir shared with qt5-qtbase-examples | |
219 | %dir %{_examplesdir}/qt5 |