]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
4 | %define kdeframever 5.115 | |
5 | %define qtver 5.15.2 | |
6 | %define kfname kconfig | |
7 | ||
8 | Summary: Backend for storing application configuration | |
9 | Name: kf5-%{kfname} | |
10 | Version: 5.115.0 | |
11 | Release: 1 | |
12 | License: LGPL v2.1+ | |
13 | Group: X11/Libraries | |
14 | Source0: https://download.kde.org/stable/frameworks/%{kdeframever}/%{kfname}-%{version}.tar.xz | |
15 | # Source0-md5: fcb77cb2d9349b33e9e085ca4d2ebe7f | |
16 | URL: http://www.kde.org/ | |
17 | BuildRequires: Qt5Core-devel >= %{qtver} | |
18 | BuildRequires: Qt5DBus-devel >= %{qtver} | |
19 | BuildRequires: Qt5Gui-devel >= %{qtver} | |
20 | BuildRequires: Qt5Test-devel >= %{qtver} | |
21 | BuildRequires: Qt5Xml-devel >= %{qtver} | |
22 | BuildRequires: cmake >= 3.16 | |
23 | BuildRequires: kf5-extra-cmake-modules >= %{kdeframever} | |
24 | BuildRequires: ninja | |
25 | BuildRequires: qt5-linguist >= %{qtver} | |
26 | BuildRequires: rpmbuild(macros) >= 1.736 | |
27 | BuildRequires: tar >= 1:1.22 | |
28 | BuildRequires: xz | |
29 | Requires: Qt5DBus >= %{qtver} | |
30 | Requires: Qt5Gui >= %{qtver} | |
31 | Requires: Qt5Xml >= %{qtver} | |
32 | Requires: kf5-dirs | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %define qt5dir %{_libdir}/qt5 | |
36 | ||
37 | %description | |
38 | KConfig provides an advanced configuration system. It is made of two | |
39 | parts: KConfigCore and KConfigGui. | |
40 | ||
41 | KConfigCore provides access to the configuration files themselves. It | |
42 | features: | |
43 | ||
44 | - Code generation: describe your configuration in an XML file, and use | |
45 | `kconfig_compiler to generate classes that read and write | |
46 | configuration entries. | |
47 | - Cascading configuration files (global settings overridden by local | |
48 | settings). | |
49 | - Optional shell expansion support (see [docs/options.md](@ref | |
50 | options)). | |
51 | - The ability to lock down configuration options (see | |
52 | [docs/options.md](@ref options)). | |
53 | ||
54 | KConfigGui provides a way to hook widgets to the configuration so that | |
55 | they are automatically initialized from the configuration and | |
56 | automatically propagate their changes to their respective | |
57 | configuration files. | |
58 | ||
59 | %package devel | |
60 | Summary: Header files for %{kfname} development | |
61 | Summary(pl.UTF-8): Pliki nagłówkowe dla programistów używających %{kfname} | |
62 | Group: X11/Development/Libraries | |
63 | Requires: %{name} = %{version}-%{release} | |
64 | Requires: Qt5DBus-devel >= %{qtver} | |
65 | Requires: Qt5Xml-devel >= %{qtver} | |
66 | Requires: cmake >= 3.16 | |
67 | ||
68 | %description devel | |
69 | Header files for %{kfname} development. | |
70 | ||
71 | %description devel -l pl.UTF-8 | |
72 | Pliki nagłówkowe dla programistów używających %{kfname}. | |
73 | ||
74 | %prep | |
75 | %setup -q -n %{kfname}-%{version} | |
76 | ||
77 | %build | |
78 | %cmake -B build \ | |
79 | -G Ninja \ | |
80 | %{!?with_tests:-DBUILD_TESTING=OFF} \ | |
81 | -DKDE_INSTALL_USE_QT_SYS_PATHS=ON | |
82 | ||
83 | %ninja_build -C build | |
84 | ||
85 | %if %{with tests} | |
86 | %ninja_build -C build test | |
87 | %endif | |
88 | ||
89 | ||
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | install -d $RPM_BUILD_ROOT%{_datadir}/kconf_update | |
93 | %ninja_install -C build | |
94 | ||
95 | %find_lang %{kfname}5_qt --with-qm --all-name --with-kde | |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %post -p /sbin/ldconfig | |
101 | %postun -p /sbin/ldconfig | |
102 | ||
103 | %files -f %{kfname}5_qt.lang | |
104 | %defattr(644,root,root,755) | |
105 | %doc DESIGN README.md TODO | |
106 | %ghost %{_libdir}/libKF5ConfigCore.so.5 | |
107 | %attr(755,root,root) %{_libdir}/libKF5ConfigCore.so.*.* | |
108 | %ghost %{_libdir}/libKF5ConfigGui.so.5 | |
109 | %ghost %{_libdir}/libKF5ConfigQml.so.5 | |
110 | %attr(755,root,root) %{_libdir}/libKF5ConfigQml.so.*.* | |
111 | %attr(755,root,root) %{_libdir}/libKF5ConfigGui.so.*.* | |
112 | %attr(755,root,root) %{_bindir}/kreadconfig5 | |
113 | %attr(755,root,root) %{_bindir}/kwriteconfig5 | |
114 | %attr(755,root,root) %{_libexecdir}/kf5/kconf_update | |
115 | %attr(755,root,root) %{_libexecdir}/kf5/kconfig_compiler_kf5 | |
116 | %dir %{_datadir}/kconf_update | |
117 | %{_datadir}/qlogging-categories5/kconfig.categories | |
118 | %{_datadir}/qlogging-categories5/kconfig.renamecategories | |
119 | ||
120 | %files devel | |
121 | %defattr(644,root,root,755) | |
122 | %{_libdir}/libKF5ConfigCore.so | |
123 | %{_libdir}/libKF5ConfigGui.so | |
124 | %{_libdir}/libKF5ConfigQml.so | |
125 | %{_includedir}/KF5/KConfigCore | |
126 | %{_includedir}/KF5/KConfigGui | |
127 | %{_includedir}/KF5/KConfigQml | |
128 | %{_includedir}/KF5/KConfig | |
129 | %{_libdir}/cmake/KF5Config | |
130 | %{qt5dir}/mkspecs/modules/qt_KConfigCore.pri | |
131 | %{qt5dir}/mkspecs/modules/qt_KConfigGui.pri |