From 25e9d690ccbdae4967aa615c293cf142f16b053a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 28 Oct 2021 13:26:52 +0000 Subject: gnu: Add recoll. * gnu/packages/search.scm (recoll): New variable. --- gnu/packages/search.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) (limited to 'gnu/packages/search.scm') diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index df6a8b2dfc..ca716aec77 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2015, 2016 Eric Bavier ;;; Copyright © 2017 Thomas Danckaert -;;; Copyright © 2017 Ricardo Wurmus +;;; Copyright © 2017, 2021 Ricardo Wurmus ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2018 Adam Massmann ;;; Copyright © 2020 Hartmut Goebel @@ -36,9 +36,12 @@ #:use-module (guix build-system python) #:use-module (guix build-system meson) #:use-module (gnu packages) + #:use-module (gnu packages aspell) + #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages check) #:use-module (gnu packages databases) + #:use-module (gnu packages ebook) #:use-module (gnu packages freedesktop) #:use-module (gnu packages less) #:use-module (gnu packages linux) @@ -286,6 +289,53 @@ accounting for new lines and paragraph changes. It also has robust support for parsing HTML files.") (license gpl3+))) +(define-public recoll + (package + (name "recoll") + (version "1.31.2") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.lesbonscomptes.com/recoll/" + "recoll-" version ".tar.gz")) + (sha256 + (base32 "0m1w5hf2n09lbzmzvlrm2lks4lci9vvjxy2mcmgb2avgly7v5vfk")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list "--disable-qtgui" + "--disable-webkit" + "--disable-python-module" + "--without-systemd") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-default-data-dir + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "python/recoll/recoll/rclconfig.py" + (("/opt/local") + (assoc-ref outputs "out")))))))) + (inputs + `(("aspell" ,aspell) + ("chmlib" ,chmlib) + ("inotify-tools" ,inotify-tools) + ("libxslt" ,libxslt) + ("libxml2" ,libxml2) + ("python" ,python) + ("python-pdftotext" ,python-pdftotext) + ("xapian" ,xapian) + ("zlib" ,zlib))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("which" ,which))) + (home-page "") + (synopsis "Recoll finds documents based on their contents or file names") + (description "Recoll finds documents based on their contents as well as +their file names. It can search most document formats, but you may need +external applications for text extraction. It can reach any storage place: +files, archive members, email attachments, transparently handling +decompression.") + (license gpl2+))) + (define-public hyperestraier (package (name "hyperestraier") -- cgit v1.2.3 From 07ae9d8fe3887adbc99baeb53759434381a86a75 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 28 Oct 2021 17:02:06 +0000 Subject: gnu: recoll: Add home-page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Ludovic Courtès . * gnu/packages/search.scm (recoll)[home-page]: Add it. --- gnu/packages/search.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/search.scm') diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index ca716aec77..4433c48b13 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -327,7 +327,7 @@ for parsing HTML files.") (native-inputs `(("pkg-config" ,pkg-config) ("which" ,which))) - (home-page "") + (home-page "https://www.lesbonscomptes.com/recoll/") (synopsis "Recoll finds documents based on their contents or file names") (description "Recoll finds documents based on their contents as well as their file names. It can search most document formats, but you may need -- cgit v1.2.3 From 0e6470b47f00470c213fbf20bddc5bcf1e2f8e2a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 28 Oct 2021 17:04:46 +0000 Subject: gnu: recoll: Update synopsis. * gnu/packages/search.scm (recoll)[synopsis]: Do not use package name. --- gnu/packages/search.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/search.scm') diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index 4433c48b13..4640429fa9 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -328,7 +328,7 @@ for parsing HTML files.") `(("pkg-config" ,pkg-config) ("which" ,which))) (home-page "https://www.lesbonscomptes.com/recoll/") - (synopsis "Recoll finds documents based on their contents or file names") + (synopsis "Find documents based on their contents or file names") (description "Recoll finds documents based on their contents as well as their file names. It can search most document formats, but you may need external applications for text extraction. It can reach any storage place: -- cgit v1.2.3 From 21fcb08d09414a0cd6e2ce3c32ad5a33b22dad38 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 29 Oct 2021 11:40:04 +0000 Subject: gnu: recoll: Enable GUI and add inputs for common filters. * gnu/packages/search.scm (recoll)[arguments]: Enable GUI; add build phase 'wrap-filters. [inputs]: Replace python-pdftotext with poppler; add qtbase-5, unzip, gawk, grep, groff, gzip, libiconv, perl, perl-image-exiftool, sed, and tar. --- gnu/packages/search.scm | 67 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 6 deletions(-) (limited to 'gnu/packages/search.scm') diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index 4640429fa9..14b21e644f 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -43,15 +43,19 @@ #:use-module (gnu packages databases) #:use-module (gnu packages ebook) #:use-module (gnu packages freedesktop) + #:use-module (gnu packages gawk) + #:use-module (gnu packages groff) #:use-module (gnu packages less) #:use-module (gnu packages linux) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pdf) + #:use-module (gnu packages photo) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages qt) #:use-module (gnu packages sphinx) #:use-module (gnu packages time) #:use-module (gnu packages web) @@ -303,17 +307,55 @@ for parsing HTML files.") (build-system gnu-build-system) (arguments `(#:configure-flags - (list "--disable-qtgui" - "--disable-webkit" + (list "--disable-webkit" "--disable-python-module" - "--without-systemd") + "--without-systemd" + (string-append "QMAKEPATH=" (assoc-ref %build-inputs "qtbase") + "/bin/qmake")) #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-default-data-dir (lambda* (#:key outputs #:allow-other-keys) (substitute* "python/recoll/recoll/rclconfig.py" (("/opt/local") - (assoc-ref outputs "out")))))))) + (assoc-ref outputs "out"))))) + (add-after 'install 'wrap-filters + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (mapping + '(("rclps" + "poppler") + ("rclpdf.py" + "poppler") + ("rclpurple" + "gawk") + ("rcllyx" + "libiconv") + ("rcltex" + "libiconv") + ("rclkwd" + "unzip" "gzip" "tar" "libxslt") + ("rclman" + "groff") + ("rclgaim" + "gawk" "libiconv") + ("rclaptosidman" + "sed") + ("rclscribus" + "grep" "gawk" "sed")))) + (for-each + (lambda (program packages) + (wrap-program (string-append out "/share/recoll/filters/" program) + `("PATH" ":" prefix + ,(map (lambda (i) + (string-append (assoc-ref inputs i) "/bin")) + packages)))) + (map car mapping) + (map cdr mapping)) + + (wrap-program (string-append out "/share/recoll/filters/rclimg") + `("PERL5LIB" ":" prefix + (,(getenv "PERL5LIB")))))))))) (inputs `(("aspell" ,aspell) ("chmlib" ,chmlib) @@ -321,9 +363,22 @@ for parsing HTML files.") ("libxslt" ,libxslt) ("libxml2" ,libxml2) ("python" ,python) - ("python-pdftotext" ,python-pdftotext) + ("qtbase" ,qtbase-5) + ("unzip" ,unzip) ("xapian" ,xapian) - ("zlib" ,zlib))) + ("zlib" ,zlib) + + ;; For filters + ("gawk" ,gawk) + ("grep" ,grep) + ("groff" ,groff) + ("gzip" ,gzip) + ("libiconv" ,libiconv) + ("perl" ,perl) + ("perl-image-exiftool" ,perl-image-exiftool) + ("poppler" ,poppler) + ("sed" ,sed) + ("tar" ,tar))) (native-inputs `(("pkg-config" ,pkg-config) ("which" ,which))) -- cgit v1.2.3