X-Git-Url: http://git.jankratochvil.net/?p=macros.git;a=blobdiff_plain;f=AutoGen.pm;h=e2829e5bb8e21d7aa0df5a579546cccf6d747af9;hp=652ac7b1327096f8e35550fab4c33d623080d88b;hb=c652904772920c8fd4463eb271093baccd56921b;hpb=651a872089fa28a165785aa197afe695a487a175;ds=sidebyside diff --git a/AutoGen.pm b/AutoGen.pm index 652ac7b..e2829e5 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", @@ -334,6 +335,7 @@ sub _cleanfiles .deps .libs *.[oa] *.l[oa] *.l[oa]T .cvsignore + pod2htm[di].tmp ./errs* ./intl @@ -399,7 +401,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 +419,7 @@ my($dir)=@_; else { (); } - } _cleanfiles()); + } @cleanfiles); } sub _cvsdirs @@ -490,7 +492,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 +507,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"; @@ -645,20 +647,12 @@ B(1) and similiar tools. This project has some additional features: =over -=item - Clean the checkout directory without Bs for 'make clean'. -=item - Maintain B<.cvsignore> files containing the files being cleaned. -=item - Single-command package building of B<.rpm>/B<.deb> out of CVS checkout. -=item - Supports: B, B, B, B, B. =back @@ -756,9 +750,7 @@ B or B variables of Bs. There are several formats of B field possible entries: -=over - -=item B<./path/to/file.c> +=item B entry: B<./path/to/file.c> Full project-basedir relative path to the deleted file. Rule applies only to the one specified directory. Although B would be also possible @@ -766,18 +758,16 @@ it is not recommended to have unified format with B<./only_basedir.c> entries to delete file just in the root directory (as B would delete it in ALL subdirectories incl. the root one). -=item B +=item B entry: B Delete B found in any subdirectory of the project. It has the same effect as B<./*/basename_generated.c> entry. -=item B<./subdir/*/name.c> +=item B entry: B<./subdir/*/name.c> Delete B in B<./subdir> and all of its subdirector descendants. Entry B would have the same effect. -=back - =item B @@ -824,7 +814,7 @@ This section applies to projects where you patch foreign existing packages. =over -=item +=item Prolog Use the following alternate B prolog if your branch does not belong to the B
CVS branch: @@ -837,12 +827,12 @@ to the B
CVS branch: use lib "./macros/"; use AutoGen; -=item +=item Original archive Put B archive to the project root directory as B. -=item +=item Versioning Set B<$VERSION> in B file with you vendor prefix such as B<1.2.3joe1>. Set B<$VERSION_BASE> to B<1.2.3> and B<$VERSION_EXT> to B. @@ -850,55 +840,31 @@ B() them both. =item B<.spec> file changes -=over - -=item - Change B to B. -=item - Change (expected) line B to B. -=item - Change B to B. -=item - Add line B. This patch file name is not mandatory. -=item - Remember to call B commands manually in the B<%build> section if their source files were modified in your vendor branch. -=back - =item B-specific changes -=over - -=item - Include both B and B to B. -=item - 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 -=back - =head1 AUTHOR Jan Kratochvil >, - I +I