File deepin-anything.spec of Package deepin-anything
#
# spec file for package deepin-anything
#
# Copyright (c) 2019 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define sover 1_0_0
%define sover1 1
Name: deepin-anything
Version: 7.0.33
Release: 0
Summary: A file search tool
License: GPL-2.0+
Group: System/Kernel
Url: https://github.com/linuxdeepin/deepin-anything
Source0: https://github.com/linuxdeepin/deepin-anything/archive/%{version}/%{name}-%{version}.tar.gz
Source1: %name-kmp-preamble
Source99: %name-rpmlintrc
# PATCH-FIX-UPSTREAM fix-boost-system-1_89.patch hillwood@opensuse.org - remove deprecated Boost.System component from CMake
Patch0: fix-boost-system-1_89.patch
BuildRequires: boost-devel
BuildRequires: cmake(Qt6)
BuildRequires: pkgconfig(libnl-3.0)
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6DBus)
BuildRequires: pkgconfig(Qt6Concurrent)
BuildRequires: pkgconfig(Qt6Xml)
BuildRequires: pkgconfig(polkit-qt6-1)
BuildRequires: pkgconfig(udisks2-qt6)
BuildRequires: pkgconfig(mount)
BuildRequires: pkgconfig(dtk6core)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libpcre2-8)
BuildRequires: pkgconfig(liblucene++)
BuildRequires: pkgconfig(spdlog)
BuildRequires: fdupes
BuildRequires: systemd-rpm-macros
BuildRequires: -pesign-obs-integration
Recommends: %{name}-plugin-handlers = %{version}
%if %{defined kernel_module_package_buildreqs}
BuildRequires: %{kernel_module_package_buildreqs}
%endif
%if 0%{?suse_version} < 1600
BuildRequires: gcc13-c++
%endif
Requires: %{name}-kmp
Provides: %{name}-kmod-common = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{defined kernel_module_package}
%kernel_module_package
%endif
%{?systemd_ordering}
%description
Deepin Anything file search tool
%package KMP
Summary: Anything Module for deepin-anything
Group: System/Kernel
%description KMP
These packages contain Anything Module for deepin-anything.
%prep
%autosetup -p1
pushd src
cp -R kernelmod src
pushd src
set -- *
mkdir source
mv "$@" source/
mkdir obj
popd
popd
%build
%if 0%{?suse_version} < 1600
export CXX=g++-13
%endif
pushd src/src
for flavor in %{flavors_to_build}; do
rm -rf obj/$flavor
cp -r source obj/$flavor
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules \
M=$PWD/obj/$flavor V=1
done
popd
%cmake -DCMAKE_CXX_FLAGS="%{optflags} -Wno-deprecated-declarations"
%cmake_build
%install
pushd src/src
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates
for flavor in %{flavors_to_build}; do
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install \
M=$PWD/obj/$flavor
done
popd
%cmake_install
rm -rf %{buildroot}%{_prefix}/lib/modules-load.d
rm -rf %{buildroot}%{_prefix}/src
export NO_BRP_CHECK_RPATH=true
%fdupes %{buildroot}
%pre
%service_add_pre %{name}-logger.service
%post
%service_add_post %{name}-logger.service
%preun
%service_del_preun %{name}-logger.service
%postun
%service_del_postun %{name}-logger.service
%files
%doc README.md CHANGELOG.md
%license LICENSE
%{_bindir}/%{name}-searcher
%{_unitdir}/%{name}-logger.service
%{_userunitdir}/%{name}-daemon.service
%{_libexecdir}/%{name}-*
%{_datadir}/%{name}-server
%dir %{_datadir}/dsg
%dir %{_datadir}/dsg/configs
%{_datadir}/dsg/configs/org.deepin.anything
%changelog