Add a "Previous" button to the player
[app-musicexpo.git] / Makefile.PL
index e47de2012029f1a0ebd5b5f55672a235ce2347e5..e5063e7e909b02ad00e79b2e4ec1baef1e22b085 100644 (file)
@@ -1,27 +1,50 @@
-use 5.014;
+use 5.014000;
 use ExtUtils::MakeMaker;
 
+my @optionals = (
+       qw/Audio::FLAC::Header           0
+          Audio::Opusfile               0
+          MP3::Info                     0
+          MP4::Info                     0
+          Ogg::Vorbis::Header::PurePerl 0/,
+);
+
+sub is_installed {
+       my ($module) = @_;
+       eval "require $module"
+}
+
+my @extra_prereqs;
+
+unless (grep \&is_installed, @optionals) {
+       my $answer = '';
+       while (!$answer) {
+               my $yn = lc prompt 'None of the optional dependencies are installed. Install all of them? (default: y) [y/n]', 'y';
+               $answer = $yn if $yn eq 'y' || $yn eq 'n';
+       }
+       @extra_prereqs = @optionals if $answer eq 'y';
+}
+
 WriteMakefile(
-  NAME          => 'App::MusicExpo',
-  VERSION_FROM  => 'lib/App/MusicExpo.pm',
-  PREREQ_PM     => {
-       'Audio::FLAC::Header'           => 0,
-       'HTML::Template::Compiled'      => 0,
-       'Memoize'                       => 0,
-       'MP3::Tag'                      => 1.12,
-       'DB_File'                       => 0,
-       'Ogg::Vorbis::Header::PurePerl' => 0,
-  },
-  MIN_PERL_VERSION => 5.014,
-  SIGN          => 1,
-  EXE_FILES     => [ 'musicexpo' ],
-  LICENSE       => 'perl',
-  ABSTRACT_FROM => 'lib/App/MusicExpo.pm',
-  AUTHOR        => 'Marius Gavrilescu <marius@ieval.ro>',
-  META_MERGE    => {
-       resources   => {
-         repository => 'http://git.ieval.ro/?p=app-musicexpo.git'
+       NAME             => 'App::MusicExpo',
+       VERSION_FROM     => 'lib/App/MusicExpo.pm',
+       ABSTRACT_FROM    => 'lib/App/MusicExpo.pm',
+       AUTHOR           => 'Marius Gavrilescu <marius@ieval.ro>',
+       EXE_FILES        => [ 'musicexpo' ],
+       MIN_PERL_VERSION => 5.014,
+       LICENSE          => 'perl',
+       SIGN             => 1,
+       PREREQ_PM        => {
+               qw/HTML::Template::Compiled      0
+                  Memoize                       0
+                  DB_File                       0/,
+               @extra_prereqs
        },
-       dynamic_config => 0,
-  }
+       META_MERGE         => {
+               dynamic_config => 1,
+               resources      => {
+                       repository => 'http://git.ieval.ro/?p=app-musicexpo.git'
+               },
+               recommends     => { @optionals },
+       }
 );
This page took 0.010432 seconds and 4 git commands to generate.