- # 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}});
+ # Generate and install control file.
+ my @command="dpkg-gencontrol";
+ if (getpackages() > 1) {
+ push @command, "-p$package";
+ }
+ if (is_udeb($package)) {
+ push @command, "-n".udeb_filename($package);
+ }
+ doit(@command, "-l$changelog", "-isp", "-Tdebian/${ext}substvars",
+ "-P$tmp",@{$dh{U_PARAMS}});