]>
Commit | Line | Data |
---|---|---|
1 | use 5.014000; | |
2 | use ExtUtils::MakeMaker; | |
3 | ||
4 | my @optionals = ( | |
5 | qw/Audio::FLAC::Header 0 | |
6 | Audio::Opusfile 0 | |
7 | MP3::Info 0 | |
8 | MP4::Info 0 | |
9 | Ogg::Vorbis::Header::PurePerl 0/, | |
10 | ); | |
11 | ||
12 | sub is_installed { | |
13 | my ($module) = @_; | |
14 | eval "require $module" | |
15 | } | |
16 | ||
17 | my @extra_prereqs; | |
18 | ||
19 | unless (grep \&is_installed, @optionals) { | |
20 | my $answer = ''; | |
21 | while (!$answer) { | |
22 | my $yn = lc prompt 'None of the optional dependencies are installed. Install all of them? (default: y) [y/n]', 'y'; | |
23 | $answer = $yn if $yn eq 'y' || $yn eq 'n'; | |
24 | } | |
25 | @extra_prereqs = @optionals if $answer eq 'y'; | |
26 | } | |
27 | ||
28 | WriteMakefile( | |
29 | NAME => 'App::MusicExpo', | |
30 | VERSION_FROM => 'lib/App/MusicExpo.pm', | |
31 | ABSTRACT_FROM => 'lib/App/MusicExpo.pm', | |
32 | AUTHOR => 'Marius Gavrilescu <marius@ieval.ro>', | |
33 | EXE_FILES => [ 'musicexpo' ], | |
34 | MIN_PERL_VERSION => 5.014, | |
35 | LICENSE => 'perl', | |
36 | SIGN => 1, | |
37 | PREREQ_PM => { | |
38 | qw/HTML::Template::Compiled 0 | |
39 | Memoize 0 | |
40 | DB_File 0/, | |
41 | @extra_prereqs | |
42 | }, | |
43 | META_MERGE => { | |
44 | dynamic_config => 1, | |
45 | resources => { | |
46 | repository => 'http://git.ieval.ro/?p=app-musicexpo.git' | |
47 | }, | |
48 | recommends => { @optionals }, | |
49 | } | |
50 | ); |