initial.
[grake.git] / Makefile.PL
blob42342d7f0c887e23f8ba22059913e9e0c46170da
1 #!/usr/bin/env perl
3 use warnings;
4 use strict;
6 use ExtUtils::MakeMaker;
8 my $version = find_version();
10 WriteMakefile(
11 'NAME' => 'grake',
12 ( $[ >= 5.8 )
13 ? ( AUTHOR => 'Toni Gundogdu <legatvs@gmail.com>',
14 'ABSTRACT' => 'Scan webpages for Youtube video links',
16 : (),
17 'VERSION' => $version,
18 'EXE_FILES' => ['bin/grake'],
19 'PREREQ_PM' => {
20 'Getopt::ArgvFile' => 1.11, # tested, earlier may work
21 'LWP::UserAgent' => 5.835, # tested, earlier may work
23 'LICENSE' => 'gpl',
24 dist => {
25 COMPRESS => 'bzip2',
26 SUFFIX => '.bz2'
30 sub find_version {
31 my $path = 'bin/grake';
32 open my $fh, "<", $path or die "$path: $!";
33 foreach (<$fh>) {
34 close $fh and return $1
35 if $_ =~ /VERSION = "(.*?)"/;
37 close $fh;
38 die '$path: could not find version string.';