/usr/bin/dh_installxsp is in dh-xsp 4.2-2build1.
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 | #!/usr/bin/perl -w
=head1 NAME
dh_installxsp - install host files into /etc/xsp/conf.d and
/etc/mono-server/conf.d
=cut
use strict;
use Debian::Debhelper::Dh_Lib;
=head1 SYNOPSIS
B<dh_installxsp> [S<B<debhelper options>>] [B<--name=>I<name>] [B<-V >I<version(s)>]
=head1 DESCRIPTION
dh_installxsp is a debhelper program that will install host
configuration files in /etc/xsp4/conf.d and /etc/mono-server4/conf.d
(for XSP 4). So, if xsp 4 is installed or will be installed, when xsp
starts it automatically starts the daemon with the host file.
The files debian/package.hostxsp4 are used for XSP 4.
In the debian/rules file, dh_installxsp needs to be called before
dh_installdeb to make sure the files are properly marked as conffiles
to avoid the lintian warnings. Otherwise, the files created in /etc/
need to be marked as conffiles.
=head1 OPTIONS
=over 4
=item B<--name=>I<name>
Look for files named debian/package.hostxsp4 and install them as
/etc/xsp4/conf.d/package/hostfile.
=item B<-V >I<version(s)>
Installs the files for XSP 4.0 (B<-V 4>). If this version is not
specified (or just B<-V> is given), this only installed files for
XSP 4.
=back
=cut
# Initialize debhelper
init();
# Figure out what versions we want to install
my ($install_xsp_4) = (1);
my $depname="cli:XspServer";
# Go through the packages in this module and see if we need to install
# each one. This also uses the above variables (install_xsp_*) in each
# pass.
foreach my $package (@{$dh{DOPACKAGES}})
{
# Configure for XSP 4
process_xsp($package, "4") if $install_xsp_4;
}
# This handles the installation of the actual files. This assumes that
# $version has "4" (or "5" at some point) and that determines
# the path being installed into.
sub process_xsp
{
my ($package, $version) = @_;
my $tmp = tmpdir($package);
my $hostfile = pkgfile($package, "hostxsp$version");
# Check to see if we have a host file in the debian/ directory for
# this package.
if ($hostfile)
{
# Make sure we have the dependancies
my $depname = "cli:XspServer$version";
# Delete it for idempotency
delsubstvar($package, $depname);
addsubstvar($package, $depname,
"mono-xsp$version | mono-apache-server$version | mono-fastcgi-server$version");
# Check for the installation directory
for my $d1 (("xsp$version", "mono-server$version"))
{
# Create the top-level directory
if(! -d "$tmp/etc/$d1/conf.d")
{
doit("install", "-d", "$tmp/etc/$d1/conf.d");
}
# Check for the configuration directory for this package
if(! -d "$tmp/etc/$d1/conf.d/" . pkgfilename($package))
{
doit("install", "-d",
"$tmp/etc/$d1/conf.d/" . pkgfilename($package));
}
# Install this into the conf.d/packagename/10_packagename
doit("install",
"-m", 644,
$hostfile,
"$tmp/etc/$d1/conf.d/" . pkgfilename($package)
. "/10_" . pkgfilename($package));
}
# Install the autoscripts for this version
if ($hostfile ne '')
{
if (!$dh{NOSCRIPTS})
{
autoscript($package, "postinst", "postinst-monoxsp$version",
"s/#PACKAGE#/$package/");
autoscript($package, "postrm", "postrm-monoxsp$version",
"s/#PACKAGE#/$package/");
}
}
}
}
=head1 SEE ALSO
L<debhelper(7)>
This program is a part of mono-utils.
=head1 AUTHOR
Originally written by Pablo Fischer <pablo@pablo.com.mx>. Modified by
Dylan R. E. Moonfire <debian@mfgames.com> to handle XSP and XSP 2
installation. Modified by Jo Shields <directhex@apebox.org> to drop XSP
and add XSP 4.
=cut
|