]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_gencontrol
r1805: releasing version 5.0.0
[debhelper.git] / dh_gencontrol
index fcb91845a6957e8caf64c6ad6c651db7346e0349..7614fa696d2ca6fbcc93c5e8ad3f5f2d0096e946 100755 (executable)
@@ -53,19 +53,26 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        }
 
        # Generate and install control file.
-       doit("dpkg-gencontrol","-l$changelog","-isp","-p$package",
-                    "-Tdebian/${ext}substvars", "-P$tmp",@{$dh{U_PARAMS}});
+       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}});
 
        # This chmod is only necessary if the user sets the umask to
        # something odd.
        doit("chmod","644","$tmp/DEBIAN/control");
        
-       doit("chown","0.0","$tmp/DEBIAN/control");
+       doit("chown","0:0","$tmp/DEBIAN/control");
 }
 
 =head1 SEE ALSO
 
-L<debhelper(1)>
+L<debhelper(7)>
 
 This program is a part of debhelper.