[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SVN builds ?

On Fri, Oct 03, 2003 at 05:27:52PM +0200, Sven Luther wrote:

> What do you use to build packages directly out of the SVN repository (i
> think Ralf proposed something such some time back), and what is the

I build packages directly in my copy of the svn repository. The attached
script does this, you just launch it in the directory that contains
both your debian directory and the orig.tar.gz tarball. For me
that is in the trunk directory of the package but I have seen
that you use a different layout for ocaml.

Cheers -Ralf.

# opkg-buildpackage, Version 0.1.1 (October 3, 2003)
# Ralf Treinen <treinen@debian.org>
# simple perl script to build a debian package following the pkg-ocaml-maint
# structure of original source tarball and separate debian dir containing
# the patches.

# get package name and version from debian/changelog
open(CHL, "debian/changelog") || die "cannot open debian/changelog.\n";
    last unless /^\s*$/;
close CHL;
($package,$version) = m/^\s*([a-z0-9\+\-\.]*)\s*\(([0-9\+\-\.]*)\).*$/;
$version =~ s/\-[^\-]*$//;
$topdir = "$package-$version";
$origtar = "$package" . "_" . "$version.orig.tar.gz";

# get the name of the directory containing the orig sources
open(TARLIST, "tar tvfz $origtar |");
($unpackdir) = (<TARLIST> =~ m/([^\s]*)\/\s*$/);
close TARLIST;

# unpack
system "rm -rf $topdir $unpackdir";
system "tar xfz $origtar";
rename($unpackdir, $topdir) unless $topdir eq $unpackdir;
system "tar cf - --exclude .svn debian | (cd $topdir; tar xf -)";

# compile
chdir $topdir;
system "dpkg-buildpackage -rfakeroot -uc -us -i.svn";

Reply to: