This file is indexed.

/usr/bin/installdeb-ispell is in dictionaries-common-dev 1.27.2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
#!/usr/bin/perl -w
#
# Registration with ispell dictionary

use strict;

my $class = "ispell";
my $program = "installdeb-$class";
my $debug;

# =======================================================
# Main part
# =======================================================

use Text::Wrap;
$Text::Wrap::columns = 72;

use Debian::Debhelper::Dh_Lib;
use Debian::DictionariesCommon q(:all);
use Devel::DictionariesCommon q(:all);

if ( "$class" eq "wordlist" or "$class" eq "ispell" ){
  init( options => { 'write-elanguages'  => \$dh{WRITE_ELANGUAGES},
		     'no-elanguages'     => \$dh{DISABLE_ELANGUAGES},
		     'no-pre-post'       => \$dh{DISABLE_PREPOST},
		     'no-installdebconf' => \$dh{NO_INSTALLDEBCONF}
		   });
} elsif ( $class eq "aspell" ){
  init(options => { 'aspell-simple' => \$dh{ASPELL_SIMPLE} });
} else {
  init();
}

if ( $dh{NOSCRIPTS} ){
  $dh{DISABLE_PREPOST}++;
  $dh{NO_INSTALLDEBCONF}++;
};

delete $dh{WRITE_ELANGUAGES} if ( $dh{DISABLE_ELANGUAGES} );

foreach my $package (@{$dh{DOPACKAGES}}) {
  my $lib_dir       = tmpdir($package) . getlibdir($class);
  my $usr_lib_dir   = tmpdir($package) . "/usr/lib/$class";
  my $var_lib_dir   = tmpdir($package) . "/var/lib/$class";
  my $usr_share_dir = tmpdir($package) . "/usr/share/$class";
  my %options       = ('class'         => $class,
		       'program'       => $program,
		       'package'       => $package,
		       'lib_dir'       => $lib_dir,
		       'usr_lib_dir'   => $usr_lib_dir,
		       'var_lib_dir'   => $var_lib_dir,
		       'usr_share_dir' => $usr_share_dir
		      );

  # "cdbs" snippets call installdeb-* scripts unconditionally in
  # case there is something for them.
  # Do not trigger an error if not found, just try next one.
  my $dicts = dico_process_infofile(\%options)
    or next;

  #

  # Install debhelper and debhelper-like auto-scripts
  unless ( $dh{NOSCRIPTS} or $dh{DISABLE_PREPOST}) {

    # Install normal autoscripts. While called earlier than autocompat
    # autoscripts, will be placed later in maintainer scripts.
    autoscript ($package, "postinst", "postinst-$class",
		"s/#PACKAGE#/$package/");
    autoscript ($package, "postrm", "postrm-$class",
		"s/#PACKAGE#/$package/");

    if ( $class eq "ispell" || $class eq "aspell" ){
      my %hash_extension   = ("ispell" => "hash", "aspell" => "rws");
      my $autocompat_info  = dico_process_autocompat($dicts,\%options);

      #

      if ( %{$autocompat_info->{'auto-compat'}} ){
	verbose_print("$program info:");
	if ( defined  $autocompat_info->{'auto-contents'}
	     && %{$autocompat_info->{'auto-contents'}} ){
	  verbose_print(" auto-contents: \"",join(', ',sort keys %{$autocompat_info->{'auto-contents'}}),"\"");
	}
	verbose_print(" auto-compat: \"",join(', ',sort keys %{$autocompat_info->{'auto-compat'}}),"\"");
	verbose_print(" auto-hash: \"",  join(', ',sort keys %{$autocompat_info->{'auto-hash'}}), "\"");
      }

      # Install autocompat autoscripts
      if ( %{$autocompat_info->{'auto-compat'}} ){
	dico_install_autocompat($autocompat_info,\%options);
      }
    }

    # Populate substvars $class:Depends
    dico_populate_substvars(\%options);
  }
  # -- Handle debconf stuff for this package
  unless ( $dh{NOSCRIPTS} ){
    dico_create_debconf_files($class,$package,$dicts);
    dico_installcleandebconf($package) unless ( $dh{NO_INSTALLDEBCONF} )
  }
  #
}


__END__

=head1 NAME

B<installdeb-ispell> - debhelper-like utility for
maintainers of ispell dictionary Debian packages

=head1 SYNOPSIS

 installdeb-ispell [debhelper options] [options]

=head1 DESCRIPTION

B<installdeb-ispell> is a debhelper like program that is
responsible for installing appropriate debconf config and templates
files and debhelper snippets in
an ispell dictionary package,
according to the Debian Spell Dictionaries and Tools Policy.

For more details, see
 /usr/share/doc/dictionaries-common-dev/dsdt-policy.txt.gz

The actions executed by B<installdeb-ispell> are the
following:

=over

=item * Maintainer Scripts

B<installdeb-ispell> installs the necessary
scraps of code in the F<postinst> and F<postrm> scripts.

=item * Language info file

B<installdeb-ispell> also checks a file containing
ispell dictionary information, called
F<debian/info-ispell> or
F<debian/package.info-ispell>.  If this file is
successfully parsed, it is installed in the
F</var/lib/dictionaries-common/ispell> directory.

=item * Substvars substitutions

This script will populate a F<substvars> file, so Depends line in
control file can contain
${ispell:Depends} to
automatically care for dictionaries-common dependencies.

This requires C<Build-Depends> on at least dictionaries-common-dev
1.23.0 and is highly recommended.

=item * Debconf files

=over

=item o templates and config files

B<installdeb-ispell> installs the Policy compliant
Debconf files from the information contained in the
F<info-ispell> file.  These files are created as
F<debian/config> (or F<debian/package.config>) and F<debian/templates>
(or F<debian/package.templates>).  No intervention is needed here,
since B<installdeb-ispell> will make a call to
dh_installdebconf(1).

If the package needs to have special code in the F<config> file, the maintainer
should supply files called F<debian/config.in> (or
F<debian/package.config.in>). In the F<config.in> file, the string
C<#DEBHELPER#> must appear alone in one line and start at the first
column.  B<installdeb-ispell> will replace that
token with the necessary Policy compliant code (this works with
F<config.in> is either a Bourne shell or Perl script).

If the package needs to define its own questions via the F<templates>
file the maintainer should either supply files F<debian/po-master.templates>
(or F<debian/package.po-master.templates>) together with the appropriate
po files if the package handles template localization through po-debconf,
or F<debian/templates.in> (or F<debian/package.templates.in>) otherwise.
See the po-debconf(7) manual page for more details and remember that the
master templates name is now different.

The templates defined in the F<templates.in> or F<po-master.templates> files
are merged into the Policy compliant templates by
installdeb-ispell and a call to dh_installdebconf(1)
is internally done.

=item o The elanguages template field

This field is useful if you want to override the debconf languages string
with something different (since the master string remains the same, this
will not trigger a new debconf call) or if you really think that the
languages string should be internationalized for your package. Note that
for most packages the poor man default localization should be enough, and
translators should have another priorities.

installdeb-ispell default behavior is not adding an
C<elanguages> field to the templates file. If you want it added you have
to call the script with the explicit B<--write-elanguages> option.

This field will be added with value taken from the C<Elanguage> entry in
the info file if present, or after the C<Language> value otherwise. Note
that this is useful only if:

=over

=item - You want to fix a buggy entry

In this case just fill the C<Elanguage> field in the info file with the
new value. This will be shown at the debconf prompt.

=item - You want to fully internationalize your entries

In this case some black magic is needed at first time for smooth use,

=over

=item (a) Run B<installdeb-{ispell,wordlist} --no-installdebconf --write-elanguages> for
      every package whose string should be internationalized. Edit the
      created F<.templates> files and remove the leading underscores in
      the elanguages entry if present.

=item (b) Run B<debconf-gettextize templates_to_be_internationalized>.
      Check that all the desired F<.templates> files are in
      F<debian/po/POTFILES.in> and remove old F<.config> and
      F<.templates> files.

=item (c) Run again B<installdeb-{ispell,wordlist} --no-installdebconf --write-elanguages> and
      B<debconf-updatepo> (no edit here) to remove references to
      non-translatable strings. Check that the desired strings are in the po
      master file (F<debian/po/templates.pot>) and remove F<.config> and
      F<.templates> files. You are done. If the master C<Elanguages> string
      is changed, repeat (c) afterward.

=back

=back

=back



=item * Extra installdeb-ispell options in Language info file

For benefit of ispell dictionaries using B<ispell-autobuildhash>,
B<installdeb-ispell> script will look for C<'auto-compat'> fields in
F<$dict.info-ispell>, containing base name(s) of your compat file(s).
If C<'auto-compat'> entry is found two debhelper snippets are added,
one to create/reset compatfile(s) in postinst and the other to remove
files in a removal list from postrm.
Removal list will contain compat file(s) and associated hash(es) with
the same basename.

F</usr/lib/ispell/$dict.hash -E<gt> /var/lib/ispell/$dict.hash>
symlinks are no longer created automatically by this script.
They are now created by new ispell-autobuildhash together with the
relevant hashes.
Make sure to depend on at least dictionaries-common 1.23
(See F<dictionaries-common.checklist>). 

=back

=head1 OPTIONS

The usual dephelper(1) options are accepted. Options below are specific
to B<installdeb-ispell>

=over

=item B<--no-installdebconf>

Do not run B<dh_installdebconf> nor remove templates and config file.

=item B<--no-pre-post>

Do not install {pre,post}{inst,rm} snippets.

=item B<--write-elanguages>

Create the elanguages stuff.

=item B<--debug>

Show some extra info.

=back


=head1 NOTES

This program is not part of debhelper, although it is intended to be used
in ispell dictionary packages using debhelper in its
building.

=head1 SEE ALSO

debhelper(1),
dictionaries-common.checklist,
dsdt-policy.txt

This program is part of the dictionaries-common-dev package. It is
intended to be used by maintainers of
ispell dictionary
packages for Debian. See the documentation
under /usr/share/doc/dictionaries-common-dev.

=head1 AUTHORS

Rafael Laboissiere, Agustin Martin

=cut

# Local Variables:
#  mode: perl
#  mode: flyspell-prog
#  ispell-local-dictionary: "american"
# End:

#  LocalWords:  aspell ispell wordlist debconf debhelper Debian config postrm
#  LocalWords:  debian elanguages installdeb dephelper installdebconf Elanguage
#  LocalWords:  Laboissiere