3 # Add to postinst and postrm to register a window manager.
5 use Debian::Debhelper::Dh_Lib;
8 if (! defined $dh{PRIORITY}) {
13 # This is here for backwards comatability. If the filename doesn't
14 # include a path, assume it's in /usr/X11R6/bin.
15 if ($ARGV[0] !~ m:/:) {
16 $ARGV[0]="/usr/X11R6/$ARGV[0]";
20 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
21 # $TMP=tmpdir($PACKAGE);
22 $file=pkgfile($PACKAGE,"wm");
28 if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
32 if (@wm && ! $dh{NOSCRIPTS}) {
34 autoscript($PACKAGE,"postinst","postinst-wm","s:#WM#:$_:;s/#PRIORITY#/$dh{PRIORITY}/",);
35 autoscript($PACKAGE,"postrm","postrm-wm","s:#WM#:$_:");