X-Git-Url: http://git.jankratochvil.net/?p=macros.git;a=blobdiff_plain;f=AutoGen.pm;h=0a533f6a93d856e177c10b5e1258cac20fd420c8;hp=1ebee4386c7d143741e3d269065a0a0202daa229;hb=bb47cd953fb515c8f996a0da784bf3deb3bea461;hpb=e23682c3b17fe67609f5596a96bf90becc548d91 diff --git a/AutoGen.pm b/AutoGen.pm index 1ebee43..0a533f6 100644 --- a/AutoGen.pm +++ b/AutoGen.pm @@ -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", @@ -399,7 +400,7 @@ sub _cleanfiles sub _cleanfilesfordir { -my($dir)=@_; +my($dir,@cleanfiles)=@_; return map({ if (m#^\Q$dir\E/([^/]+)$#) { # this-dir: "./this-dir/file-name.c" @@ -417,7 +418,7 @@ my($dir)=@_; else { (); } - } _cleanfiles()); + } @cleanfiles); } sub _cvsdirs @@ -490,7 +491,7 @@ my($class,%options)=@_; "rpmtest" ,sub { $class->_rpmbuild("sign"=>0); }, "deb" ,sub { $class->_debbuild("sign"=>1); }, "debtest" ,sub { $class->_debbuild("sign"=>0); }, - "cleanfilesfordir=s",sub { print "$_\n" for (_cleanfilesfordir $_[1]); exit 0; }, + "cleanfilesfordir=s",sub { print "$_\n" for (_cleanfilesfordir($_[1],_cleanfiles())); exit 0; }, "dist" ,\$Options{"ARGV_dist"}, "copy!" ,\$Options{"ARGV_copy"}, "clean" ,\$Options{"ARGV_clean"}, @@ -505,7 +506,7 @@ my($class,%options)=@_; } for my $dir (_cvsdirs(".")) { - my @cleanfilesfordir=_cleanfilesfordir $dir; + my @cleanfilesfordir=_cleanfilesfordir $dir,_cleanfiles(); _writefile $dir."/.cvsignore",map("$_\n",@cleanfilesfordir) if !$Options{"ARGV_fullclean"}; _remove "nocheck",\1,map({ _expandclass("$dir/$_"); } grep({ $Options{"ARGV_fullclean"} or $_ ne ".cvsignore"; @@ -886,7 +887,13 @@ Include both B and B to B. =item -Use B<@VERSION_BASE@> in B. +Include B to B field in B. + +=item + +Use B<@VERSION@> in B. Package will be built as +Debian-native package (no I<.diff> file) as the patches are not just for Debian +packages, it is a new package (read: dpkg does not support branch patches). =back