Alien::SamTools - Fetch/build/stash the SamTools headers and libs.
version 0.002
By way of an example, the following change to the Build.PL file in the Bio-SamTools-1.39 distribution provides it with the information it needs to find the headers and library that Alien::SamTools installed.
Build.PL
Bio-SamTools-1.39
=================================================================== RCS file: Build.PL,v retrieving revision 1.1 diff -r1.1 Build.PL 4a5 > use Module::Load::Conditional qw(can_load); 69a71,76 > sub _samtools { > $ENV{SAMTOOLS} || > ( can_load(modules => {'Alien::SamTools' => undef, 'File::ShareDir' => undef}) && > File::ShareDir::dist_dir('Alien-SamTools')); > } > 73c80 < if (my $samtools = $ENV{SAMTOOLS}) { --- > if (my $samtools = _samtools()) {
Download, build, and install the SamTools C headers and libraries into a well-known location, File::ShareDir::dist_dir('Alien-SamTools'), from whence other packages can make use of them.
File::ShareDir::dist_dir('Alien-SamTools')
It currently installs samtools-0.1.19.tar.bz2.
George Hartzell
This software is copyright (c) 2014 by Genentech.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Alien::SamTools, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alien::SamTools
CPAN shell
perl -MCPAN -e shell install Alien::SamTools
For more information on module installation, please visit the detailed CPAN module installation guide.