Fixed building of Debian-native packages without any 'orig-*' archive.
[macros.git] / AutoGen.pm
index 652ac7b..09e2744 100644 (file)
@@ -296,6 +296,7 @@ my($class,%args)=@_;
                @subdirs=glob $glob;
                confess "Invalid glob $glob: ".join(",",@subdirs) if 1!=@subdirs;
                }
+       $base||=$subdirs[0];
        rename $subdirs[0],$base or confess "$!";
        _system(join(" ","cd ".$base.";dpkg-buildpackage",
                        "-rfakeroot",