InSilicoSpectro Build.PL


InSilicoSpectro documentation Contained in the InSilicoSpectro distribution.

Index


NAME

Top

InSilico Build.PL

SYNOPSIS

Top

For building a distribution:

perl Build.PL
perl Build dist

(version and README are taken from lib/InSilicoSpectro.pm) A InSilicoSpectro-VERSION.tar.gz is ready to be shipped.

For install

perl Build.PL
perl Build
perl Build test
perl Build install

see Actions for more informations

WARNING: use perl Buil ppm to make to ppm dist (and not the standard ppmdist, because for pre-requisite are changed)

DESCRIPTION

Top

Script based on the Module::Build package to make InSilicoSpectro distribution

ARGUMENTS

Top

misc arguments

--help

COMMENTS

Top

To recover this list of used packages throughout the perl files: grep -e '^use ' -h `find . -name \*.p?`| perl -e 'while(<>){ print "".((split)[1])."\n";}' | grep -v strict | grep -v vars | grep -v InSilicoSpectro::| sort -u | sed "s/;//"

COPYRIGHT

Top

AUTHORS

Top

Alexandre Masselot, www.genebio.com


InSilicoSpectro documentation Contained in the InSilicoSpectro distribution.

#!/usr/bin/env perl
use strict;
use English;


BEGIN{
  push @INC, "..";
}

use Module::Build;

my %requires=(
	      'perl' => '5.6.1',
	      'Archive::Zip' => 0,
	      'Archive::Tar' => 0,
	      'Compress::Zlib' => 0,
	      'Digest::MD5' => 0,
	      'Data::Serializer'=>0,
	      'File::Find::Rule' => 0,
	      'File::Temp' => 0,
	      'Getopt::Long' => 0,
	      'GD' => 0,
	      'MIME::Base64' => 0,
	      'XML::Parser' => 0,
	      'XML::SemanticDiff' => '0',
	      'XML::Twig' => '>=3.14',
	     );

if ($OSNAME=~/win/){
  $requires{'File::Glob'};
  $requires{'GDGraph'}=0;
  $requires{'GDTextUtil'}=0;
}else{
  $requires{'GD::Graph'}=0;
  $requires{'GD::Text'}=0;
}

my %recommends=(
		'Statistics::Regression'=>0,
		'Statistics::Basic'=>0,
		'Math::FixedPrecision'=>0,
		'Math::Spline'=>0,
		'Math::Derivative'=>0,
		'AI::NNFlex'=>0,
		'XML::Dumper'=>0,
		'XML::Merge'=>0,
		'XML::Parser::PerlSAX'=>0,
		'Bio::Perl' => 1.4,
	       );

#see PhenyBuild.pm for extra config

my ($help, $man, $verbose);
use Getopt::Long;
use Pod::Usage;
if(!GetOptions(
	       "help"=>\$help,
	       "man"=>\$man,
	       "verbose"=>\$verbose,
	      )
   or $help or $man){
  pod2usage(-verbose=>2, -exitval=>2) if defined $man;
  pod2usage(-verbose=>1, -exitval=>2);
}


use lib qw(../ ./);

my @scripts;
open (fd, "<MANIFEST") or die "cannot open MANIFEST: $!";
while(<fd>){
  chomp;
  push @scripts, $_ if /^(scripts)\//;
}
my %cgi_scripts;
open (fd, "<MANIFEST") or die "cannot open MANIFEST: $!";
while(<fd>){
  chomp;
  $cgi_scripts{$_}=$_ if /^(cgi)\//;
}
close fd;

my $build=Module::Build->new
  ( module_name => 'InSilicoSpectro',
    requires => \%requires,
    recommends => \%recommends,
    dist_version_from => './lib/InSilicoSpectro.pm',
    create_makefile_pl => 'traditional',
    create_readme => 'README',
    license => 'lgpl',
    dist_author => 'Alexandre Masselot <alexandre.masselot@genebio.com>, Jacques Colinge <Jacques.Colinge@fh-hagenberg.at>',
    recursive_test_files=>1,
    script_files=>\@scripts,
    cgi_files=>\%cgi_scripts,
  );

$build->add_build_element('cgi') || die "cannot add build element [cgi]";
$build->add_build_element('xml') || die "cannot add build element [xml]";
$build->prereq_failures() && $build->prereq_failures()->{requires}  && die "conflicts (missing requirem\ents?)";
$build->create_build_script;