X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FInstallationCheck.pm;h=947be97d107e1e1a5b3dce1412ad0047feb4c684;hb=4268b3d512c4d970c5735fb18d5a62f00a345597;hp=3100ac67f0f5d4061ab65d4bdaebbb61ccc64381;hpb=25ff204a5b0bc6e4615014a25b91782b85aa3005;p=kivitendo-erp.git diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index 3100ac67f..947be97d1 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -8,24 +8,36 @@ use vars qw(@required_modules @optional_modules @developer_modules); use strict; BEGIN { +# name: the name of the module if you install it with cpan +# version: the minimum version required to run. optional +# url: web path to the author page of the module +# debian: dpkg package name for debianoid distos +# note: (suse) (fedora) (redhat) entries welcome if you +# are willing to maintain them +# dist_name: name of the package in cpan if it differs from name (ex.: LWP != libwww-perl) @required_modules = ( { name => "parent", url => "http://search.cpan.org/~corion/", debian => 'libparent-perl' }, { name => "Archive::Zip", version => '1.16', url => "http://search.cpan.org/~adamk/", debian => 'libarchive-zip-perl' }, + { name => "Clone", url => "http://search.cpan.org/~rdf/", debian => 'libclone-perl' }, { name => "Config::Std", url => "http://search.cpan.org/~dconway/", debian => 'libconfig-std-perl' }, { name => "DateTime", url => "http://search.cpan.org/~drolsky/", debian => 'libdatetime-perl' }, { name => "DBI", version => '1.50', url => "http://search.cpan.org/~timb/", debian => 'libdbi-perl' }, - { name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/", debian => 'libdbd-pg' }, + { name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/", debian => 'libdbd-pg-perl' }, { name => "Email::Address", url => "http://search.cpan.org/~rjbs/", debian => 'libemail-address-perl' }, - { name => "FCGI", url => "http://search.cpan.org/~mstrout/", debian => 'libfcgi-perl' }, + { name => "Email::MIME", url => "http://search.cpan.org/~rjbs/", debian => 'libemail-mime-perl' }, + { name => "FCGI", version => '0.72', url => "http://search.cpan.org/~mstrout/", debian => 'libfcgi-perl' }, + { name => "File::Copy::Recursive", url => "http://search.cpan.org/~dmuey/", debian => 'libfile-copy-recursive-perl' }, { name => "JSON", url => "http://search.cpan.org/~makamaka", debian => 'libjson-perl' }, { name => "List::MoreUtils", version => '0.21', url => "http://search.cpan.org/~vparseval/", debian => 'liblist-moreutils-perl' }, { name => "Params::Validate", url => "http://search.cpan.org/~drolsky/", debian => 'libparams-validate-perl' }, { name => "PDF::API2", version => '2.000', url => "http://search.cpan.org/~areibens/", debian => 'libpdf-api2-perl' }, { name => "Rose::Object", url => "http://search.cpan.org/~jsiracusa/", debian => 'librose-object-perl' }, { name => "Rose::DB", url => "http://search.cpan.org/~jsiracusa/", debian => 'librose-db-perl' }, - { name => "Rose::DB::Object", url => "http://search.cpan.org/~jsiracusa/", debian => 'librose-db-object-perl' }, + { name => "Rose::DB::Object", version => 0.788, url => "http://search.cpan.org/~jsiracusa/", debian => 'librose-db-object-perl' }, { name => "String::ShellQuote", version => 1.01, url => "http://search.cpan.org/~rosch/", debian => 'libstring-shellquote-perl' }, { name => "Sort::Naturally", url => "http://search.cpan.org/~sburke/", debian => 'libsort-naturally-perl' }, + # Test::Harness is core, so no Debian packages. Test::Harness 3.00 was first packaged in 5.10.1 + { name => "Test::Harness", version => '3.00', url => "http://search.cpan.org/~petdance/", }, { name => "Template", version => '2.18', url => "http://search.cpan.org/~abw/", debian => 'libtemplate-perl' }, { name => "Text::CSV_XS", version => '0.23', url => "http://search.cpan.org/~hmbrand/", debian => 'libtext-csv-xs-perl' }, { name => "Text::Iconv", version => '1.2', url => "http://search.cpan.org/~mpiotr/", debian => 'libtext-iconv-perl' }, @@ -36,12 +48,25 @@ BEGIN { @optional_modules = ( { name => "Digest::SHA", url => "http://search.cpan.org/~mshelor/", debian => 'libdigest-sha-perl' }, + { name => "IO::Socket::SSL", url => "http://search.cpan.org/~sullr/", debian => 'libio-socket-ssl-perl' }, + { name => "Net::LDAP", url => "http://search.cpan.org/~gbarr/", debian => 'libnet-ldap-perl' }, + # Net::SMTP is core since 5.7.3 + { name => "Net::SMTP::SSL", url => "http://search.cpan.org/~cwest/", debian => 'libnet-smtp-ssl-perl' }, + { name => "Net::SSLGlue", url => "http://search.cpan.org/~sullr/", debian => 'libnet-sslglue-perl' }, ); @developer_modules = ( + { name => "DBIx::Log4perl", url => "http://search.cpan.org/~mjevans/", }, { name => "Devel::REPL", url => "http://search.cpan.org/~doy/", debian => 'libdevel-repl-perl' }, + { name => "Log::Log4perl", url => "http://search.cpan.org/~mschilli/", debian => 'liblog-log4perl-perl' }, + { name => "LWP::Simple", url => "http://search.cpan.org/~gaas/", debian => 'libwww-perl', dist_name => 'libwww-perl' }, { name => "Moose::Role", url => "http://search.cpan.org/~doy/", debian => 'libmoose-role-perl' }, { name => "Perl::Tags", url => "http://search.cpan.org/~osfameron/", debian => 'libperl-tags-perl' }, + { name => "Test::Deep", url => "http://search.cpan.org/~rjbs/", debian => 'libtest-deep-perl' }, + { name => "Test::Exception", url => "http://search.cpan.org/~adie/", debian => 'libtest-exception-perl' }, + { name => "Test::Output", url => "http://search.cpan.org/~bdfoy/", debian => 'libtest-output-perl' }, + { name => "URI::Find", url => "http://search.cpan.org/~mschwern/", debian => 'liburi-find-perl' }, + { name => "GD", version => '2.00', url => "http://search.cpan.org/~lds/", debian => 'libgd-perl' }, ); $_->{fullname} = join ' ', grep $_, @$_{qw(name version)} @@ -53,7 +78,7 @@ sub module_available { my $module = $_[0]; my $version = $_[1] || '' ; - my $got = eval "use $module $version; 1"; + my $got = eval "use $module $version (); 1"; if ($got) { return ($got, $module->VERSION); @@ -97,7 +122,7 @@ my %conditional_dependencies; sub check_for_conditional_dependencies { return if $conditional_dependencies{net_ldap}++; - push @required_modules, { 'name' => 'Net::LDAP', 'url' => 'http://search.cpan.org/~gbarr/' } + push @required_modules, grep { $_->{name} eq 'Net::LDAP' } @optional_modules if $::lx_office_conf{authentication} && ($::lx_office_conf{authentication}->{module} eq 'LDAP'); }