man-pages/man8/aspell-autobuildhash.8.html
2021-03-31 01:06:50 +01:00

197 lines
6.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of ASPELL-AUTOBUILDHASH</TITLE>
</HEAD><BODY>
<H1>ASPELL-AUTOBUILDHASH</H1>
Section: (8)<BR>Updated: 2018-11-15<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
aspell-autobuildhash - Autobuilding aspell hash files for some dicts
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
aspell-autobuildhash [--force]
Options:
--debug Show extra info about aspell-autobuildhash internal
work. Will also enable aspell affix validation.
--dry-run Show what would be done, but do nothing real.
--force Rebuild the hash file for all dicts providing a
compat file skipping the test.
--triggered Tell the script that is run in the triggers stage.
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>aspell-autobuildhash</B> is a script that will manage aspell hash files
autobuild, intended to be called from the dictionaries-common tools.
Depending on the aspell
compatibility level and on the compatibility level used for the hash file
if present, will decide whether it must be rebuilt or not. This script will
only work on aspell packages prepared to use it, it will do nothing for other
aspell dict packages.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<PRE>
--debug Show some extra information about aspell-autobuildhash
internal work. Will also enable aspell affix validation.
--dry-run Show what would be done, but do nothing real.
--force Rebuild the hash file for all dicts providing a compat
file regardless of the compatibility levels found.
--triggered Tell the script that is run in the triggers stage. When
run under dpkg control, do not try to set the
'aspell-autobuildhash' trigger, but run real
B&lt;aspell-autobuildhash&gt; code. When not run under dpkg
control, real code will always be run and '--triggered'
option has no real effect.
</PRE>
<A NAME="lbAF">&nbsp;</A>
<H2>PACKAGE MAINTAINERS</H2>
To use this system, <B>aspell-autobuildhash</B> expects a <I></I>$lang<I>.compat</I> file
in <I>/var/lib/aspell</I> (<I></I>$lang<I></I> stands for the lang basename with variant
if any, e.g. <I></I>$lang<I></I> is something like <I>gl-minimos</I> or <I>en</I>))
containing aspell compatibility version for last successful build
or ``0'' or en empty file if hash is to be rebuild, as is for dictionary
installation and upgrades.
<P>
When upgrading <B>aspell</B>, script will check if version in <I></I>$lang<I>.compat</I>
is different from <I>aspell.compat</I> and rebuild if so, updating
<I></I>$lang<I>.compat</I> with the new value.
<P>
Wordlists should previously be compressed either with gzip
(and their extensions set as <I>.mwl.gz</I> or <I>.wl.gz</I>) or preferably
first with aspell prezip and then gzipped (with <I>.cwl.gz</I> extension).
This applies both for plain wordlists and munched wordlists
(in the ispell way) if you use affix compression.
<P>
If your package will provide a single hash, install prezipped+gzipped
wordlist as <I>/usr/share/aspell/$lang.cwl.gz</I> or, if prezip is not used,
as <I>/usr/share/aspell/$lang.mwl.gz</I>.
<P>
If your package will provide more than one aspell hash for the same <TT>$lang</TT>,
you will need to place each compressed wordlist as e.g.
<I>/usr/share/aspell/$subdict.cwl.gz</I>, and the common <I></I>$lang<I>.compat</I> as
above. Then create a <I>/usr/share/aspell/$lang.contents</I> file with the
base names of the subdicts, one in a line. For English that will contain,
amongst other possible lines
<P>
<PRE>
en-common
en-variant_0
en-variant_1
en-variant_2
en_CA-w_accents-only
</PRE>
<P>
No need to use this file if a single hash is being created.
<P>
Dictionaries-common scripts will call internally this script and create a
single hash file at <I>/var/lib/ispell/$lang.rws</I>, or hash files at
<I>/var/lib/ispell/$subdict.rws</I>. You must set a symlink to that
files from <I>/usr/lib/aspell/$lang.rws</I> or
<I>/usr/lib/aspell/$subdict.rws</I> as appropriate.
<P>
Aspell dictionary packages using this script must make sure that
<I></I>$lang<I>.compat</I> is reset on every new install/upgrade, so hash is rebuilt.
They must also make sure that <I></I>$lang<I>.compat</I> and all of
<I>/var/lib/aspell/$lang.rws</I> or <I>/var/lib/aspell/$subdict.rws</I>
are removed on package removal.
<P>
As of version <TT>1.10</TT>, <B>installdeb-aspell</B> script will understand
<TT>'auto-compat'</TT> and <TT>'auto-contents'</TT> fields in <I></I>$dict<I>.info-aspell</I>
file to help with this by adding needed debhelper snippets.
Put in that entry the base name(s) of your compat and contents file(s)
and carefully check resulting maintainer scripts after build.
<P>
Note that you are no longer suggested to ship empty files at
any of <I>/var/lib/aspell/$lang.compat</I>, <I>/var/lib/aspell/$lang.rws</I>
or <I>/var/lib/aspell/$subdict.rws</I>, but explicitly create/update them
on install and explicitly remove them on removal.
<P>
<B>aspell</B> maintainer should also call this script from package postinst.
When comparing versions it will get the aspell version from file
<I>/usr/share/aspell/aspell.compat</I>.
<A NAME="lbAG">&nbsp;</A>
<H2>AUTHORS</H2>
Agustin Martin &lt;<A HREF="mailto:agmartin@debian.org">agmartin@debian.org</A>&gt;
<A NAME="lbAH">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright (C) 2004-2013 Agustin Martin &lt;<A HREF="mailto:agmartin@debian.org">agmartin@debian.org</A>&gt;
<P>
This program is free software; you can redistribute it and/or modify
it under the terms of the <FONT SIZE="-1">GNU</FONT> General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="4"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="5"><A HREF="#lbAF">PACKAGE MAINTAINERS</A><DD>
<DT id="6"><A HREF="#lbAG">AUTHORS</A><DD>
<DT id="7"><A HREF="#lbAH">COPYRIGHT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:11 GMT, March 31, 2021
</BODY>
</HTML>