Install minimal Recoll on FreeBSD 15
Recoll is a full text search application. Recoll is based on the very capable Xapian search engine library.
The FreeBSD package comes with a ton of dependencies, which is great for use on your desktop, but can be a bit of overkill for non-graphical systems.
Minimal install
The idea is to install with as minimal dependencies as possible and start working with that. Later we can always add more.
Install dependencies
Although we install Recoll from source, we install the dependencies as FreeBSD package.
To make it easy to copy the install to other systems, we make use of GNU stow, so we install that too.
pkg install libX11 libxslt pkgconf stow xapian-core
Prepare installation directory
mkdir -p /usr/local/stow/recoll
Download source files
Version 1.37.5 is unfortunately the last version with autotools build, so we fetch that:
fetch https://www.recoll.org/recoll-1.37.5.tar.gz
Configure and build
./configure \
--enable-idxthreads \
--disable-qtgui \
--enable-recollq \
--disable-python-module \
--without-aspell \
--disable-python-aspell \
--disable-python-chm \
--prefix=/usr/local/stow/recoll
make
make install
Install
cd /usr/local/stow
stow recoll
Configuration files
To test our install, we create a simple configuration file ~/.recoll/recoll.conf:
followLinks = 1
topdirs = /usr/local/share/man \
/usr/local/share/info
This configuration file aims to index the system documentation files.
For this, we also need a mimemap file ~/.recoll/mimemap:
.0p = text/x-man
.1 = text/x-man
.3 = text/x-man
.7 = text/x-man
.8 = text/x-man
This is for the standard man pages, if you have more directories under /usr/local/share/man/
add those extensions too.
Install helper applications
In order to make sense of the files, Xapian needs some helper programs.
Our system documentation consists of man pages and info files, so we need the helper applications for those two:
pkg install groff texinfo
For some reason, we need to make the indexer understand that "python3" is in fact pyhton3.11.
We can create an alias (depending on your shell), or otherwise create a symlink:
ln -s /usr/local/bin/python3.11 /usr/local/bin/python3
Create index
Next, create or update the index:
recollindex
Start searching
After our man pages are indexed, we can search for text:
recollq -q 'expansion'
recollq -A 'expansion escape sequences textdomain'
Of course, we don't get the nicely formatted output as with the graphical Recoll desktop application.
Kudos
Thanks to Sergey Matveev for help with the configuration!
Webrings
100% made with ♥ by a human — no cookies, no trackers.
Proud member of the 250kb.club,
the no-JS.club,
the Blogroll.Club,
and the Bukmark.Club.
Don’t let a billionaire’s algorithm control what you read — use an RSS feed reader.
Most recent pages All tags Sitemap RSS of Gophersite
