[Pkg-octave-devel] new forge packages
    Rafael Laboissiere 
    rafael at debian.org
       
    Fri May  9 21:50:48 UTC 2008
    
    
  
* Rafael Laboissiere <rafael at debian.org> [2008-05-09 23:42]:
> * Thomas Weber <thomas.weber.mail at gmail.com> [2008-05-09 22:46]:
> 
> > On 07/05/08 13:11 +0200, Rafael Laboissiere wrote:
> > > * Ólafur Jens Sigurðsson <ojsbug at gmail.com> [2008-05-07 12:28]:
> > > 
> > > > Hi, the following are new in the main repository of the forge, I will
> > > > work on getting them ready to be released in the next few days.
> > > > 
> > > > octave-ann octave-bioinfo octave-data octave-database octave-financial
> > > > octave-ftp octave-ga octave-missing octave-video.
> > > 
> > > Please, do not forget to file ITPs for them.
> > 
> > I will start updating the already released packages over the weekend.
> 
> Great, thanks.
You might be interested in the (sorry, Perl) script attached below.  I use
it for generating the SVN tag directory automatically.  After uploading the
package, I run it from the top-level diretory of the package (where it can
find the debian/changelog file).
The script accepts a --dry-run option that shows the commands that will be
run, without actually running them.
 
-- 
Rafael
-------------- next part --------------
#!/usr/bin/perl
use Getopt::Long;
(my $prog = $0) =~ s:.*/::;
my $pkgname;
my $version;
my $isnative;
my $dry_run = 0;
GetOptions ("dry-run"  => \$dry_run,
            "help" => \$help);
if ($help) {
  print "FIXME\n";
  exit 0;
}
die "Usage: $prog [build-dir]\n"
  if $#ARGV > 1;
my $buildir = $#ARGV == 0 ? $ARGV [0] : ".";
my $debdir = "$buildir/debian";
die "$prog:E: Directory $debdir does not exist"
  if not -d $debdir;
open (CHGLOG, "< $debdir/changelog")
  or die "$prog:E: Cannot open $debdir/changelog";
while (<CHGLOG>) {
  if (/^(\S+) \(([^)]+)\)/) {
    $pkgname = $1
      if not defined $pkgname;
    $version = $2;
    $isnative = not ($version =~ /-/);
    last;
  }
}
close CHGLOG;
my $commitdir = $isnative ? "." : "debian";
open (SVNINFO, "svn info $commitdir |")
  or die "$prog:E: Cannot get SVN info in directory $commitdir";
my $url;
while (<SVNINFO>) {
  if (/^URL: (.*)/) {
    $url = $1;
    last;
  }
}
close SVNINFO;
$isnative or $url =~ m {(.*)/debian$}
  or die qq {$prog:E: URL $url does not end with "/debian"};
my $trunkurl = $url;
$trunkurl =~ m {(.*)/trunk}
  or die qq {$prog:E: URL $url does not contain with "/trunk"};
my $baseurl = $1;
my $tagsurl = "$baseurl/tags";
sub run {
  my $cmd = shift;
  print "\n$cmd\n";
  system $cmd if not $dry_run;
}
system ("svn list $tagsurl 2>&1 > /dev/null") == 0
  or run qq {svn mkdir $tagsurl --message="Created tags dir"};
run qq {svn ci --message="Debian release ${pkgname}_$version" $commitdir};
run ("svn cp $trunkurl $tagsurl/$version"
     . qq { --message="Tag Debian release ${pkgname}_$version"});
    
    
More information about the Pkg-octave-devel
mailing list