]>
Commit | Line | Data |
---|---|---|
292297cd WF |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
b13c0afe | 4 | %define kdeframever 5.111 |
0da40d70 | 5 | %define qtver 5.15.2 |
d2b99e33 AM |
6 | %define kfname kunitconversion |
7 | # | |
e7a8a14f | 8 | Summary: Converting physical units |
d2b99e33 | 9 | Name: kf5-%{kfname} |
b13c0afe | 10 | Version: 5.111.0 |
e4c06eb8 | 11 | Release: 1 |
e7a8a14f WF |
12 | License: LGPL v2.1+ |
13 | Group: X11/Libraries | |
22fb2fde | 14 | Source0: https://download.kde.org/stable/frameworks/%{kdeframever}/%{kfname}-%{version}.tar.xz |
b13c0afe | 15 | # Source0-md5: e54094a416a8cc901b4e562986808e89 |
e7a8a14f WF |
16 | URL: http://www.kde.org/ |
17 | BuildRequires: Qt5Core-devel | |
18 | BuildRequires: Qt5Network-devel | |
19 | BuildRequires: Qt5Test-devel | |
20 | BuildRequires: Qt5Xml-devel | |
1920837b | 21 | BuildRequires: cmake >= 3.16 |
e7a8a14f | 22 | BuildRequires: gettext-devel |
575a0880 | 23 | BuildRequires: kf5-extra-cmake-modules >= %{version} |
e7a8a14f | 24 | BuildRequires: kf5-ki18n-devel >= %{version} |
ce749f3a | 25 | BuildRequires: ninja |
e7a8a14f | 26 | BuildRequires: rpmbuild(macros) >= 1.164 |
90ec08f8 ER |
27 | BuildRequires: tar >= 1:1.22 |
28 | BuildRequires: xz | |
95168df5 | 29 | Requires: kf5-dirs |
e7a8a14f WF |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %define qt5dir %{_libdir}/qt5 | |
33 | ||
34 | %description | |
35 | KUnitConversion provides functions to convert values in different | |
36 | physical units. It supports converting different prefixes (e.g. kilo, | |
37 | mega, giga) as well as converting between different unit systems (e.g. | |
38 | liters, gallons). The following areas are supported: | |
39 | ||
40 | - Acceleration | |
41 | - Angle | |
42 | - Area | |
43 | - Currency | |
44 | - Density | |
45 | - Energy | |
46 | - Force | |
47 | - Frequency | |
48 | - Fuel efficiency | |
49 | - Length | |
50 | - Mass | |
51 | - Power | |
52 | - Pressure | |
53 | - Temperature | |
54 | - Time | |
55 | - Velocity | |
56 | - Volume | |
57 | ||
58 | %package devel | |
d2b99e33 AM |
59 | Summary: Header files for %{kfname} development |
60 | Summary(pl.UTF-8): Pliki nagłówkowe dla programistów używających %{kfname} | |
e7a8a14f WF |
61 | Group: X11/Development/Libraries |
62 | Requires: %{name} = %{version}-%{release} | |
63 | ||
64 | %description devel | |
d2b99e33 | 65 | Header files for %{kfname} development. |
e7a8a14f WF |
66 | |
67 | %description devel -l pl.UTF-8 | |
d2b99e33 | 68 | Pliki nagłówkowe dla programistów używających %{kfname}. |
e7a8a14f WF |
69 | |
70 | %prep | |
d2b99e33 | 71 | %setup -q -n %{kfname}-%{version} |
e7a8a14f WF |
72 | |
73 | %build | |
1920837b WF |
74 | %cmake -B build \ |
75 | -G Ninja \ | |
292297cd | 76 | %{!?with_tests:-DBUILD_TESTING=OFF} \ |
1920837b WF |
77 | -DKDE_INSTALL_USE_QT_SYS_PATHS=ON |
78 | ||
79 | %ninja_build -C build | |
e7a8a14f | 80 | |
292297cd | 81 | %if %{with tests} |
1920837b | 82 | %ninja_build -C build test |
292297cd WF |
83 | %endif |
84 | ||
85 | ||
e7a8a14f WF |
86 | %install |
87 | rm -rf $RPM_BUILD_ROOT | |
ce749f3a | 88 | %ninja_install -C build |
e7a8a14f | 89 | |
d2b99e33 | 90 | %find_lang %{kfname}5 |
e7a8a14f WF |
91 | |
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %post -p /sbin/ldconfig | |
96 | %postun -p /sbin/ldconfig | |
97 | ||
d2b99e33 | 98 | %files -f %{kfname}5.lang |
e7a8a14f WF |
99 | %defattr(644,root,root,755) |
100 | %doc README.md | |
0ceb1080 | 101 | %ghost %{_libdir}/libKF5UnitConversion.so.5 |
d2b99e33 | 102 | %attr(755,root,root) %{_libdir}/libKF5UnitConversion.so.*.*.* |
4008ce09 | 103 | %{_datadir}/qlogging-categories5/kunitconversion.categories |
e7a8a14f WF |
104 | |
105 | %files devel | |
106 | %defattr(644,root,root,755) | |
107 | %{_includedir}/KF5/KUnitConversion | |
e7a8a14f | 108 | %{_libdir}/cmake/KF5UnitConversion |
0ceb1080 | 109 | %{_libdir}/libKF5UnitConversion.so |
e7a8a14f | 110 | %{qt5dir}/mkspecs/modules/qt_KUnitConversion.pri |