3 # Add to postinst and prerm to register a window manager.
6 use Debian::Debhelper::Dh_Lib;
9 if (! defined $dh{PRIORITY}) {
14 # This is here for backwards compatability. If the filename doesn't
15 # include a path, assume it's in /usr/X11R6/bin.
16 if ($ARGV[0] !~ m:/:) {
17 $ARGV[0]="/usr/X11R6/bin/$ARGV[0]";
21 foreach my $package (@{$dh{DOPACKAGES}}) {
22 # my $tmp=tmpdir($package);
23 my $file=pkgfile($package,"wm");
27 @wm=filearray($file, '.');
30 if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
34 if (@wm && ! $dh{NOSCRIPTS}) {
36 autoscript($package,"postinst","postinst-wm","s:#WM#:$_:;s/#PRIORITY#/$dh{PRIORITY}/",);
37 autoscript($package,"prerm","prerm-wm","s:#WM#:$_:");