[svk-commit] r2444 - trunk/pkg
nobody at bestpractical.com
nobody at bestpractical.com
Sun Jul 15 13:03:40 EDT 2007
Author: clkao
Date: Sun Jul 15 13:03:39 2007
New Revision: 2444
Added:
trunk/pkg/maketest
trunk/pkg/svk-wrapper (contents, props changed)
Modified:
trunk/pkg/buildsvk.pl
Log:
Bundle tests and maketest helper.
Modified: trunk/pkg/buildsvk.pl
==============================================================================
--- trunk/pkg/buildsvk.pl (original)
+++ trunk/pkg/buildsvk.pl Sun Jul 15 13:03:39 2007
@@ -38,11 +38,14 @@
if (shift) {
$build->perlmake_install("..");
+ $build->prepare_dist("..");
}
else {
$build->build_module('SVK');
+ $build->prepare_dist(glob($build->build_dir.'/SVK-*'));
}
+
warn 'build finished - '.(time() - $t);
exit 0;
@@ -68,6 +71,10 @@
}
sub build_dir {
+ '/tmp/svk-build/dest';
+}
+
+sub build_base {
'/tmp/svk-build';
}
@@ -92,7 +99,7 @@
my $self = shift;
my $ae = Archive::Extract->new( archive => shift );
- $ae->extract( to => $self->build_dir )
+ $ae->extract( to => $self->build_base )
or die $ae->error;
}
@@ -110,11 +117,10 @@
my ($file) = glob("src/$module-*");
$self->extract($file);
- ($dir) = glob($self->build_dir."/$module-*");
+ ($dir) = glob($self->build_base."/$module-*");
$dir .= "/$subdir" if $subdir;
$self->perlmake_install( $subdir ? "$dir/$subdir" : $dir );
- rmtree [$dir];
}
sub perlmake_install {
@@ -141,6 +147,26 @@
$self->build_dir.'/perl';
}
+sub prepare_dist {
+ my $self = shift;
+ my $toplevel = shift;
+ copy('svk-wrapper' => $self->build_dir."/svk");
+ chmod 0755, $self->build_dir."/svk";
+
+ open my $fh, "$toplevel/MANIFEST" or die $!;
+ while (<$fh>) {
+ chomp;
+ next unless m{^t/};
+ my $file = $_;
+ my (undef, $dir, undef) = File::Spec->splitpath($file);
+ mkpath [ $self->build_dir."/$dir" ];
+ copy($toplevel.'/'.$file => $self->build_dir."/$file");
+ }
+
+ copy('maketest' => $self->build_dir."/maketest");
+ chmod 0755, $self->build_dir."/maketest";
+}
+
package SVK::Build::Win32;
use base 'SVK::Build';
use Cwd 'abs_path';
@@ -150,6 +176,10 @@
'c:/tmp/svk-build';
}
+sub build_base {
+ 'c:/tmp/svk-build';
+}
+
sub perl {
my $self = shift;
[abs_path(File::Spec->catfile($self->build_dir,
@@ -193,3 +223,7 @@
move($_ => File::Spec->catfile($self->build_dir, 'strawberry-perl', 'perl', 'bin'))
for glob($self->build_dir."/svn-win32-1.4.4/bin/*.dll");
}
+
+sub prepare_dist {
+
+}
Added: trunk/pkg/maketest
==============================================================================
--- (empty file)
+++ trunk/pkg/maketest Sun Jul 15 13:03:39 2007
@@ -0,0 +1,10 @@
+#!/bin/sh
+BASE=`readlink $0`
+if [ "x${BASE}" = x ]; then
+ BASE=$0
+fi
+
+BASE=`echo $BASE | sed s/maketest$//`;
+PROVE=`which prove`
+chdir /tmp
+LD_LIBRARY_PATH=${BASE} perl -I${BASE}perl "$PROVE" ${BASE}t
Added: trunk/pkg/svk-wrapper
==============================================================================
--- (empty file)
+++ trunk/pkg/svk-wrapper Sun Jul 15 13:03:39 2007
@@ -0,0 +1,9 @@
+#!/bin/sh
+BASE=`readlink $0`
+if [ "x${BASE}" = x ]; then
+ BASE=$0
+fi
+
+BASE=`echo $BASE | sed s/svk$//`;
+
+LD_LIBRARY_PATH=${BASE} perl -I${BASE}perl ${BASE}bin/svk $@
More information about the svk-commit
mailing list