[Bps-public-commit] Shipwright branch, master, updated. 514c9974dd6709310d7b9241e63a5c6747c37c9f
? sunnavy
sunnavy at bestpractical.com
Thu May 10 13:44:06 EDT 2012
The branch, master has been updated
via 514c9974dd6709310d7b9241e63a5c6747c37c9f (commit)
from 1742a640a26b6f761c7353edabea7aa8f9e70bdb (commit)
Summary of changes:
lib/Shipwright/Script/Import.pm | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 514c9974dd6709310d7b9241e63a5c6747c37c9f
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri May 11 01:43:46 2012 +0800
default build script for perl source
diff --git a/lib/Shipwright/Script/Import.pm b/lib/Shipwright/Script/Import.pm
index 0ed2978..22053ff 100644
--- a/lib/Shipwright/Script/Import.pm
+++ b/lib/Shipwright/Script/Import.pm
@@ -414,8 +414,20 @@ sub _generate_build {
my $script_dir = shift;
my $shipwright = shift;
+ my ($name) = $source_dir =~ /([-\w.]+)$/;
+
my @commands;
- if ( -f catfile( $source_dir, 'Build.PL' ) ) {
+ if ( $name eq 'perl' ) {
+ $self->log->info( 'detected perl source' );
+ @commands = (
+ 'configure: sh Configure -de -Dprefix=%%INSTALL_BASE%%',
+ 'make: %%MAKE%%',
+ 'test: %%MAKE%% test',
+ 'install: %%MAKE%% install',
+ 'clean: %%MAKE%% clean'
+ );
+ }
+ elsif ( -f catfile( $source_dir, 'Build.PL' ) ) {
$self->log->info( 'detected Module::Build build system' );
@commands = (
'configure: %%PERL%% %%MODULE_BUILD_BEFORE_BUILD_PL%% Build.PL --install_base=%%INSTALL_BASE%% --install_path lib=%%INSTALL_BASE%%/lib/perl5 --install_path arch=%%INSTALL_BASE%%/lib/perl5',
@@ -456,7 +468,6 @@ sub _generate_build {
);
}
else {
- my ($name) = $source_dir =~ /([-\w.]+)$/;
$self->log->warn(<<EOF);
unknown build system for this dist; you MUST manually edit /scripts/$name/build
or provide a build.pl file or this dist will not be built!
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list