summaryrefslogtreecommitdiff
path: root/dh_installmodules
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 05:12:07 +0000
committerjoey <joey>1999-08-17 05:12:07 +0000
commit430dd853a0827cf0419d2531cf163d4c1e19c4f9 (patch)
treeae457262f779a02c68718788b46c4c5bf7038626 /dh_installmodules
parent540263202bcd5666ba65cd40e8587fdc9d48109a (diff)
downloaddebhelper-430dd853a0827cf0419d2531cf163d4c1e19c4f9.tar.gz
r189: Initial revision
Diffstat (limited to 'dh_installmodules')
-rwxr-xr-xdh_installmodules28
1 files changed, 28 insertions, 0 deletions
diff --git a/dh_installmodules b/dh_installmodules
new file mode 100755
index 00000000..264ae9c0
--- /dev/null
+++ b/dh_installmodules
@@ -0,0 +1,28 @@
+#!/usr/bin/perl -w
+#
+# Register modules with modutils.
+
+BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+use Dh_Lib;
+init();
+
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ $file=pkgfile($PACKAGE,"modules");
+
+ if (! -e $TMP) {
+ doit("install","-d",$TMP);
+ }
+
+ if ($file) {
+ if (! -e "$TMP/etc/modutils") {
+ doit("install","-d","$TMP/etc/modutils");
+ doit("cp","-m0644",$file,"$TMP/etc/modutils/$PACKAGE");
+ }
+
+ if (! $dh{NOSCRIPTS}) {
+ autoscript($PACKAGE,"postinst","postinst-modules","s/#PACKAGE#/$PACKAGE/");
+ autoscript($PACKAGE,"postrm","postrm-modules","s/#PACKAGE#/$PACKAGE/");
+ }
+ }
+}