]> iEval git - app-musicexpo.git/blame - Makefile.PL
Mark optional modules as "recommends"
[app-musicexpo.git] / Makefile.PL
CommitLineData
4d17090e 1use 5.014000;
21cd9240
MG
2use ExtUtils::MakeMaker;
3
ac51e186
MG
4my @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
12sub is_installed {
13 my ($module) = @_;
14 eval "require $module"
15}
16
17my @extra_prereqs;
18
19unless (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
21cd9240 28WriteMakefile(
4d17090e
MG
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' ],
4ad67bfd 34 MIN_PERL_VERSION => 5.014,
4d17090e
MG
35 LICENSE => 'perl',
36 SIGN => 1,
37 PREREQ_PM => {
ac51e186 38 qw/HTML::Template::Compiled 0
4d17090e 39 Memoize 0
ac51e186
MG
40 DB_File 0/,
41 @extra_prereqs
4d17090e
MG
42 },
43 META_MERGE => {
ac51e186 44 dynamic_config => 1,
4d17090e 45 resources => {
4ad67bfd
MG
46 repository => 'http://git.ieval.ro/?p=app-musicexpo.git'
47 },
ac51e186 48 recommends => { @optionals },
4ad67bfd 49 }
21cd9240 50);
This page took 0.03447 seconds and 4 git commands to generate.