summaryrefslogtreecommitdiff
path: root/dh_installxaw
blob: 31867f156e67d6a9461a6ee9eb6224d6db4da2cc (plain)
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
#!/usr/bin/perl -w
#
# Integration with xaw-wrappers
#
# If debian/xaw-wrappers file exists, save it to 
# $TMP/usr/lib/xaw-wrappers/conf/$PACKAGE
#
# Also, add calls to postinst and postrm.

BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
use Dh_Lib;
init();

foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
	$TMP=tmpdir($PACKAGE);
	$xaw=pkgfile($PACKAGE,'xaw');

	if ($xaw ne '') {
		if (! -d "$TMP/usr/lib/xaw-wrappers/conf") {
			doit("install","-d","$TMP/usr/lib/xaw-wrappers/conf");
		}
		doit("install","-p","-m644",$xaw,
		     "$TMP/usr/lib/xaw-wrappers/conf/$PACKAGE");

		if (! $dh{NOSCRIPTS}) {
			autoscript($PACKAGE,"postinst","postinst-xaw");
			autoscript($PACKAGE,"postrm","postrm-xaw");
		}
	}
}