Directory for Apache and Zebra logs produced by Koha.
+=item PAZPAR2_CONF_DIR
+
+Directory for PazPar2 configuration files.
+
=item NONE
This is a dummy target used to explicitly state
'./edithelp.pl' => 'INTRANET_CGI_DIR',
'./etc' => { target => 'KOHA_CONF_DIR', trimdir => -1 },
'./etc/zebradb' => { target => 'ZEBRA_CONF_DIR', trimdir => -1 },
+ './etc/pazpar2' => { target => 'PAZPAR2_CONF_DIR', trimdir => -1 },
'./help.pl' => 'INTRANET_CGI_DIR',
'./installer-CPAN.pl' => 'NONE',
'./installer' => 'INTRANET_CGI_DIR',
'./MANIFEST.SKIP' => 'NONE',
'./members' => 'INTRANET_CGI_DIR',
'./misc' => { target => 'SCRIPT_DIR', trimdir => -1 },
- './misc/info' => { target => 'DOC_DIR', trimdir => 2 },
- './misc/release notes' => { target => 'DOC_DIR', trimdir => 2 },
+ './misc/bin' => { target => 'SCRIPT_DIR', trimdir => -1 },
+ './misc/release_notes' => { target => 'DOC_DIR', trimdir => 2 },
'./misc/translator' => { target => 'MISC_DIR', trimdir => 2 },
+ './misc/koha-install-log' => { target => 'MISC_DIR', trimdir => -1 },
'./misc/installer_devel_notes' => 'NONE',
'./opac' => 'OPAC_CGI_DIR',
'./README.txt' => 'NONE',
'DB_USER' => 'kohaadmin',
'DB_PASS' => 'katikoan',
'INSTALL_ZEBRA' => 'yes',
+ 'INSTALL_SRU' => 'yes',
+ 'INSTALL_PAZPAR2' => 'no',
+ 'AUTH_INDEX_MODE' => 'grs1',
'ZEBRA_MARC_FORMAT' => 'marc21',
'ZEBRA_LANGUAGE' => 'en',
'ZEBRA_USER' => 'kohauser',
'ZEBRA_PASS' => 'zebrastripes',
+ 'ZEBRA_SRU_HOST' => 'localhost',
+ 'ZEBRA_SRU_BIBLIOS_PORT' => '9998',
+ 'ZEBRA_SRU_AUTHORITIES_PORT' => '9999',
'KOHA_USER' => 'koha',
'KOHA_GROUP' => 'koha',
+ 'MERGE_SERVER_HOST' => 'localhost',
+ 'MERGE_SERVER_PORT' => '11001',
+ 'PAZPAR2_HOST' => 'localhost',
+ 'PAZPAR2_PORT' => '11002',
);
# set some default configuratio options based on OS
'INSTALL_MODE' => { 'standard' => 1, 'single' => 1, 'dev' => 1 },
'DB_TYPE' => { 'mysql' => 1, 'Pg' => 1 },
'INSTALL_ZEBRA' => { 'yes' => 1, 'no' => 1 },
+ 'INSTALL_SRU' => { 'yes' => 1, 'no' => 1 },
+ 'AUTH_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 },
'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation
'ZEBRA_LANGUAGE' => { 'en' => 1, 'fr' => 1 }, # FIXME should generate from contents of distribution
);
my $pl_files = {
'rewrite-config.PL' => [
'blib/KOHA_CONF_DIR/koha-conf.xml',
- 'blib/KOHA_CONF_DIR/koha-httpd.conf'
+ 'blib/KOHA_CONF_DIR/koha-httpd.conf',
+ 'blib/MISC_DIR/koha-install-log'
],
'fix-perl-path.PL' => [ # this script ensures the correct shebang line for the platform installed on...
'blib'
push @{ $pl_files->{'rewrite-config.PL'} }, (
'blib/ZEBRA_CONF_DIR/etc/passwd',
'blib/ZEBRA_CONF_DIR/zebra-biblios.cfg',
- 'blib/ZEBRA_CONF_DIR/zebra-authorities.cfg'
+ 'blib/ZEBRA_CONF_DIR/zebra-authorities.cfg',
+ 'blib/ZEBRA_CONF_DIR/zebra-authorities-dom.cfg',
+ 'blib/ZEBRA_CONF_DIR/explain-authorities.xml',
+ 'blib/ZEBRA_CONF_DIR/explain-biblios.xml',
+ 'blib/ZEBRA_CONF_DIR/retrieval-info-auth-grs1.xml',
+ 'blib/ZEBRA_CONF_DIR/retrieval-info-auth-dom.xml',
);
+ if ($config{'INSTALL_MODE'} ne 'dev') {
+ push @{ $pl_files->{'rewrite-config.PL'} }, (
+ 'blib/SCRIPT_DIR/koha-zebra-ctl.sh',
+ 'blib/SCRIPT_DIR/koha-pazpar2-ctl.sh',
+ 'blib/SCRIPT_DIR/koha-zebraqueue-ctl.sh',
+ );
+ }
+ if ($config{'INSTALL_PAZPAR2'} eq 'yes') {
+ push @{ $pl_files->{'rewrite-config.PL'} }, (
+ 'blib/PAZPAR2_CONF_DIR/koha-biblios.xml',
+ 'blib/PAZPAR2_CONF_DIR/pazpar2.xml'
+ );
+ }
+ $config{'ZEBRA_AUTH_CFG'} = $config{'AUTH_INDEX_MODE'} eq 'dom' ? 'zebra-authorities-dom.cfg' : 'zebra-authorities.cfg';
+ $config{'AUTH_RETRIEVAL_CFG'} =
+ $config{'AUTH_INDEX_MODE'} eq 'dom' ? 'retrieval-info-auth-dom.xml' : 'retrieval-info-auth-grs1.xml';
}
if ($config{'INSTALL_MODE'} ne "dev") {
AUTHOR => 'Koha Developers <koha-devel@nongnu.org>',
NO_META => 1,
PREREQ_PM => {
-'Algorithm::CheckDigits' => 0.48,
+# awaiting package maintainer's use of $VERSION
+#'Algorithm::CheckDigits' => 0.48,
+#'Algorithm::CheckDigits::M43_001' => 0.48,
'Biblio::EndnoteStyle' => 0.05,
'CGI' => 3.15,
'CGI::Carp' => 1.29,
'CGI::Session' => '4.10',
-'Class::Factory::Util' => 1.7,
+'Class::Factory::Util' => 1.6,
'Class::Accessor' => 0.30,
-'DBD::mysql' => 3.0008,
+'DBD::mysql' => 4.004,
'DBI' => 1.53,
'Data::ICal' => 0.13,
'Data::Dumper' => 2.121_08,
'LWP::UserAgent' => 2.033,
'Lingua::Stem' => 0.82,
'List::Util' => 1.18,
-'List::MoreUtils' => 0.22,
+'List::MoreUtils' => 0.21,
'Locale::Language' => 2.07,
'MARC::Charset' => 0.98,
'MARC::Crosswalk::DublinCore' => 0.02,
'MIME::Base64' => 3.07,
'MIME::QuotedPrint' => 3.07,
'Mail::Sendmail' => 0.79,
-'Net::LDAP' => 0.34,
-'Net::LDAP::Filter' => 0.34,
+'Net::LDAP' => 0.33,
+'Net::LDAP::Filter' => 0.14,
'Net::Z3950::ZOOM' => 1.16,
'PDF::API2' => 2.000,
'PDF::API2::Page' => 2.000,
'Test::More' => 0.62,
'Text::CSV' => 0.01,
'Text::CSV_XS' => 0.32,
+'Text::Iconv' => 1.7,
'Text::Wrap' => 2005.082401,
'Time::HiRes' => 1.86,
'Time::localtime' => 1.02,
'Unicode::Normalize' => 0.32,
'XML::Dumper' => 0.81,
'XML::LibXML' => 1.59,
-'XML::LibXSLT' => 1.63,
+'XML::LibXSLT' => 1.59,
'XML::SAX::ParserFactory' => 1.01,
'XML::Simple' => 2.14,
'XML::RSS' => 1.31,
+'YAML::Syck' => 0.71,
},
# File tree mapping
}
}
-=head2 get_configuration_options
+=head2 get_configuration
This prompts the user for various configuration options.
Primary language for Zebra indexing);
$msg .= _add_valid_values_disp('ZEBRA_LANGUAGE', $valid_values);
$config{'ZEBRA_LANGUAGE'} = _get_value('ZEBRA_LANGUAGE', $msg, $defaults->{'ZEBRA_LANGUAGE'}, $valid_values);
-
+
+ $msg = q(
+Koha can use one of two different indexing modes
+for the MARC authorities records:
+
+grs1 - uses the Zebra GRS-1 filter, available
+ for legacy support
+dom - uses the DOM XML filter; offers improved
+ functionality.
+
+Authorities indexing mode);
+ $msg .= _add_valid_values_disp('AUTH_INDEX_MODE', $valid_values);
+ $config{'AUTH_INDEX_MODE'} = _get_value('AUTH_INDEX_MODE', $msg, $defaults->{'AUTH_INDEX_MODE'}, $valid_values);
+
$msg = q(
Please specify Zebra database user);
$config{'ZEBRA_USER'} = _get_value('ZEBRA_USER', $msg, $defaults->{'ZEBRA_USER'}, $valid_values);
Please specify the Zebra database password);
$config{'ZEBRA_PASS'} = _get_value('ZEBRA_PASS', $msg, $defaults->{'ZEBRA_PASS'}, $valid_values);
+ $msg = q(
+Since you've chosen to use Zebra, you can enable the SRU/
+Z39.50 Server if you so choose, but you must specify a
+few configuration options for it.
+
+Please note that if you choose *NOT* to configure SRU,
+koha-conf.xml will still contain some references to SRU
+settings. Those references will be ignored by Koha.
+
+Install the SRU configuration files?);
+ $msg .= _add_valid_values_disp('INSTALL_SRU', $valid_values);
+ $config{'INSTALL_SRU'} = _get_value('INSTALL_SRU', $msg, $defaults->{'INSTALL_SRU'}, $valid_values);
+
+ if ($config{'INSTALL_SRU'} eq 'yes') {
+ $msg = q(
+Since you've chosen to configure SRU, you must
+specify the host and port(s) that the SRU
+Servers (bibliographic and authority) should run on.
+);
+ $msg = q(
+SRU Database host?);
+ $config{'ZEBRA_SRU_HOST'} = _get_value('ZEBRA_SRU_HOST', $msg, $defaults->{'ZEBRA_SRU_HOST'}, $valid_values);
+
+ $msg = q(
+SRU port for bibliographic data?);
+ $config{'ZEBRA_SRU_BIBLIOS_PORT'} = _get_value('ZEBRA_SRU_BIBLIOS_PORT', $msg, $defaults->{'ZEBRA_SRU_BIBLIOS_PORT'}, $valid_values);
+
+ $msg = q(
+SRU port for authority data?);
+ $config{'ZEBRA_SRU_AUTHORITIES_PORT'} = _get_value('ZEBRA_SRU_AUTHORITIES_PORT', $msg, $defaults->{'ZEBRA_SRU_AUTHORITIES_PORT'}, $valid_values);
+
+ }
+
+ $msg = q(
+Since you've chosen to use Zebra, you can also choose to
+install PazPar2, which is a metasearch tool. With PazPar2,
+Koha can perform on-the-fly merging of bibliographic
+records during searching, allowing for FRBRization of
+the results list.
+
+Install the PazPar2 configuration files?);
+ $msg .= _add_valid_values_disp('INSTALL_PAZPAR2', $valid_values);
+ $config{'INSTALL_PAZPAR2'} = _get_value('INSTALL_PAZPAR2', $msg, $defaults->{'INSTALL_PAZPAR2'}, $valid_values);
+
+ if ($config{'INSTALL_PAZPAR2'} eq 'yes') {
+ $msg = q(
+Since you've chosen to configure PazPar2, you must
+specify the host and port(s) that PazPar2
+uses:
+);
+ $msg = q(
+Zebra bibliographic server host?);
+ $config{'MERGE_SERVER_HOST'} = _get_value('MERGE_SERVER_HOST', $msg, $defaults->{'MERGE_SERVER_HOST'}, $valid_values);
+
+ $msg = q(
+Zebra bibliographic port for PazPar2 to use?);
+ $config{'MERGE_SERVER_PORT'} = _get_value('MERGE_SERVER_PORT', $msg, $defaults->{'MERGE_SERVER_PORT'}, $valid_values);
+
+ $msg = q(
+PazPar2 host?);
+ $config{'PAZPAR2_HOST'} = _get_value('PAZPAR2_HOST', $msg, $defaults->{'PAZPAR2_HOST'}, $valid_values);
+
+ $msg = q(
+PazPar2 port?);
+ $config{'PAZPAR2_PORT'} = _get_value('PAZPAR2_PORT', $msg, $defaults->{'PAZPAR2_PORT'}, $valid_values);
+
+ }
}
print "\n\n";
+
+ # add version number
+ my $version = "no_version_found";
+ eval {
+ require 'kohaversion.pl';
+ $version = kohaversion();
+ };
+ $config{'KOHA_INSTALLED_VERSION'} = $version;
+
return %config;
}
$dirmap{'PERL_MODULE_DIR'} = File::Spec->catdir(@basedir, $package, 'lib');
$dirmap{'KOHA_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc');
$dirmap{'ZEBRA_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc', 'zebradb');
+ $dirmap{'PAZPAR2_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc', 'pazpar2');
$dirmap{'MISC_DIR'} = File::Spec->catdir(@basedir, $package, 'misc');
$dirmap{'SCRIPT_DIR'} = File::Spec->catdir(@basedir, $package, 'bin');
$dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man');
$skipdirs{'INTRANET_TMPL_DIR'} = 1;
$dirmap{'INTRANET_WWW_DIR'} = File::Spec->catdir($curdir, 'koha-tmpl');
$skipdirs{'INTRANET_WWW_DIR'} = 1;
- $dirmap{'OPAC_CGI_DIR'} = File::Spec->catdir($curdir, 'opac');
+ $dirmap{'OPAC_CGI_DIR'} = File::Spec->catdir($curdir);
$skipdirs{'OPAC_CGI_DIR'} = 1;
$dirmap{'OPAC_TMPL_DIR'} = File::Spec->catdir($curdir, 'koha-tmpl', 'opac-tmpl');
$skipdirs{'OPAC_TMPL_DIR'} = 1;
$skipdirs{'PERL_MODULE_DIR'} = 1;
$dirmap{'KOHA_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc');
$dirmap{'ZEBRA_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc', 'zebradb');
+ $dirmap{'PAZPAR2_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc', 'pazpar2');
$dirmap{'MISC_DIR'} = File::Spec->catdir(@basedir, $package, 'misc');
$dirmap{'SCRIPT_DIR'} = File::Spec->catdir(@basedir, $package, 'bin');
$skipdirs{'SCRIPT_DIR'} = 1;
$dirmap{'PERL_MODULE_DIR'} = File::Spec->catdir(@basedir, $package, 'lib');
$dirmap{'KOHA_CONF_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'etc', $package);
$dirmap{'ZEBRA_CONF_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'etc', $package, 'zebradb');
+ $dirmap{'PAZPAR2_CONF_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'etc', $package, 'pazpar2');
$dirmap{'MISC_DIR'} = File::Spec->catdir(@basedir, $package, 'misc');
$dirmap{'SCRIPT_DIR'} = File::Spec->catdir(@basedir, $package, 'bin');
$dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man');
my $self = shift;
my $test = $self->SUPER::test(@_);
$test =~ s!\$\(INST_LIB\)!blib/PERL_MODULE_DIR!g;
+
+ # set KOHA_CONF
+ $test =~ s!\$\(FULLPERLRUN\)!KOHA_CONF=blib/KOHA_CONF_DIR/koha-conf.xml \$(FULLPERLRUN)!g;
return $test;
}
# installation and uninstallation targets.
# If installation is on Win32, we need to do permissions different from *nix
- if ( $^O =~ /linux|cygwin/ ) { # this value needs to be verified for each platform and modified accordingly
+ if ( $^O =~ /darwin|linux|cygwin|freebsd/ ) { # this value needs to be verified for each platform and modified accordingly
foreach my $key (sort keys %$target_directories) {
$install .= qq(
KOHA_INST_$key = blib/$key
unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
}
}
- $install .= "\t\t\$(INST_MAN1DIR) \$(DESTINSTALLMAN1DIR) \\\n";
- $install .= "\t\t\$(INST_MAN3DIR) \$(DESTINSTALLMAN3DIR)\n";
-
$install .= "\n";
$install .= "warn_koha_env_vars ::\n";
$install .= "\t\$(NOECHO) \$(ECHO) For other post-installation tasks, please consult the README.\n";
$install .= "\t\$(NOECHO) \$(ECHO)\n";
+ if ($config{'INSTALL_ZEBRA'} eq "yes") {
+ $install .= _update_zebra_conf_target();
+ }
+
return $install;
}
+=head 2 _update_zebra_conf_target
+
+Add an installation target for updating
+Zebra's configuration files.
+
+=cut
+
+sub _update_zebra_conf_target {
+
+ my $target = "\nupdate_zebra_conf ::\n";
+ $target .= "\tumask 022; \$(MOD_INSTALL) \\\n";
+ $target .= "\t\t\$(KOHA_INST_ZEBRA_CONF_DIR) \$(KOHA_DEST_ZEBRA_CONF_DIR) \n";
+ $target .= "\t\$(NOECHO) chmod -R u+w \$(KOHA_DEST_ZEBRA_CONF_DIR)\n" unless $^O eq "MSWin32";
+ $target .= "\tumask 022; \$(MOD_INSTALL) \\\n";
+ $target .= "\t\t\$(KOHA_INST_PAZPAR2_CONF_DIR) \$(KOHA_DEST_PAZPAR2_CONF_DIR) \n";
+ $target .= "\t\$(NOECHO) chmod -R u+w \$(KOHA_DEST_PAZPAR2_CONF_DIR)\n" unless $^O eq "MSWin32";
+
+ return $target;
+}
+
sub postamble {
# put directory mappings into Makefile
# so that Make will export as environment
# quote '$' in the two password parameters
my %config = %config;
$config{'DB_PASS'} =~ s/\$/\$\$/g;
- $config{'ZEBRA_PASS'} =~ s/\$/\$\$/g;
+ if ($config{'INSTALL_ZEBRA'} eq "yes") {
+ $config{'ZEBRA_PASS'} =~ s/\$/\$\$/g;
+ }
# Hereagain, we must alter syntax per platform...
if ( $^O eq 'MSWin32' ) {