]>
Commit | Line | Data |
---|---|---|
c488ff4a WF |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
3d76d2ac | 4 | %define kdeframever 5.110 |
939e2741 | 5 | %define qtver 5.15.2 |
3ff049dd AM |
6 | %define kfname kplotting |
7 | # | |
8b0a37c1 | 8 | Summary: Data plotting |
3ff049dd | 9 | Name: kf5-%{kfname} |
3d76d2ac | 10 | Version: 5.110.0 |
44b5cc19 | 11 | Release: 1 |
8b0a37c1 WF |
12 | License: LGPL v2.1+ |
13 | Group: X11/Libraries | |
f4e420a1 | 14 | Source0: https://download.kde.org/stable/frameworks/%{kdeframever}/%{kfname}-%{version}.tar.xz |
3d76d2ac | 15 | # Source0-md5: 8d014342611f0d2a50af3886b83f2e66 |
8b0a37c1 WF |
16 | URL: http://www.kde.org/ |
17 | BuildRequires: Qt5Core-devel | |
18 | BuildRequires: Qt5Gui-devel >= 5.3.1 | |
19 | BuildRequires: Qt5Test-devel | |
20 | BuildRequires: Qt5Widgets-devel | |
38c35ab3 | 21 | BuildRequires: cmake >= 3.16 |
736bc920 | 22 | BuildRequires: kf5-extra-cmake-modules >= %{version} |
78b8e080 | 23 | BuildRequires: ninja |
8b0a37c1 | 24 | BuildRequires: rpmbuild(macros) >= 1.164 |
cdba659b ER |
25 | BuildRequires: tar >= 1:1.22 |
26 | BuildRequires: xz | |
dd2c4685 | 27 | Requires: kf5-dirs |
8b0a37c1 WF |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %define qt5dir %{_libdir}/qt5 | |
31 | ||
32 | %description | |
33 | KPlotWidget is a QWidget-derived class that provides a virtual base | |
34 | class for easy data-plotting. The idea behind KPlotWidget is that you | |
35 | only have to specify information in "data units"; i.e., the natural | |
36 | units of the data being plotted. KPlotWidget automatically converts | |
37 | everything to screen pixel units. | |
38 | ||
39 | KPlotWidget draws X and Y axes with tick marks and tick labels. It | |
40 | automatically determines how many tick marks to use and where they | |
41 | should be, based on the data limits specified for the plot. You change | |
42 | the limits by calling `setLimits(double x1, double x2, double y1, | |
43 | double y2)`. | |
44 | ||
45 | Data to be plotted are stored using the KPlotObject class. KPlotObject | |
46 | consists of a QList of QPointF's, each specifying the X,Y coordinates | |
47 | of a data point. KPlotObject also specifies the "type" of data to be | |
48 | plotted (POINTS or CURVE or POLYGON or LABEL). | |
49 | ||
50 | %package devel | |
3ff049dd AM |
51 | Summary: Header files for %{kfname} development |
52 | Summary(pl.UTF-8): Pliki nagłówkowe dla programistów używających %{kfname} | |
8b0a37c1 WF |
53 | Group: X11/Development/Libraries |
54 | Requires: %{name} = %{version}-%{release} | |
55 | ||
56 | %description devel | |
3ff049dd | 57 | Header files for %{kfname} development. |
8b0a37c1 WF |
58 | |
59 | %description devel -l pl.UTF-8 | |
3ff049dd | 60 | Pliki nagłówkowe dla programistów używających %{kfname}. |
8b0a37c1 WF |
61 | |
62 | %prep | |
3ff049dd | 63 | %setup -q -n %{kfname}-%{version} |
8b0a37c1 WF |
64 | |
65 | %build | |
38c35ab3 WF |
66 | %cmake -B build \ |
67 | -G Ninja \ | |
c488ff4a | 68 | %{!?with_tests:-DBUILD_TESTING=OFF} \ |
38c35ab3 WF |
69 | -DKDE_INSTALL_USE_QT_SYS_PATHS=ON |
70 | ||
71 | %ninja_build -C build | |
8b0a37c1 | 72 | |
c488ff4a | 73 | %if %{with tests} |
38c35ab3 | 74 | %ninja_build -C build test |
c488ff4a WF |
75 | %endif |
76 | ||
77 | ||
8b0a37c1 WF |
78 | %install |
79 | rm -rf $RPM_BUILD_ROOT | |
78b8e080 | 80 | %ninja_install -C build |
8b0a37c1 WF |
81 | |
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %post -p /sbin/ldconfig | |
86 | %postun -p /sbin/ldconfig | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
90 | %doc README.md | |
f892a6ab | 91 | %ghost %{_libdir}/libKF5Plotting.so.5 |
3ff049dd | 92 | %attr(755,root,root) %{_libdir}/libKF5Plotting.so.*.** |
ffc7542d | 93 | %attr(755,root,root) %{qt5dir}/plugins/designer/kplotting5widgets.so |
8b0a37c1 WF |
94 | |
95 | %files devel | |
96 | %defattr(644,root,root,755) | |
97 | %{_includedir}/KF5/KPlotting | |
8b0a37c1 | 98 | %{_libdir}/cmake/KF5Plotting |
f892a6ab | 99 | %{_libdir}/libKF5Plotting.so |
8b0a37c1 | 100 | %{qt5dir}/mkspecs/modules/qt_KPlotting.pri |