[Pkg-mono-svn-commits] rev 555 - xsp-snapshot/trunk/debian/official

Pablo Fischer pabl0-guest@haydn.debian.org
Sun, 11 Apr 2004 11:47:56 -0600


Author: pabl0-guest
Date: 2004-04-11 11:47:53 -0600 (Sun, 11 Apr 2004)
New Revision: 555

Added:
   xsp-snapshot/trunk/debian/official/dh_installxsp
Log:
debhelper scripts that 'helps' developers to install 
host configuration files in /etc/xsp and /etc/mono-server 
with just having a package.hostxsp :-)



Added: xsp-snapshot/trunk/debian/official/dh_installxsp
===================================================================
--- xsp-snapshot/trunk/debian/official/dh_installxsp	2004-04-11 14:11:00 UTC (rev 554)
+++ xsp-snapshot/trunk/debian/official/dh_installxsp	2004-04-11 17:47:53 UTC (rev 555)
@@ -0,0 +1,72 @@
+#!/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>]
+
+=head1 DESCRIPTION
+
+dh_installxsp is a debhelper program that will install host configuration
+files in /etc/xsp/conf.d and /etc/monoserver/conf.d. So, if xsp is 
+install or will be installed, when xsp starts it automatically starts 
+the daemon with the host file. The files debian/package.hostxsp are installed.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--name=>I<name>
+
+Look for files named debian/package.hostxsp and install them as
+/etc/xsp/conf.d/package/hostfile.
+
+=back
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+	my $tmp=tmpdir($package);
+	my $hostfile=pkgfile($package,"hostxsp");
+	if ($hostfile) {
+	    if( ! -d "$tmp/etc/xsp/conf.d" ) {
+		doit("install","-d","$tmp/etc/xsp/conf.d");
+	    }
+	    if( ! -d "$tmp/etx/xsp/conf.d/".pkgfilename($package)) {
+		doit("install","-d","$tmp/etc/xsp/conf.d/".pkgfilename($package));
+	    }
+	    doit("install",$hostfile,"$tmp/etc/xsp/conf.d/".pkgfilename($package)."/10_".pkgfilename($package));
+
+	    if( ! -d "$tmp/etc/mono-server/conf.d" ) {
+		doit("install","-d","$tmp/etc/mono-server/conf.d");
+	    }
+	    if( ! -d "$tmp/etx/mono-server/conf.d/".pkgfilename($package)) {
+		doit("install","-d","$tmp/etc/mono-server/conf.d/".pkgfilename($package));
+	    }
+	    
+	    doit("install",$hostfile,"$tmp/etc/mono-server/conf.d/".pkgfilename($package)."/10_".pkgfilename($package));
+	}	
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Pablo Fischer <pablo@pablo.com.mx>
+
+=cut


Property changes on: xsp-snapshot/trunk/debian/official/dh_installxsp
___________________________________________________________________
Name: svn:executable
   + *