| 1 | package Enbld::Definition::Git; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use parent qw/Enbld::Definition/; | ||
| 7 | |||
| 8 | sub initialize { | ||
| 9 | my $self = shift; | ||
| 10 | |||
| 11 | $self->SUPER::initialize; | ||
| 12 | |||
| 13 | $self->{defined}{IndexSite} = | ||
| 14 | 'http://code.google.com/p/git-core/downloads/list?num=1000&start=0'; | ||
| 15 | $self->{defined}{ArchiveName} = 'git'; | ||
| 16 | $self->{defined}{WebSite} = 'http://git-scm.com'; | ||
| 17 | $self->{defined}{VersionForm} = '1\.\d\.\d{1,2}(\.\d{1,2})?'; | ||
| 18 | $self->{defined}{DownloadSite} = | ||
| 19 | 'http://git-core.googlecode.com/files/'; | ||
| 20 | |||
| 21 | $self->{defined}{IndexParserForm} = \&set_index_parser_form; | ||
| 22 | |||
| 23 | $self->{defined}{AdditionalArgument} = '--without-tcltk'; | ||
| 24 | |||
| 25 | $self->{defined}{TestAction} = 'test'; | ||
| 26 | |||
| 27 | return $self; | ||
| 28 | } | ||
| 29 | |||
| 30 | sub set_index_parser_form { | ||
| 31 | my $attributes = shift; | ||
| 32 | |||
| 33 | my $filename_form = quotemeta( $attributes->ArchiveName ) . '-' . | ||
| 34 | $attributes->VersionForm . '\.' . | ||
| 35 | quotemeta( $attributes->Extension ); | ||
| 36 | |||
| 37 | my $index_parser_form = 'name=' . $filename_form . '&'; | ||
| 38 | |||
| 39 | return $index_parser_form; | ||
| 40 | } | ||
| 41 | |||
| 42 | 1; | ||
| 43 | |||
| 44 | =pod | ||
| 45 | |||
| 46 | =head1 NAME | ||
| 47 | |||
| 48 | Enbld::Definition::Git - definition module for git | ||
| 49 | |||
| 50 | =head1 SEE ALSO | ||
| 51 | |||
| 52 | L<git|http://git-scm.com> | ||
| 53 | |||
| 54 | L<Enbld::Definition> | ||
| 55 | |||
| 56 | =head1 COPYRIGHT | ||
| 57 | |||
| 58 | copyright 2013- Magnolia C<< <magnolia.k@me.com> >>. | ||
| 59 | |||
| 60 | =head1 LICENSE | ||
| 61 | |||
| 62 | This is free software; you can redistribute it and/or modify it under | ||
| 63 | the same terms as the Perl 5 programming language system itself. | ||
| 64 | |||
| 65 | =cut |