1use ExtUtils::MakeMaker; 2use Config; 3use strict; 4 5my @programs_to_install = qw(mp3info2 typeset_audio_dir audio_rename); 6 7my $lib_only = (grep /^LIB=/, @ARGV and not grep /^INSTALLSCRIPT=/, @ARGV); 8my @scr = grep /^INSTALLSCRIPT=/, @ARGV; 9(my $scr = pop @scr) =~ s/^INSTALLSCRIPT=//; 10$scr = $Config{installscript} unless defined $scr; 11 12if ( grep $_ eq '-n', @ARGV or $lib_only ) { 13 @ARGV = grep $_ ne '-n', @ARGV; 14 warn "I see LIB= but not no INSTALLSCRIPT=\n" if $lib_only; 15 warn "Skipping installation of scripts...\n"; 16 @programs_to_install = (); 17} else { 18 warn <<EOW; 19 20This program comes with several scripts which I would try to install in 21directory $scr. 22 23To skip, rerun with option -n given to Makefile.PL. 24 25EOW 26} 27 28# See lib/ExtUtils/MakeMaker.pm for details of how to influence 29# the contents of the Makefile that is written. 30WriteMakefile( 31 'NAME' => 'MP3::Tag', 32 'VERSION_FROM' => 'lib/MP3/Tag.pm', # finds $VERSION 33 'EXE_FILES' => [ map "examples/$_", @programs_to_install ], 34# 'PMLIBDIRS' => ['Tag', 'MP3::Tag'], 35 'AUTHOR' => '"Thomas Geffert" <thg@users.sourceforge.net>, "Ilya Zakharevich" ilyaz@cpan.org', 36 'PREREQ_PM' => { 37 # Compress::Zlib => 0, 38 }, 39 'PL_FILES' => {'data_pod.PL'=>'lib/MP3/Tag/ID3v2_Data.pod'}, 40 # 'clean' => {FILES => 'ID3v2_Data.pod'}, # is included! 41); 42 43# Tell MakeMaker about manifying ID3v2_Data.pod 44package MY; 45sub manifypods { 46 my $self = shift; 47 $self->{MAN3PODS}->{'lib/MP3/Tag/ID3v2_Data.pod'} = '$(INST_MAN3DIR)/MP3::Tag::ID3v2_Data.$(MAN3EXT)'; 48 $self->SUPER::manifypods(@_); 49} 50 51sub postamble { # Not good enough: is done after .pod is moved to INST_LIB... 52 ' 53lib/MP3/Tag/ID3v2_Data.pod :: lib/MP3/Tag/ID3v2.pm # pm_to_blib 54 55'; 56} 57