- # Generate and install control file. Use complex_doit to allow for
- # wild and wonderful U_PARAMS quoting.
- doit("dpkg-gencontrol","-l$changelog","-isp","-p$package",
- "-Tdebian/${ext}substvars","-P$tmp",@{$dh{U_PARAMS}});
+ # avoid gratuitous warning
+ if (! -e $substvars || system("grep -q '^misc:Depends=' $substvars") != 0) {
+ complex_doit("echo misc:Depends= >> $substvars");
+ }
+
+ # Generate and install control file.
+ my @command="dpkg-gencontrol";
+ if (getpackages() > 1) {
+ push @command, "-p$package";
+ }
+ doit(@command, "-l$changelog", "-T$substvars",
+ "-P$tmp",@{$dh{U_PARAMS}});