kf5-baloo/kf5-baloo.spec
2024-01-03 09:59:04 +08:00

195 lines
5.3 KiB
RPMSpec

%global framework baloo
# bootstrap mode
#%global bootstrap 1
%if !0%{?bootstrap}
%global tests 1
%endif
Name: kf5-%{framework}
Summary: A Tier 3 KDE Frameworks 5 module that provides indexing and search functionality
Version: 5.113.0
Release: 1
License: (LGPLv2 or LGPLv3) and (GPLv2 or GPLv3)
URL: https://community.kde.org/Baloo
%global majmin %majmin_ver_kf5
%global stable %stable_kf5
Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz
Source1: 97-kde-baloo-filewatch-inotify.conf
Source2: baloo_file_shutdown.sh
Patch100: baloo-5.67.0-baloofile_config.patch
BuildRequires: extra-cmake-modules >= %{majmin}
BuildRequires: kf5-kconfig-devel >= %{majmin}
BuildRequires: kf5-kcoreaddons-devel >= %{majmin}
BuildRequires: kf5-kcrash-devel >= %{majmin}
BuildRequires: kf5-kdbusaddons-devel >= %{majmin}
BuildRequires: kf5-kfilemetadata-devel >= %{majmin}
BuildRequires: kf5-ki18n-devel >= %{majmin}
BuildRequires: kf5-kidletime-devel >= %{majmin}
BuildRequires: kf5-kio-devel >= %{majmin}
BuildRequires: kf5-rpm-macros >= %{majmin}
BuildRequires: kf5-solid-devel >= %{majmin}
BuildRequires: lmdb-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtdeclarative-devel
# for systemd-related macros
BuildRequires: systemd
%if 0%{?tests}
BuildRequires: dbus-x11
BuildRequires: time
BuildRequires: xorg-x11-server-Xvfb
%endif
Obsoletes: kf5-baloo-tools < 5.5.95-1
Provides: kf5-baloo-tools = %{version}-%{release}
Conflicts: baloo < 5
Obsoletes: kf5-baloo < 5.21.0-4
%description
%{summary}.
%package devel
Summary: Development files for %{name}
License: LGPLv2 or LGPLv3
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: kf5-kcoreaddons-devel >= %{majmin}
Requires: kf5-kfilemetadata-devel >= %{majmin}
Requires: qt5-qtbase-devel
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package file
Summary: File indexing and search for Baloo
License: LGPLv2 or LGPLv3
Conflicts: baloo-file < 5
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description file
%{summary}.
%package libs
Summary: Runtime libraries for %{name}
License: LGPLv2 or LGPLv3
%description libs
%{summary}.
%prep
%autosetup -n %{framework}-%{version} -p1
%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} .. \
-DBUILD_TESTING:BOOL=%{?tests:ON}%{!?tests:OFF}
popd
%make_build -C %{_target_platform}
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%if 0%{?flatpak:1}
rm -fv %{buildroot}%{_userunitdir}/kde-baloo.service
%endif
# baloodb not installed unless BUILD_EXPERIMENTAL is enabled, so omit translations
rm -fv %{buildroot}%{_datadir}/locale/*/LC_MESSAGES/baloodb5.*
install -p -m644 -D %{SOURCE1} %{buildroot}%{_prefix}/lib/sysctl.d/97-kde-baloo-filewatch-inotify.conf
install -p -m755 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/xdg/plasma-workspace/shutdown/baloo_file.sh
%find_lang kio5_baloosearch
%find_lang kio5_tags
%find_lang kio5_timeline
%find_lang balooctl5
%find_lang balooengine5
%find_lang baloosearch5
%find_lang balooshow5
%find_lang baloo_file5
%find_lang baloo_file_extractor5
cat kio5_tags.lang kio5_baloosearch.lang kio5_timeline.lang \
balooctl5.lang balooengine5.lang baloosearch5.lang \
balooshow5.lang \
> %{name}.lang
cat baloo_file5.lang baloo_file_extractor5.lang \
> %{name}-file.lang
%check
%if 0%{?tests}
export CTEST_OUTPUT_ON_FAILURE=1
xvfb-run -a \
dbus-launch --exit-with-session \
time \
make test ARGS="--output-on-failure --timeout 300" -C %{_target_platform} ||:
%endif
%files -f %{name}.lang
%license LICENSES/*.txt
%{_kf5_bindir}/baloosearch
%{_kf5_bindir}/balooshow
%{_kf5_bindir}/balooctl
%{_kf5_datadir}/qlogging-categories5/%{framework}*
%files file -f %{name}-file.lang
%{_prefix}/lib/sysctl.d/97-kde-baloo-filewatch-inotify.conf
%config(noreplace) %{_sysconfdir}/xdg/plasma-workspace/shutdown/baloo_file.sh
%{_kf5_bindir}/baloo_file
%{_kf5_bindir}/baloo_file_extractor
%config(noreplace) %{_kf5_sysconfdir}/xdg/autostart/baloo_file.desktop
%if ! 0%{?flatpak:1}
%{_userunitdir}/kde-baloo.service
%endif
%{_libexecdir}/baloo_file
%{_libexecdir}/baloo_file_extractor
%ldconfig_scriptlets libs
%files libs
%license LICENSES/*.txt
%{_kf5_libdir}/libKF5Baloo.so.*
%{_kf5_libdir}/libKF5BalooEngine.so.*
# multilib'd plugins and friends
%{_kf5_plugindir}/kio/baloosearch.so
%{_kf5_plugindir}/kio/tags.so
%{_kf5_plugindir}/kio/timeline.so
%{_kf5_plugindir}/kded/baloosearchmodule.so
%{_kf5_qmldir}/org/kde/baloo
%files devel
%{_kf5_libdir}/libKF5Baloo.so
%{_kf5_libdir}/cmake/KF5Baloo/
%{_kf5_libdir}/pkgconfig/Baloo.pc
%{_kf5_includedir}/Baloo/
%{_kf5_archdatadir}/mkspecs/modules/qt_Baloo.pri
%{_kf5_datadir}/dbus-1/interfaces/org.kde.baloo.*.xml
%{_kf5_datadir}/dbus-1/interfaces/org.kde.Baloo*.xml
%changelog
* Wed Jan 03 2024 jiangxinyu <jiangxinyu@kylinos.cn> - 5.113.0-1
- Update package to version 5.113.0
* Thu Aug 03 2023 leeffo <liweiganga@uniontech.com> - 5.108.0-1
- upgrade to version 5.108.0
* Fri Feb 17 2023 peijiankang <peijiankang@kylinos.cn> - 5.100.0-1
- update verison to 5.100.0
* Wed Jul 13 2022 misaka00251 <misaka00251@misakanet.cn> - 5.97.0-1
- Init package