Permalink
Browse files

using "gembuild" script if gem: 1

  • Loading branch information...
1 parent dcbe668 commit fc4380c2c1f0b199455ab221298870e31319e6e3 Erik Bourget committed Apr 30, 2012
Showing with 28 additions and 10 deletions.
  1. +7 −0 root/usr/share/multipkg/scripts/gembuild
  2. +21 −10 source/lib/Seco/Multipkg.pm
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+GEMDIR=$(gem environment gemdir)
+mkdir -p $DESTDIR/$GEMDIR/gems/$PACKAGENAME-$PACKAGEVERSION
+cp -a * $DESTDIR/$GEMDIR/gems/$PACKAGENAME-$PACKAGEVERSION
+
+
@@ -500,15 +500,26 @@ sub build {
$self->infomsg("Building source");
- # FATAL ON ERRORS
- $self->runcmd( "PERL=$perl INSTALLROOT=$destdir DESTDIR=$destdir "
- . "PREFIX=$prefix PKGVERID="
- . $self->pkgverid . " "
- . "PACKAGEVERSION=" . $self->info->data->{version} . " "
- . "PACKAGENAME=" . $self->info->data->{name} . " "
- . $self->info->scripts->{build} );
- # return $self->error("Error running: $@") if($@);
-
+ if($self->info->data->{gem} and
+ $self->info->scripts->{gembuild}) {
+ # FATAL ON ERRORS
+ $self->runcmd( "PERL=$perl INSTALLROOT=$destdir DESTDIR=$destdir "
+ . "PREFIX=$prefix PKGVERID="
+ . $self->pkgverid . " "
+ . "PACKAGEVERSION=" . $self->info->data->{version} . " "
+ . "PACKAGENAME=" . $self->info->data->{name} . " "
+ . $self->info->scripts->{build} );
+ return $self->error("Error running: $@") if($@);
+ } else {
+ # FATAL ON ERRORS
+ $self->runcmd( "PERL=$perl INSTALLROOT=$destdir DESTDIR=$destdir "
+ . "PREFIX=$prefix PKGVERID="
+ . $self->pkgverid . " "
+ . "PACKAGEVERSION=" . $self->info->data->{version} . " "
+ . "PACKAGENAME=" . $self->info->data->{name} . " "
+ . $self->info->scripts->{build} );
+ return $self->error("Error running: $@") if($@);
+ }
chdir $self->cwd;
}
@@ -1248,7 +1259,7 @@ sub _init {
$finaldata->{$k} = $self->overrides->{$k};
}
- $finaldata->{author} = 'm10n-prod-eng@yahoo-inc.com'
+ $finaldata->{author} = 'nobody@null'
unless ( defined( $finaldata->{author} ) );
$finaldata->{url} = $finaldata->{srcurl}

0 comments on commit fc4380c

Please sign in to comment.