1# $Id: Makefile.PL,v 1.4 2005/03/04 14:17:46 jakob Exp $ 2 3use ExtUtils::MakeMaker; 4 5my @exefiles = ('apps/dnscheck', 'apps/dnscheck-preflight', 'apps/dnscheck-dispatcher', 6 'apps/dnscheck-zonediff', 'apps/dnscheck-12hourmailer', 'apps/dnscheck-hostsyntax'); 7 8WriteMakefile( 9 'NAME' => 'DNSCheck', 10 'AUTHOR' => '.SE (The Internet Infrastructure Foundation) <dnscheck@iis.se>', 11 'ABSTRACT' => 'DNS Quality and Integrity Checker', 12 'VERSION_FROM' => 'lib/DNSCheck.pm', 13 'PREREQ_PM' => { 14 Crypt::OpenSSL::Random => 0, 15 Data::Dumper => 0, 16 Date::Format => 0, 17 Date::Parse => 0, 18 Digest::BubbleBabble => 0, 19 Digest::SHA1 => 0, 20 File::Basename => 0, 21 IO::Socket => 0, 22 IO::Socket::INET6 => 2.51, 23 List::Util => 0, 24 Net::DNS => 0.65, 25 Net::DNS::SEC => 0.15, 26 Net::IP => 1.25, 27 Net::SMTP => 2.29, 28 POSIX => 0, 29 Socket => 0, 30 Socket6 => 0.19, 31 Sys::Syslog => 0, 32 Time::HiRes => 0, 33 YAML => 0, 34 DBI => 0, 35 DBD::mysql => 0, 36 Mail::RFC822::Address => 0, 37 Text::Template => 0, 38 MIME::Lite => 0, 39 }, 40 'EXE_FILES' => \@exefiles, 41 'NO_META' => 1, 42 'SIGN' => 0, 43 clean => { FILES => "*~ apps/dnscheck apps/dnscheck-preflight apps/dnscheck-dispatcher apps/dnscheck-zonediff apps/dnscheck-12hourmailer apps/dnscheck-hostsyntax" }, 44); 45 46sub MY::install { 47 48 package MY; 49 my $self = shift; 50 my $inherited = $self->SUPER::install(@_); 51 52 $inherited =~ s/^(install :: .*)$/$1 install_locale/gm; 53 $inherited; 54} 55 56sub MY::postamble { 57 58 package MY; 59 my $self = shift; 60 61 my $instprefix = $self->{SITEPREFIX}; 62 63 my $tmp = qq# 64 65CONFIG_DIR = $instprefix/share/dnscheck 66POLICY_DIR = $instprefix/share/dnscheck 67LOCALE_DIR = $instprefix/share/dnscheck/locale 68 69# . q# 70 71FIXVARS = \ 72 -Mvars \ 73 -DCONFIG_DIR="$(CONFIG_DIR)" \ 74 -DPOLICY_DIR="$(POLICY_DIR)" \ 75 -DLOCALE_DIR="$(LOCALE_DIR)" 76 77install_locale: 78 install -d ${DESTDIR}/${POLICY_DIR} 79 install -m 444 policy.yaml ${DESTDIR}/${POLICY_DIR} 80 install -m 444 config.yaml ${DESTDIR}/${CONFIG_DIR} 81 install -d ${DESTDIR}/${LOCALE_DIR} 82 install -m 444 locale/*.yaml ${DESTDIR}/${LOCALE_DIR} 83#; 84 85 foreach my $f (@exefiles) { 86 $tmp .= qq[ 87$f: $f.pl 88 \$(PERL) build/preprocessor.pl \$(FIXVARS) -Msharpbang <\$? >\$@ 89 90 ] 91 } 92 93 return $tmp; 94} 95