Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: forethought
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 153 lines (136 sloc) 5.169 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
#!/usr/bin/perl -w
use strict;
use warnings;
use File::Find;
use Module::Build;
our $MAJOR = 0; our $MINOR = 74; our $DEV = 13; our $VERSION = sprintf('%0d.%03d' . ($DEV ? (($DEV < 0 ? '' : '_') . '%03d') : ('')), $MAJOR, $MINOR, abs $DEV);
$|++;
my $automated_testing = $ENV{'AUTOMATED_TESTING'}
    || $ENV{'PERL_MM_USE_DEFAULT'};
my $is_developer = ((-d '.git') ? 1 : 0) or ($ENV{'RELEASE_TESTING'} ? 1 : 0);
my @tests;
find \&find_cb, qw[t/10000_by_class/];
my $class = $is_developer ? 'inc::MBX::Developer' : 'Module::Build';

if (!eval "require $class") {
    printf 'Failed to load %s: %s This ain\'t good, so... bye!', $class, $@;
    exit 0;
}
my $mb = $class->new(
    module_name => 'Net::BitTorrent',
    license => 'artistic_2',
    dist_author => 'Sanko Robinson <sanko@cpan.org>',
    dist_abstract => 'BitTorrent peer-to-peer protocol',
    dist_version => $VERSION,
    requires => {
        AnyEvent => 0,
        ##'AnyEvent::Handle::Throttle' => '0.000002004',
        'Bit::Vector' => 7.1,
        'Digest::SHA' => 5.45,
        Exporter => 0,
        'File::Path' => 2.07,
        'File::Spec' => 0,
        Moose => 1.16,
        perl => '5.12.0',
        'Scalar::Util' => 1.19
    },
    build_requires => {
        AnyEvent => 0,
        ##'AnyEvent::Handle::Throttle' => '0.000002004',
        'Bit::Vector' => 7.1,
        'Digest::SHA' => 5.45,
        Exporter => 0,
        'File::Path' => 2.07,
        'File::Spec' => 0,
        ##'File::Temp' => 0,
        'Module::Build' => 0.38,
        Moose => 1.16,
        parent => 0,
        perl => '5.12.0',
        'TAP::Harness' => 3.18,
        'Test::Class' => 0.35,
        'Test::Fatal' => 0,
        ##'Test::Most' => 0,
        ($is_developer
         ? ('CPAN::Meta::Converter' => 0,
            'CPAN::Meta::Validator' => 0,
            JSON => 0,
            'Perl::Tidy' => 0
             )
         : ()
        )
    },
    configure_requires => {'Module::Build' => 0.38},
    test_files => \@tests,
    test_file_exts => ['.t'],
    use_tap_harness => 1,
    tap_harness_args => {
                    jobs => 9,
                    rules => {
                        par => [
                            {seq => '/t/*'},
                            {seq => '/xt/*'},
                            {seq => '/t/10000_by_class/Net/BitTorrent[\._]'},
                            {seq => '/t/10000_by_class/Net/BitTorrent/DHT/*'},
                            '*'
                        ]
                    }
    },
    meta_merge => {
        keywords => [
            qw[BitTorrent torrent protocol p2p swarm], # basic
            qw[BEP03 bencode bdecode], # NB::Protocol::BEP03::Bencode
            qw[]
        ],
        resources => {
            bugtracker => #{
                                                                   #web =>
                'http://github.com/sanko/net-bittorrent/issues',

            #mailto => 'sanko@cpan.org'
            #},
            repository => #{
                                                                   #url =>
                'git://github.com/sanko/net-bittorrent.git',

            #web => 'http://github.com/sanko/net-bittorrent/tree/',
            #type => 'git'
            #},
            ChangeLog => 'http://github.com/sanko/net-bittorrent/commits/',
            homepage => 'http://sankorobinson.com/net-bittorrent/',
            license => #[
                'http://www.perlfoundation.org/artistic_license_2_0'

                #]
        }
    }
);
$mb->notes(automated_testing => $automated_testing ? 1 : 0);
$mb->notes(release_testing => $is_developer);
$mb->notes(test_suite => \@tests);
$mb->notes(gmtime => gmtime);
$mb->create_build_script;
exit 0;

sub find_cb {
    return if -d $_ or -l $_;
    return unless -T $_;
    return unless $_ =~ m[.+\.t$];
    return push @tests, $File::Find::name;
}

=pod

=head1 Author

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

CPAN ID: SANKO

=head1 License and Legal

Copyright (C) 2008-2011 by Sanko Robinson <sanko@cpan.org>

This program is free software; you can redistribute it and/or modify it under
the terms of
L<The Artistic License 2.0|http://www.perlfoundation.org/artistic_license_2_0>.
See the F<LICENSE> file included with this distribution or
L<notes on the Artistic License 2.0|http://www.perlfoundation.org/artistic_2_0_notes>
for clarification.

When separated from the distribution, all original POD documentation is
covered by the
L<Creative Commons Attribution-Share Alike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/us/legalcode>.
See the
L<clarification of the CCA-SA3.0|http://creativecommons.org/licenses/by-sa/3.0/us/>.

Neither this module nor the L<Author|/Author> is affiliated with BitTorrent,
Inc.

=for rcs $Id: Build.PL 7803e40 2010-10-25 21:58:24Z sanko@cpan.org $

=cut
Something went wrong with that request. Please try again.