This file is indexed.

/usr/bin/dh_consoledata is in dh-consoledata 0.7.88.

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
#!/usr/bin/perl -w

=head1 NAME

dh_consoledata - declare console data files

=cut

use strict;
use Debian::Debhelper::Dh_Lib;

=head1 SYNOPSIS

  dh_consoledata [debhelper options] [-n]

=head1 DESCRIPTION

This program is meant to assist in building a package that provides
data files for the console.  It is still in the early stages of
developement, and many features are still missing or partly
implemented.  Please look at /usr/share/doc/console-common/TODO for
more details.

For now this program takes a debian/package.keymaps file, installs in
in the package build directory, and creates the debian/package.config
and debian/package.templates files.

It also makes the ${console:depends} variable available for the
control file.  This variable should be referenced in the Depends
field, as should ${perl:depends} if you use dh_perl (which you should
call anyway, since your package will include a perl debconf script).

It should ultimately allow to declare fonts and SFM fallbacks.

=head1 OPTIONS

=over 4

=item B<-n>, B<--noscripts>

Do not modify postinst/postrm scripts.

=item B<-d>

Install the debconf templates and config script (and add the postinst
fragment, unless -n is also specified), even if there is no
debian/package.keymaps file.  This is normally intended for internal
use, be careful that the name of the option and its semantics will
probably change in the near future, to accomodate for new needs.

=back

=cut

init();

if (defined($ENV{DH_LCDDIR})) {
  $::dhdir = $ENV{DH_LCDDIR};
} else {
  $::dhdir = '/usr/share/debhelper/dh-consoledata';
}
$::kmaplistdir = '/usr/share/console/lists/keymaps';
$::lcddep = 'console-common (>= 0.7.88)';

foreach my $package (@{$dh{DOPACKAGES}}) {
  my $tmp = tmpdir($package);
  my $kmaps = pkgfile($package,"keymaps");

  if ($kmaps ne '' or $dh{D_FLAG}) {
    # FIXME: can we check that dh_installdebconf was not run before us ?

    # install keymaps file
    doit ("mkdir", "-p", "$tmp$::kmaplistdir");
    doit ("install", "-m644", $kmaps, "$tmp$::kmaplistdir") if $kmaps ne '';

    # build config file
    my $config = "debian/$package.config";
    doit ("rm", $config) if -r $config;
    complex_doit ("sed <$::dhdir/config.in >$config" .
		  (($kmaps eq '') ? "" : " -e '/^#####KEYMAPS#####\$/ r $kmaps'") .
		  " -e '/^#####COMMON#####\$/ r $::dhdir/common.pl'"
		 );

    # build templates file
    my $templates = "debian/$package.templates";
    doit ("rm", $templates) if -r $templates;
    doit ("cp", "$::dhdir/templates", $templates);

    if (! $dh{NOSCRIPTS}) {
      autoscript($package,"postinst","postinst-lcd-keymaps","s/#PACKAGE#/$package/");
    }

    complex_doit ("echo 'console:depends=$::lcddep' >> debian/substvars");
  }
}


=head1 SEE ALSO

L<debhelper(1)>

This program is an extention to debhelper.

=head1 AUTHOR

Yann Dirson <dirson@debian.org>

=cut