File recoll.spec of Package recoll
#
# spec file for package recoll
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define recollchm_version 0.8.4.1+git
Name: recoll
Version: 1.43.2
Release: 0
Summary: Full text search tool
License: GPL-2.0-or-later
URL: https://www.recoll.org
Source: https://www.recoll.org/%{name}-%{version}.tar.gz
Patch0: stop-recoll-truncating-metadata-to-150.patch
BuildRequires: bison
BuildRequires: chmlib-devel
BuildRequires: file-devel
%if 0%{?suse_version} == 1500
BuildRequires: gcc13-c++
BuildRequires: gcc13-PIE
%endif
BuildRequires: hicolor-icon-theme
BuildRequires: meson
BuildRequires: pkgconfig
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: systemd-rpm-macros
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: cmake(Qt5Network)
BuildRequires: cmake(Qt5PrintSupport)
BuildRequires: cmake(Qt5WebEngineWidgets)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt5Xml)
BuildRequires: cmake(Qt6Gui)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libxslt)
BuildRequires: pkgconfig(xapian-core)
Requires: awk
Requires: python3
# Default requires for recoll itself
Requires: sed
# Recommends for the helpers.
Recommends: antiword
Recommends: djvulibre
Recommends: exiftool
Recommends: libwpd-tools
Recommends: libxslt-tools
Recommends: perl-Image-ExifTool
Recommends: poppler-tools
Recommends: python3-base
Recommends: python3-icalendar
Recommends: python3-libxml2
Recommends: python3-mutagen
Recommends: python3-pylzma
Recommends: python3-zipp
Recommends: python3-rarfile
Recommends: unrar
Recommends: unrtf
Recommends: unzip
%description
Recoll is a personal full text search tool based on Xapian.
Features:
* Qt-based GUI.
* Searches most common document types, emails and their attachments.
* Query facilities, with boolean searches, phrases, proximity, wildcards,
filter on file types and directory tree.
* Multi-language and multi-character set with Unicode based internals.
%package devel
Summary: Development files for recoll
Requires: recoll = %{version}
%description devel
Recoll is a personal full text search tool based on Xapian.
This package provides development files for recoll.
%prep
%autosetup -p1
%build
%if 0%{?suse_version} == 1500
export CC=gcc-13 CXX=g++-13
%endif
export QMAKE=qmake-qt5
%meson \
-Daspell=false \
-Dpython-aspell=false \
-Dx11mon=false \
-Dwebkit=false \
-Dwebengine=true
%meson_build
%install
%meson_install
# rpmlint
# E: env-script-interpreter
sed -i 's|#!%{_bindir}/env perl|#!%{_bindir}/perl|' %{buildroot}%{_datadir}/recoll/filters/rclimg
sed -i 's|#!%{_bindir}/env python3|#!%{_bindir}/python3|' %{buildroot}%{_datadir}/recoll/filters/*.py
sed -i 's|#!%{_bindir}/env python3|#!%{_bindir}/python3|' %{buildroot}%{_datadir}/recoll/filters/rcl*
sed -i 's|#!%{_bindir}/env python3|#!%{_bindir}/python3|' %{buildroot}%{python3_sitearch}/recoll/rclconfig.py
# E:script-without-shebang
chmod -x %{buildroot}/%{_datadir}/recoll/filters/*.xsl
%ldconfig_scriptlets
%files
%license COPYING
%doc README
%{_bindir}/recoll
%{_bindir}/recollindex
%{_datadir}/applications/recoll-searchgui.desktop
%{_datadir}/icons/hicolor/48x48/apps/recoll.png
%{_datadir}/icons/hicolor/scalable/apps/recoll.svg
%{_datadir}/metainfo/org.recoll.recoll.appdata.xml
%{_datadir}/pixmaps/recoll.png
%{_datadir}/recoll/
%{_libdir}/librecoll.so.*
%{_mandir}/man1/recoll.1%{?ext_man}
%{_mandir}/man1/recollindex.1%{?ext_man}
%{_mandir}/man1/recollq.1%{?ext_man}
%{_mandir}/man1/xadump.1%{?ext_man}
%{_mandir}/man5/recoll.conf.5%{?ext_man}
%{_unitdir}/recollindex@.service
%{_userunitdir}/recollindex.service
%{python3_sitearch}/recoll/
%{python3_sitearch}/recollchm/
%files devel
%{_includedir}/recoll/
%{_libdir}/librecoll.so
%changelog