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