aspell-autobuildhash

Langue: en

Version: 2009-4-23 (debian - 07/07/09)

Section: 8 (Commandes administrateur)

NAME

aspell-autobuildhash - Autobuilding aspell hash files for some dicts

SYNOPSIS

  aspell-autobuildhash [--force]
 
    Options:
     --debug      Show extra info about aspell-autobuildhash internal
                  work. Will also enable aspell affix validation.
     --force      Rebuild the hash file for all dicts providing a
                  compat file skipping the test.
 
 

DESCRIPTION

aspell-autobuildhash 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.

OPTIONS

  --debug      Show some extra information about aspell-autobuildhash
               internal work. Will also enable aspell affix validation.
  --force      Rebuild the hash file for all dicts providing a compat
               file regardless of the compatibility levels found.
 
 

PACKAGE MAINTAINERS

To use this system, just provide a $lang.compat file in /var/lib/aspell ($lang stands for the lang basename with variant if any, e.g. gl-minimos or en). Put a ``0'' in it or just create an empty one with touch.

Wordlists should previously be compressed either with gzip (and their extensions set as .mwl.gz or .wl.gz) or preferably first with aspell prezip and then gzipped (with .cwl.gz extension). This applies both for plain wordlists and munched wordlists (in the ispell way) if you use affix compression.

If your package will provide a single hash, install prezipped+gzipped wordlist as /usr/share/aspell/$lang.cwl.gz or, if prezip is not used, as /usr/share/aspell/$lang.mwl.gz.

If your package will provide more than one aspell hash for the same $lang, you will need to place each compressed wordlist as e.g. /usr/share/aspell/$subdict.cwl.gz, and the common $lang.compat as above. Then create a /usr/share/aspell/$lang.contents file with the base names of the subdicts, one in a line. For English that will contain, amongst other possible lines

  en-common
  en-variant_0
  en-variant_1
  en-variant_2
  en_CA-w_accents-only
 
 

No need to use this file if a single hash is being created.

Dictionaries-common scripts will call internally this script and create a single hash file at /var/lib/ispell/$lang.rws, or hash files at /var/lib/ispell/$subdict.rws. You must set a symlink to that files from /usr/lib/aspell/$lang.rws or /usr/lib/aspell/$subdict.rws as appropriate. You are also suggested to create empty files at /var/lib/aspell/$lang.rws or for all of the /var/lib/aspell/$subdict.rws in the install target of your package build process. This empty file will be overwritten when the real hash is created, but will make the hash be removed at package removal without any magic being done in the postrm and will also help to keep track about which package owns that file.

If you use debhelper you may want to pass -Xvar/lib/aspell option to dh_md5sums call in your debian/rules file, to avoid debsums complaining about those hash and compat files.

aspell maintainer should also call this script from package postinst. When comparing versions it will get the aspell version from file /usr/share/aspell/aspell.compat.

AUTHORS

Agustin Martin <agmartin@debian.org>