]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
4 | ||
5 | # TODO: | |
6 | # - runtime Requires if any | |
7 | ||
8 | %define kdeframever 5.104 | |
9 | %define qtver 5.15.2 | |
10 | %define kfname kcoreaddons | |
11 | Summary: Utilities for core application functionality and accessing the OS | |
12 | Name: kf5-%{kfname} | |
13 | Version: 5.104.0 | |
14 | Release: 1 | |
15 | License: GPL v2+/LGPL v2.1+ | |
16 | Group: X11/Libraries | |
17 | Source0: https://download.kde.org/stable/frameworks/%{kdeframever}/%{kfname}-%{version}.tar.xz | |
18 | # Source0-md5: f4d7eada5ad9a503e213457dffa7c576 | |
19 | Patch0: flaky-tests.patch | |
20 | URL: http://www.kde.org/ | |
21 | BuildRequires: Qt5Core-devel >= %{qtver} | |
22 | %if %{with tests} | |
23 | BuildRequires: Qt5Test-devel >= %{qtver} | |
24 | BuildRequires: Qt5Widgets-devel >= %{qtver} | |
25 | %endif | |
26 | BuildRequires: cmake >= 3.16 | |
27 | BuildRequires: kf5-extra-cmake-modules >= %{version} | |
28 | BuildRequires: ninja | |
29 | BuildRequires: qt5-linguist >= %{qtver} | |
30 | BuildRequires: rpmbuild(macros) >= 1.736 | |
31 | BuildRequires: shared-mime-info >= 1.3 | |
32 | BuildRequires: tar >= 1:1.22 | |
33 | BuildRequires: xz | |
34 | Requires: Qt5Core >= %{qtver} | |
35 | Requires: kf5-dirs | |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
37 | ||
38 | %description | |
39 | KCoreAddons provides classes built on top of QtCore to perform various | |
40 | tasks such as manipulating mime types, autosaving files, creating | |
41 | backup files, generating random sequences, performing text | |
42 | manipulations such as macro replacement, accessing user information | |
43 | and many more. | |
44 | ||
45 | %package devel | |
46 | Summary: Header files for %{kfname} development | |
47 | Summary(pl.UTF-8): Pliki nagłówkowe dla programistów używających %{kfname} | |
48 | Group: X11/Development/Libraries | |
49 | Requires: %{name} = %{version}-%{release} | |
50 | Requires: Qt5Core >= %{qtver} | |
51 | Requires: cmake >= 3.16 | |
52 | ||
53 | %description devel | |
54 | Header files for %{kfname} development. | |
55 | ||
56 | %description devel -l pl.UTF-8 | |
57 | Pliki nagłówkowe dla programistów używających %{kfname}. | |
58 | ||
59 | %prep | |
60 | %setup -q -n %{kfname}-%{version} | |
61 | #%patch0 -p1 | |
62 | ||
63 | %build | |
64 | install -d build | |
65 | cd build | |
66 | %cmake -G Ninja \ | |
67 | %{!?with_tests:-DBUILD_TESTING=OFF} \ | |
68 | -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ | |
69 | ../ | |
70 | %ninja_build | |
71 | ||
72 | %{?with_tests:%ninja_build test} | |
73 | ||
74 | ||
75 | %install | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | %ninja_install -C build | |
78 | ||
79 | # not supported by glibc yet | |
80 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{ie,tok} | |
81 | ||
82 | %find_lang %{kfname}5_qt --with-qm --all-name --with-kde | |
83 | ||
84 | %clean | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %post -p /sbin/ldconfig | |
88 | %postun -p /sbin/ldconfig | |
89 | ||
90 | %files -f %{kfname}5_qt.lang | |
91 | %defattr(644,root,root,755) | |
92 | %doc README.md | |
93 | %{_datadir}/mime/packages/kde5.xml | |
94 | %attr(755,root,root) %{_libdir}/libKF5CoreAddons.so.*.*.* | |
95 | %ghost %{_libdir}/libKF5CoreAddons.so.5 | |
96 | ##%dir %{_libdir}/qt5/plugins/namespace | |
97 | ##%attr(755,root,root) %{_libdir}/qt5/plugins/namespace/jsonplugin_cmake_macro.so | |
98 | ##%attr(755,root,root) %{_libdir}/qt5/plugins/namespace/pluginwithoutmetadata.so | |
99 | %{_datadir}/qlogging-categories5/kcoreaddons.categories | |
100 | %dir %{_datadir}/kf5/licenses | |
101 | %{_datadir}/kf5/licenses/ARTISTIC | |
102 | %{_datadir}/kf5/licenses/BSD | |
103 | %{_datadir}/kf5/licenses/GPL_V2 | |
104 | %{_datadir}/kf5/licenses/GPL_V3 | |
105 | %{_datadir}/kf5/licenses/LGPL_V2 | |
106 | %{_datadir}/kf5/licenses/LGPL_V21 | |
107 | %{_datadir}/kf5/licenses/LGPL_V3 | |
108 | %{_datadir}/kf5/licenses/QPL_V1.0 | |
109 | %{_datadir}/qlogging-categories5/kcoreaddons.renamecategories | |
110 | ||
111 | %files devel | |
112 | %defattr(644,root,root,755) | |
113 | %attr(755,root,root) %{_bindir}/desktoptojson | |
114 | %{_includedir}/KF5/KCoreAddons | |
115 | %{_libdir}/cmake/KF5CoreAddons | |
116 | %{_libdir}/libKF5CoreAddons.so | |
117 | %{_libdir}/qt5/mkspecs/modules/qt_KCoreAddons.pri |