# Turn off the brp-python-bytecompile script %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') Summary: Desktop full text search tool with Qt GUI Name: recoll Version: 1.24.3 Release: 1%{?dist} License: GPLv2+ URL: http://www.lesbonscomptes.com/recoll/ Source0: http://www.lesbonscomptes.com/recoll/recoll-%{version}.tar.gz Source10: qmake-qt5.sh Patch1: recoll-python.patch BuildRequires: aspell-devel BuildRequires: bison BuildRequires: desktop-file-utils BuildRequires: gcc-c++ # kio BuildRequires: kdelibs4-devel BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtwebkit-devel BuildRequires: extra-cmake-modules BuildRequires: kf5-kio-devel BuildRequires: python2-devel BuildRequires: python3-devel BuildRequires: xapian-core-devel BuildRequires: zlib-devel Requires: xdg-utils %description Recoll is a personal full text search package for Linux, FreeBSD and other Unix systems. It is based on a very strong back end (Xapian), for which it provides an easy to use, feature-rich, easy administration interface. %package kio Summary: KIO support for recoll Requires: %{name} = %{version}-%{release} %description kio The recoll KIO slave allows performing a recoll search by entering an appropriate URL in a KDE open dialog, or with an HTML-based interface displayed in Konqueror. %prep %setup -q -n %{name}-%{version} %patch1 -p1 f="desktop/recoll-searchgui.desktop" iconv -f ISO_8859-1 -t utf-8 -o $f.utf8 $f mv $f.utf8 $f %build CFLAGS="%{optflags}"; export CFLAGS CXXFLAGS="%{optflags}"; export CXXFLAGS LDFLAGS="%{?__global_ldflags}"; export LDFLAGS # force use of custom/local qmake, to inject proper build flags (above) install -m755 -D %{SOURCE10} qmake-qt5.sh export QMAKE=qmake-qt5 %configure make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} STRIP=/bin/true INSTALL='install -p' desktop-file-install --delete-original \ --dir=%{buildroot}/%{_datadir}/applications \ %{buildroot}/%{_datadir}/applications/%{name}-searchgui.desktop # use /usr/bin/xdg-open rm -f %{buildroot}/usr/share/recoll/filters/xdg-open rm -f %{buildroot}%{_libdir}/recoll/librecoll.la # kio_recoll -kde5 ( mkdir kde/kioslave/kio_recoll/build && pushd kde/kioslave/kio_recoll/build %cmake .. make %{?_smp_mflags} VERBOSE=1 make install DESTDIR=%{buildroot} popd ) # kio_recoll -kde4 ( mkdir kde/kioslave/kio_recoll-kde4/build && \ pushd kde/kioslave/kio_recoll-kde4/build %cmake .. make %{?_smp_mflags} VERBOSE=1 make install DESTDIR=%{buildroot} popd ) mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d echo "%{_libdir}/recoll" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf # Mix of Python 2 and 3, needs special care py2_byte_compile () { bytecode_compilation_path="$1" find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 %{__python2} -O -c 'import py_compile, sys; [ py_compile.compile(f, dfile=f.partition("%{buildroot}")[2]) for f in sys.argv[1:] ]' || : find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 %{__python2} -c 'import py_compile, sys; [ py_compile.compile(f, dfile=f.partition("%{buildroot}")[2]) for f in sys.argv[1:] ]' || : } py3_byte_compile () { bytecode_compilation_path="$1" find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 %{__python3} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{buildroot}")[2], optimize=opt) for opt in range(2) for f in sys.argv[1:] ]' || : } py2_byte_compile %{buildroot}%{python2_sitearch}/recoll for py in %{buildroot}%{_datadir}/%{name}/filters/*.py; do if [ "$(basename $py)" = "recoll-we-move-files.py" ]; then py3_byte_compile $py else py2_byte_compile $py if [ "$(basename $py)" = "hotrecoll.py" ]; then sed -i -e 's,#!/usr/bin/python,#!/usr/bin/python2,' $py fi fi done %post touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ] ; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor fi if [ -x %{_bindir}/update-desktop-database ] ; then %{_bindir}/update-desktop-database &> /dev/null fi /sbin/ldconfig exit 0 %postun touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ] ; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor fi if [ -x %{_bindir}/update-desktop-database ] ; then %{_bindir}/update-desktop-database &> /dev/null fi /sbin/ldconfig exit 0 %files %license COPYING %doc ChangeLog README %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %{_bindir}/%{name} %{_bindir}/%{name}index %{_datadir}/%{name} %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/%{name}-searchgui.desktop %{_datadir}/icons/hicolor/48x48/apps/%{name}.png %{_datadir}/pixmaps/%{name}.png %{_libdir}/recoll %{python2_sitearch}/recoll %{python2_sitearch}/Recoll*.egg-info %{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}q.1* %{_mandir}/man1/%{name}index.1* %{_mandir}/man5/%{name}.conf.5* %files kio %license COPYING %{_libdir}/kde4/kio_recoll.so %{_libdir}/qt5/plugins/kio_recoll.so %{_datadir}/kde4/apps/kio_recoll/ %{_datadir}/kde4/services/recoll.protocol %{_datadir}/kde4/services/recollf.protocol %{_datadir}/kio_recoll/help.html %{_datadir}/kio_recoll/welcome.html %{_datadir}/kservices5/recoll.protocol %{_datadir}/kservices5/recollf.protocol %changelog * Mon Dec 03 2018 Terje Rosten - 1.24.3-1 - 1.24.3 * Sat Sep 29 2018 Terje Rosten - 1.24.1-1 - 1.24.1 * Tue Sep 18 2018 Terje Rosten - 1.23.7-8 - Add patch from upstream to fix rhbz#1625313 * Tue Jul 31 2018 Florian Weimer - 1.23.7-7 - Rebuild with fixed binutils * Mon Jul 30 2018 Terje Rosten - 1.23.7-6 - Add patch from upstream to fix FTBFS * Sat Jul 14 2018 Fedora Release Engineering - 1.23.7-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro HronĨok - 1.23.7-4 - Rebuilt for Python 3.7 * Sun May 13 2018 Terje Rosten - 1.23.7-3 - Add patch to fix rhbz#1577613 * Fri Feb 09 2018 Fedora Release Engineering - 1.23.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Tue Jan 09 2018 Terje Rosten - 1.23.7-1 - 1.23.7 * Sat Dec 09 2017 Terje Rosten - 1.23.6-1 - 1.23.6 * Mon Sep 04 2017 Terje Rosten - 1.23.3-1 - 1.23.3 * Thu Aug 03 2017 Fedora Release Engineering - 1.23.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 1.23.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon May 15 2017 Terje Rosten - 1.23.2-1 - 1.23.2 * Mon May 15 2017 Fedora Release Engineering - 1.23.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild * Mon Mar 13 2017 Terje Rosten - 1.23.1-1 - 1.23.1 * Sat Feb 18 2017 Terje Rosten - 1.22.4-1 - 1.22.4 * Sat Feb 11 2017 Fedora Release Engineering - 1.22.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 26 2016 Peter Robinson 1.22.3-2 - Rebuild (xapian 1.4) * Sun Sep 18 2016 Terje Rosten - 1.22.3-1 - 1.22.3 * Tue Jul 19 2016 Fedora Release Engineering - 1.21.7-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Fri May 13 2016 Terje Rosten - 1.21.7-1 - 1.21.7 * Wed Apr 06 2016 Terje Rosten - 1.21.6-1 - 1.21.6 - Nice fixes from Jean-Francois Dockes (upstream) merged, thanks! * Sat Feb 06 2016 Terje Rosten - 1.21.5-1 - 1.21.5 * Thu Feb 04 2016 Fedora Release Engineering - 1.21.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Jan 18 2016 Terje Rosten - 1.21.4-1 - 1.21.4 * Sat Oct 31 2015 Terje Rosten - 1.21.3-1 - 1.21.3 * Sat Oct 03 2015 Terje Rosten - 1.21.2-1 - 1.21.2 * Thu Jun 18 2015 Fedora Release Engineering - 1.20.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue May 05 2015 Terje Rosten - 1.20.6-1 - 1.20.6 - Fixes bz#1218161 and bz#1204464 * Sat May 02 2015 Kalev Lember - 1.20.5-3 - Rebuilt for GCC 5 C++11 ABI change * Sat Apr 11 2015 Terje Rosten - 1.20.5-2 - Add KIO subpackage * Tue Apr 07 2015 Terje Rosten - 1.20.5-1 - 1.20.5 - Include kio support (bz#1203257) * Sat Jan 10 2015 Terje Rosten - 1.20.1-1 - 1.20.1 * Sun Nov 09 2014 Terje Rosten - 1.19.14p2-1 - 1.19.14p2 * Sun Aug 17 2014 Fedora Release Engineering - 1.19.13-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 1.19.13-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Tue May 06 2014 Terje Rosten - 1.19.13-1 - 1.19.13 * Mon Jan 20 2014 Terje Rosten - 1.19.11-1 - 1.19.11 * Mon Nov 11 2013 Terje Rosten - 1.19.9-1 - 1.19.9 * Tue Nov 05 2013 Terje Rosten - 1.19.8-1 - 1.19.8 * Sun Aug 04 2013 Fedora Release Engineering - 1.19.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Jun 12 2013 Terje Rosten - 1.19.4-2 - Fix filter setup * Mon Jun 10 2013 Terje Rosten - 1.19.4-1 - 1.19.4 * Thu Feb 14 2013 Fedora Release Engineering - 1.18.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Mon Nov 19 2012 Terje Rosten - 1.18.1-1 - 1.18.1 * Sat Jul 21 2012 Fedora Release Engineering - 1.17.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed May 30 2012 Terje Rosten - 1.17.3-1 - 1.17.3 * Sat Mar 31 2012 Terje Rosten - 1.17.1-1 - 1.17.1 * Sun Mar 25 2012 Terje Rosten - 1.17-1 - 1.17 * Tue Feb 28 2012 Fedora Release Engineering - 1.16.2-3 - Rebuilt for c++ ABI breakage * Wed Feb 15 2012 Terje Rosten - 1.16.2-2 - Add patch to build with gcc 4.7 * Wed Feb 01 2012 Terje Rosten - 1.16.2-1 - 1.16.2 * Sat Jan 14 2012 Fedora Release Engineering - 1.16.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Mon Oct 24 2011 Terje Rosten - 1.16.1-2 - Add patch to fix crash (bz #747472) * Tue Oct 18 2011 Terje Rosten - 1.16.1-1 - 1.16.1 * Tue May 24 2011 Terje Rosten - 1.15.8-2 - add patch from upstream to fix crash. * Sun May 08 2011 Terje Rosten - 1.15.8-1 - 1.15.8 * Wed Feb 09 2011 Fedora Release Engineering - 1.14.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Fri Jan 28 2011 Terje Rosten - 1.14.4-1 - 1.14.4 * Mon Nov 15 2010 Terje Rosten - 1.14.2-2 - Add patch to fix #631704 * Sun Nov 7 2010 Terje Rosten - 1.14.2-1 - 1.14.2 * Thu Jul 15 2010 Terje Rosten - 1.13.04-6 - add patch to build with xapian 1.2 (from J.F. Dockes, thanks) * Sat Jul 10 2010 Terje Rosten - 1.13.04-5 - use system xdg-open - trim chagenlog * Fri Jul 9 2010 Terje Rosten - 1.13.04-4 - fix some review comments * Mon May 10 2010 Terje Rosten - 1.13.04-3 - use version macro in source url - don't strip bins, giving non empty debuginfo package - more explicit file listing - try to preserve timestamps - use proper name for spec file - fix changelog - license seems to be GPLv2+ - include some %%doc files - add buildroot tag - some source add execute bit set - explicit enable inotify - add aspell-devel to bulldreq - make with _smp_mflags seems to work - add post scripts - add patch to build gui with correct flags (ref: 338791) * Sun May 9 2010 J.F. Dockes 1.13.04-2 - bumped the release number to issue new rpms for fc10 * Sun May 9 2010 J.F. Dockes 1.13.04 - updated to recoll release 1.13.04 * Fri Feb 12 2010 Terry Duell 1.13.02 - updated to release 1.13.02 * Tue Jan 12 2010 Terry Duell 1.13.01-3 - updated to fix Fedora desktop-file-install and install icon * Sun Jan 10 2010 Jean-Francois Dockes 1.13.01-2 - updated for recent fedoras: depend on xapian packages, use qt4 * Thu Jan 07 2010 Jean-Francois Dockes 1.13.01-1 - update to release 1.13.01 * Wed Feb 1 2006 Jean-Francois Dockes 1.2.0-1 - initial packaging