#
# This file is part of Koha.
#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
#
# Current maintainer MJR http://mjr.towers.org.uk/
#
=item ZEBRA_LOCK_DIR
-Directory for Zebra's lock files.
+Directory for Zebra's lock files. This includes subdirs for authorities,
+biblios, and the zebra rebuild function. Any activity to reindex
+zebra from koha should interlock here with rebuild_zebra.pl.
=item ZEBRA_DATA_DIR
Directory for PazPar2 configuration files.
+=item FONT_DIR
+
+Directory where DejaVu fonts are installed.
+
=item NONE
This is a dummy target used to explicitly state
'./installer' => 'INTRANET_CGI_DIR',
'./errors' => {target => 'INTRANET_CGI_DIR'},
'./Koha' => 'PERL_MODULE_DIR',
+ './Koha.pm' => 'PERL_MODULE_DIR',
'./koha-tmpl/intranet-tmpl' => {target => 'INTRANET_TMPL_DIR', trimdir => -1},
'./koha-tmpl/opac-tmpl' => {target => 'OPAC_TMPL_DIR', trimdir => -1},
- './kohaversion.pl' => 'INTRANET_CGI_DIR',
+ './kohaversion.pl' => 'INTRANET_CGI_DIR',
'./labels' => 'INTRANET_CGI_DIR',
'./mainpage.pl' => 'INTRANET_CGI_DIR',
'./Makefile.PL' => 'NONE',
'./reviews' => 'INTRANET_CGI_DIR',
'./rewrite-config.PL' => 'NONE',
'./reviews' => 'INTRANET_CGI_DIR',
+ './rotating_collections' => 'INTRANET_CGI_DIR',
'./serials' => 'INTRANET_CGI_DIR',
'./services' => 'INTRANET_CGI_DIR',
'./skel' => 'NONE',
'./skel/var/lib/koha/zebradb/biblios/register' => { target => 'ZEBRA_DATA_DIR', trimdir => 6 },
'./skel/var/lib/koha/zebradb/biblios/shadow' => { target => 'ZEBRA_DATA_DIR', trimdir => 6 },
'./skel/var/lib/koha/zebradb/biblios/tmp' => { target => 'ZEBRA_DATA_DIR', trimdir => 6 },
+ './skel/var/lock/koha/zebradb/rebuild' => { target => 'ZEBRA_LOCK_DIR', trimdir => 6 },
'./skel/var/lib/koha/plugins' => { target => 'PLUGINS_DIR', trimdir => 6 },
'./sms' => 'INTRANET_CGI_DIR',
'./suggestion' => 'INTRANET_CGI_DIR',
Pasword of DMBS user account for Koha's database.
-=item INSTALL_ZEBRA
-
-Whether to install Zebra configuration files and data
-directories.
-
=item ZEBRA_MARC_FORMAT
Specifies format of MARC records to be indexed by Zebra.
'DB_NAME' => 'koha',
'DB_USER' => 'kohaadmin',
'DB_PASS' => 'katikoan',
- 'INSTALL_ZEBRA' => 'yes',
'INSTALL_SRU' => 'yes',
'INSTALL_PAZPAR2' => 'no',
'AUTH_INDEX_MODE' => 'dom',
'PATH_TO_ZEBRA' => '',
'USE_MEMCACHED' => 'no',
'MEMCACHED_SERVERS' => '127.0.0.1:11211',
- 'MEMCACHED_NAMESPACE' => 'KOHA'
+ 'MEMCACHED_NAMESPACE' => 'KOHA',
+ 'FONT_DIR' => '/usr/share/fonts/truetype/ttf-dejavu'
);
# set some default configuration options based on OS
# more conditions need to be added for other OS's
-# this should probably also incorporate usage of Win32::GetOSName() and/or Win32::GetOSVersion()
-# to allow for more granular decisions based on which Win32 platform
warn "Your platform appears to be $^O.\n" if $DEBUG;
-if ( $^O eq 'MSWin32' ) {
- # Most Unix2Win32 ports seem to poke everything into the Program Files directory
- # this could be changed to put some files (ie. libraries) into system32, etc.
- $config_defaults{'INSTALL_MODE'} = 'single';
- $config_defaults{'INSTALL_BASE'} = 'c:/progra~1/koha'; # Use 8.3 names to be safe...
-}
-elsif ( $^O eq 'cygwin' ) {
+if ( $^O eq 'cygwin' ) {
# Most Unix2Win32 ports seem to poke everything into the Program Files directory
# this could be changed to put some files (ie. libraries) into system32, etc.
$config_defaults{'INSTALL_MODE'} = 'single';
my %valid_config_values = (
'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 },
'BIB_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 },
'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'normarc' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation
- 'ZEBRA_LANGUAGE' => { 'en' => 1, 'es' => 1, 'fr' => 1, 'nb' => 1, 'ru' => 1, 'uk' => 1 }, # FIXME should generate from contents of distribution
+ 'ZEBRA_LANGUAGE' => { 'en' => 1, 'es' => 1, 'fr' => 1, 'gr' => 1, 'nb' => 1, 'ru' => 1, 'uk' => 1 }, # FIXME should generate from contents of distribution
'ZEBRA_TOKENIZER' => { chr => 1, icu => 1 },
'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
'USE_MEMCACHED' => { 'yes' => 1, 'no' => 1 },
my ($target_directories, $skip_directories) = get_target_directories(\%config);
display_configuration(\%config, $target_directories);
my $file_map = {};
-get_file_map($target_map, $dirtree, $file_map, $config{'INSTALL_ZEBRA'} eq "yes" ? 1: 0);
+get_file_map($target_map, $dirtree, $file_map);
my $pl_files = {
'rewrite-config.PL' => [
'blib/KOHA_CONF_DIR/koha-conf.xml',
'blib/KOHA_CONF_DIR/koha-httpd.conf',
+ 'blib/KOHA_CONF_DIR/log4perl.conf',
'blib/ZEBRA_CONF_DIR/etc/default.idx',
'blib/MISC_DIR/koha-install-log'
],
],
};
-if ($config{'INSTALL_ZEBRA'} eq "yes") {
- push @{ $pl_files->{'rewrite-config.PL'} }, (
- 'blib/ZEBRA_CONF_DIR/etc/passwd',
- 'blib/ZEBRA_CONF_DIR/zebra-biblios.cfg',
- 'blib/ZEBRA_CONF_DIR/zebra-biblios-dom.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',
- 'blib/ZEBRA_CONF_DIR/retrieval-info-bib-grs1.xml',
- 'blib/ZEBRA_CONF_DIR/retrieval-info-bib-dom.xml',
- );
+push @{ $pl_files->{'rewrite-config.PL'} }, (
+ 'blib/ZEBRA_CONF_DIR/etc/passwd',
+ 'blib/ZEBRA_CONF_DIR/zebra-biblios.cfg',
+ 'blib/ZEBRA_CONF_DIR/zebra-biblios-dom.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',
+ 'blib/ZEBRA_CONF_DIR/retrieval-info-bib-grs1.xml',
+ 'blib/ZEBRA_CONF_DIR/retrieval-info-bib-dom.xml',
+);
+push @{ $pl_files->{'rewrite-config.PL'} }, (
+ 'blib/SCRIPT_DIR/koha-zebra-ctl.sh',
+ 'blib/SCRIPT_DIR/koha-pazpar2-ctl.sh',
+ 'blib/SCRIPT_DIR/koha-index-daemon-ctl.sh',
+);
+if ($config{'INSTALL_PAZPAR2'} eq 'yes') {
push @{ $pl_files->{'rewrite-config.PL'} }, (
- 'blib/SCRIPT_DIR/koha-zebra-ctl.sh',
- 'blib/SCRIPT_DIR/koha-pazpar2-ctl.sh',
- 'blib/SCRIPT_DIR/koha-index-daemon-ctl.sh',
+ 'blib/PAZPAR2_CONF_DIR/koha-biblios.xml',
+ 'blib/PAZPAR2_CONF_DIR/pazpar2.xml'
);
- 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{'ZEBRA_BIB_CFG'} = $config{'BIB_INDEX_MODE'} eq 'dom' ? 'zebra-biblios-dom.cfg' : 'zebra-biblios.cfg';
- $config{'AUTH_RETRIEVAL_CFG'} =
- $config{'AUTH_INDEX_MODE'} eq 'dom' ? 'retrieval-info-auth-dom.xml' : 'retrieval-info-auth-grs1.xml';
- $config{'BIB_RETRIEVAL_CFG'} =
- $config{'BIB_INDEX_MODE'} eq 'dom' ? 'retrieval-info-bib-dom.xml' : 'retrieval-info-bib-grs1.xml';
}
+$config{'ZEBRA_AUTH_CFG'} = $config{'AUTH_INDEX_MODE'} eq 'dom'
+ ? 'zebra-authorities-dom.cfg'
+ : 'zebra-authorities.cfg';
+$config{'ZEBRA_BIB_CFG'} = $config{'BIB_INDEX_MODE'} eq 'dom'
+ ? 'zebra-biblios-dom.cfg'
+ : 'zebra-biblios.cfg';
+$config{'AUTH_RETRIEVAL_CFG'} = $config{'AUTH_INDEX_MODE'} eq 'dom'
+ ? 'retrieval-info-auth-dom.xml'
+ : 'retrieval-info-auth-grs1.xml';
+$config{'BIB_RETRIEVAL_CFG'} = $config{'BIB_INDEX_MODE'} eq 'dom'
+ ? 'retrieval-info-bib-dom.xml'
+ : 'retrieval-info-bib-grs1.xml';
+
if ($config{'INSTALL_MODE'} ne "dev") {
push @{ $pl_files->{'rewrite-config.PL'} }, (
? 'icuchain words-icu.xml'
: 'charmap word-phrase-utf.chr';
+$config{ZEBRA_PTOKENIZER_STMT} = $config{ZEBRA_TOKENIZER} eq 'icu'
+ ? 'icuchain phrases-icu.xml'
+ : 'charmap word-phrase-utf.chr';
+
my %test_suite_override_dirs = (
KOHA_CONF_DIR => ['etc'],
ZEBRA_CONF_DIR => ['etc', 'zebradb'],
my $target_map = shift;
my $dirtree = shift;
my $file_map = shift;
- my $install_zebra = shift;
my $curr_path = @_ ? shift : ['.'];
# Traverse the directory tree.
}
}
if (defined $targetdir) {
- _add_to_file_map($file_map, $targetdir, $curr_path, $file, $matchlevel, $install_zebra);
+ _add_to_file_map($file_map, $targetdir, $curr_path, $file, $matchlevel);
} else {
my $path = join("/", @$curr_path);
print "failed to map: $path/$file\n" if $DEBUG;
} else {
# dealing with subdirectory
push @$curr_path, $dir;
- get_file_map($target_map, $dirtree->{$dir}, $file_map, $install_zebra, $curr_path);
+ get_file_map($target_map, $dirtree->{$dir}, $file_map, $curr_path);
pop @$curr_path;
}
}
my $curr_path = shift;
my $file = shift;
my $matchlevel = shift;
- my $install_zebra = shift;
my $dest_path = @_ ? shift : $curr_path;
# The target can be one of the following:
} else {
splice @new_dest_path, 0, $targetdir->{trimdir};
}
- _add_to_file_map($file_map, $subtarget, $curr_path, $file, $matchlevel, $install_zebra, \@new_dest_path);
+ _add_to_file_map($file_map, $subtarget, $curr_path, $file, $matchlevel, \@new_dest_path);
} else {
# actually getting here means that the
# target was unnecessarily listed
# as a hash, but we'll forgive that
- _add_to_file_map($file_map, $subtarget, $curr_path, $file, $matchlevel, $install_zebra);
+ _add_to_file_map($file_map, $subtarget, $curr_path, $file, $matchlevel);
}
} elsif ($targetdir ne 'NONE' and $targetdir ne '') {
my $source = File::Spec->catfile(@$curr_path, $file);
$source =~ s/ /\\ /g;
$destination =~ s/ /\\ /g;
- $file_map->{$source} = $destination unless (!$install_zebra and $targetdir =~ /ZEBRA/);
+ $file_map->{$source} = $destination;
}
}
database to be used by Koha);
$config{'DB_PASS'} = _get_value('DB_PASS', $msg, $defaults->{'DB_PASS'}, $valid_values, $install_log_values);
- $msg = q(
-Koha can use the Zebra search engine for high-performance
-searching of bibliographic and authority records. If you
-have installed the Zebra software and would like to use it,
-please answer 'yes' to the following question. Otherwise,
-Koha will default to using its internal search engine.
-
-Please note that if you choose *NOT* to install Zebra,
-koha-conf.xml will still contain some references to Zebra
-settings. Those references will be ignored by Koha.
-
-Install the Zebra configuration files?);
- $msg .= _add_valid_values_disp('INSTALL_ZEBRA', $valid_values);
- $config{'INSTALL_ZEBRA'} = _get_value('INSTALL_ZEBRA', $msg, $defaults->{'INSTALL_ZEBRA'}, $valid_values, $install_log_values);
-
- if ($config{'INSTALL_ZEBRA'} eq 'yes') {
+ print q(
+Koha uses the Zebra search engine for high-performance
+searching of bibliographic and authority records. Checking
+to see if you have installed the Zebra software...
+);
- if (defined(my $zebra_path = find_zebra())) {
- $config{'PATH_TO_ZEBRA'} = $zebra_path;
- print qq(
+ if (defined(my $zebra_path = find_zebra())) {
+ $config{'PATH_TO_ZEBRA'} = $zebra_path;
+ print qq(
Found 'zebrasrv' and 'zebraidx' in $zebra_path.
);
- } else {
- print q(
+ } else {
+ print q(
Unable to find the Zebra programs 'zebrasrv' and 'zebraidx'
in your PATH or in some of the usual places. If you haven't
installed Zebra yet, please do so and run Makefile.PL again.
);
- }
+ }
- $msg = q(
-Since you've chosen to use Zebra with Koha,
-you must specify the primary MARC format of the
+ $msg = q(
+You must specify the primary MARC format of the
records to be indexed by Zebra.
Koha provides Zebra configuration files for MARC21,
NORMARC and UNIMARC.
MARC format for Zebra indexing);
- $msg .= _add_valid_values_disp('ZEBRA_MARC_FORMAT', $valid_values);
- $config{'ZEBRA_MARC_FORMAT'} = _get_value('ZEBRA_MARC_FORMAT', $msg, $defaults->{'ZEBRA_MARC_FORMAT'}, $valid_values, $install_log_values);
- $msg = q(
+ $msg .= _add_valid_values_disp('ZEBRA_MARC_FORMAT', $valid_values);
+ $config{'ZEBRA_MARC_FORMAT'} = _get_value('ZEBRA_MARC_FORMAT', $msg, $defaults->{'ZEBRA_MARC_FORMAT'}, $valid_values, $install_log_values);
+ $msg = q(
Koha supplies Zebra configuration files tuned for
searching either English (en) or French (fr) MARC
records.
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, $install_log_values);
+ $msg .= _add_valid_values_disp('ZEBRA_LANGUAGE', $valid_values);
+ $config{'ZEBRA_LANGUAGE'} = _get_value('ZEBRA_LANGUAGE', $msg, $defaults->{'ZEBRA_LANGUAGE'}, $valid_values, $install_log_values);
- $msg = q(
+ $msg = q(
Koha can use one of two different indexing modes
for the MARC bibliographic records:
-grs1 - uses the Zebra GRS-1 filter, available
- for legacy support
dom - uses the DOM XML filter; offers improved
functionality.
+grs1 - [DEPRECATED] uses the Zebra GRS-1 filter,
+ available for legacy support
Bibliographic indexing mode);
- $msg .= _add_valid_values_disp('BIB_INDEX_MODE', $valid_values);
- $config{'BIB_INDEX_MODE'} = _get_value('BIB_INDEX_MODE', $msg, $defaults->{'BIB_INDEX_MODE'}, $valid_values, $install_log_values);
+ $msg .= _add_valid_values_disp('BIB_INDEX_MODE', $valid_values);
+ $config{'BIB_INDEX_MODE'} = _get_value('BIB_INDEX_MODE', $msg, $defaults->{'BIB_INDEX_MODE'}, $valid_values, $install_log_values);
- $msg = q(
+ $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.
+grs1 - [DEPRECATED] uses the Zebra GRS-1 filter,
+ available for legacy support
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, $install_log_values);
+ $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, $install_log_values);
- $msg = q(
+ $msg = q(
Zebra has two methods to perform records tokenization
and characters normalization: CHR and ICU. ICU is
recommended for catalogs containing non-Latin
characters.);
- $msg .= _add_valid_values_disp('ZEBRA_TOKENIZER', $valid_values);
- $config{'ZEBRA_TOKENIZER'} = _get_value('ZEBRA_TOKENIZER', $msg, $defaults->{'ZEBRA_TOKENIZER'}, $valid_values, $install_log_values);
+ $msg .= _add_valid_values_disp('ZEBRA_TOKENIZER', $valid_values);
+ $config{'ZEBRA_TOKENIZER'} = _get_value('ZEBRA_TOKENIZER', $msg, $defaults->{'ZEBRA_TOKENIZER'}, $valid_values, $install_log_values);
- $msg = q(
+ $msg = q(
Please specify Zebra database user);
- $config{'ZEBRA_USER'} = _get_value('ZEBRA_USER', $msg, $defaults->{'ZEBRA_USER'}, $valid_values, $install_log_values);
+ $config{'ZEBRA_USER'} = _get_value('ZEBRA_USER', $msg, $defaults->{'ZEBRA_USER'}, $valid_values, $install_log_values);
- $msg = q(
+ $msg = q(
Please specify the Zebra database password);
- $config{'ZEBRA_PASS'} = _get_value('ZEBRA_PASS', $msg, $defaults->{'ZEBRA_PASS'}, $valid_values, $install_log_values);
+ $config{'ZEBRA_PASS'} = _get_value('ZEBRA_PASS', $msg, $defaults->{'ZEBRA_PASS'}, $valid_values, $install_log_values);
- $msg = q(
+ $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.
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, $install_log_values);
+ $msg .= _add_valid_values_disp('INSTALL_SRU', $valid_values);
+ $config{'INSTALL_SRU'} = _get_value('INSTALL_SRU', $msg, $defaults->{'INSTALL_SRU'}, $valid_values, $install_log_values);
- if ($config{'INSTALL_SRU'} eq 'yes') {
- $msg = q(
+ 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(
+ $msg = q(
SRU Database host?);
- $config{'ZEBRA_SRU_HOST'} = _get_value('ZEBRA_SRU_HOST', $msg, $defaults->{'ZEBRA_SRU_HOST'}, $valid_values, $install_log_values);
+ $config{'ZEBRA_SRU_HOST'} = _get_value('ZEBRA_SRU_HOST', $msg, $defaults->{'ZEBRA_SRU_HOST'}, $valid_values, $install_log_values);
- $msg = q(
+ $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, $install_log_values);
+ $config{'ZEBRA_SRU_BIBLIOS_PORT'} = _get_value('ZEBRA_SRU_BIBLIOS_PORT', $msg, $defaults->{'ZEBRA_SRU_BIBLIOS_PORT'}, $valid_values, $install_log_values);
- $msg = q(
+ $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, $install_log_values);
+ $config{'ZEBRA_SRU_AUTHORITIES_PORT'} = _get_value('ZEBRA_SRU_AUTHORITIES_PORT', $msg, $defaults->{'ZEBRA_SRU_AUTHORITIES_PORT'}, $valid_values, $install_log_values);
- }
+ }
- $msg = q(
-Since you've chosen to use Zebra, you can also choose to
-install PazPar2, which is a metasearch tool. With PazPar2,
+ $msg = q(
+Along with 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, $install_log_values);
+ $msg .= _add_valid_values_disp('INSTALL_PAZPAR2', $valid_values);
+ $config{'INSTALL_PAZPAR2'} = _get_value('INSTALL_PAZPAR2', $msg, $defaults->{'INSTALL_PAZPAR2'}, $valid_values, $install_log_values);
- if ($config{'INSTALL_PAZPAR2'} eq 'yes') {
- $msg = q(
+ 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(
+ $msg = q(
Zebra bibliographic server host?);
- $config{'MERGE_SERVER_HOST'} = _get_value('MERGE_SERVER_HOST', $msg, $defaults->{'MERGE_SERVER_HOST'}, $valid_values, $install_log_values);
+ $config{'MERGE_SERVER_HOST'} = _get_value('MERGE_SERVER_HOST', $msg, $defaults->{'MERGE_SERVER_HOST'}, $valid_values, $install_log_values);
- $msg = q(
+ $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, $install_log_values);
+ $config{'MERGE_SERVER_PORT'} = _get_value('MERGE_SERVER_PORT', $msg, $defaults->{'MERGE_SERVER_PORT'}, $valid_values, $install_log_values);
- $msg = q(
+ $msg = q(
PazPar2 host?);
- $config{'PAZPAR2_HOST'} = _get_value('PAZPAR2_HOST', $msg, $defaults->{'PAZPAR2_HOST'}, $valid_values, $install_log_values);
+ $config{'PAZPAR2_HOST'} = _get_value('PAZPAR2_HOST', $msg, $defaults->{'PAZPAR2_HOST'}, $valid_values, $install_log_values);
- $msg = q(
+ $msg = q(
PazPar2 port?);
- $config{'PAZPAR2_PORT'} = _get_value('PAZPAR2_PORT', $msg, $defaults->{'PAZPAR2_PORT'}, $valid_values, $install_log_values);
+ $config{'PAZPAR2_PORT'} = _get_value('PAZPAR2_PORT', $msg, $defaults->{'PAZPAR2_PORT'}, $valid_values, $install_log_values);
- }
}
+
$msg = q(
Use memcached and memoize to cache the results of some function calls?
This provides a signficant performance improvement.
$config{'MEMCACHED_NAMESPACE'} = _get_value('MEMCACHED_NAMESPACE', $msg, $defaults->{'MEMCACHED_NAMESPACE'}, $valid_values, $install_log_values);
}
+ $msg = q(
+Path to DejaVu fonts?);
+ $config{'FONT_DIR'} = _get_value('FONT_DIR', $msg, $defaults->{'FONT_DIR'}, $valid_values, $install_log_values);
$msg = q(
my @basedir = File::Spec->splitdir($directories);
- # for Win32 we need to prepend the volume to the directory path
- if ( $^O eq 'MSWin32' ) { shift @basedir; unshift @basedir, $volume; }
- elsif ( $^O eq 'cygwin' ) { shift @basedir; unshift @basedir, 'c:'; } # in a cygwin environment, $volume is returned empty
+ if ( $^O eq 'cygwin' ) { shift @basedir; unshift @basedir, 'c:'; } # in a cygwin environment, $volume is returned empty
my $package = pop @basedir;
$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{'SCRIPT_NONDEV_DIR'} = $dirmap{'SCRIPT_DIR'};
+ #For dev install, point NONDEV_DIR to misc in current dir (not base)
+ #Used by supportdir in koha-conf.xml (BZ 12031)
+ $dirmap{'SCRIPT_NONDEV_DIR'} = File::Spec->catdir($curdir, 'misc');
$skipdirs{'SCRIPT_NONDEV_DIR'} = 1;
$dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man');
$dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
_get_env_overrides(\%dirmap);
_get_argv_overrides(\%dirmap);
- _add_destdir(\%dirmap) unless ($^O eq 'MSWin32');
+ _add_destdir(\%dirmap);
return \%dirmap, \%skipdirs;
}
print "perl Makefile.PL\n";
print "\nor\n\n";
print "DB_USER=my_koha DOC_DIR=/usr/local/info perl Makefile.PL\n\n";
- print "If installing on a Win32 platform, be sure to use:\n";
- print "'dmake -x MAXLINELENGTH=300000'\n\n";
}
=head2 find_zebra
Attempt to find Zebra - check user's PATH and
a few other directories for zebrasrv and zebraidx.
-FIXME: doesn't handle Win32
-
=cut
sub find_zebra {
package MY;
-# This will have to be reworked in order to accommodate Win32...
-
sub test {
my $self = shift;
my $test = $self->SUPER::test(@_);
$install .= qq(
KOHA_INST_$key = blib/$key
KOHA_DEST_$key = $target_directories->{$key}
-) unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
+) unless exists $skip_directories->{$key};
}
$install .= qq(
install :: all install_koha set_koha_ownership set_koha_permissions warn_koha_env_vars
$install .= "\t\$(NOECHO) umask 022; \$(MOD_INSTALL) \\\n";
foreach my $key (sort keys %$target_directories) {
$install .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n"
- unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
+ unless exists $skip_directories->{$key};
}
$install .= "\t\t\$(INST_MAN1DIR) \$(DESTINSTALLMAN1DIR) \\\n";
$install .= "\t\t\$(INST_MAN3DIR) \$(DESTINSTALLMAN3DIR)\n";
# Do not try to change ownership if DESTDIR is set
if ($config{'INSTALL_MODE'} eq 'standard' and $config{'KOHA_USER'} ne "root") {
foreach my $key (sort keys %$target_directories) {
- $install .= "\t\$(NOECHO) if test -z \"\$(DESTDIR)\"; then chown -R $config{'KOHA_USER'}:$config{'KOHA_GROUP'} \$(KOHA_DEST_$key); fi\n"
- unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
+ $install .= "\t\$(NOECHO) if test -z \"\$(DESTDIR)\"; then chown -R $config{'KOHA_USER'}:$config{'KOHA_GROUP'} \$(KOHA_DEST_$key); fi\n"
+ unless exists $skip_directories->{$key};
}
} else {
$install .= "\t\t\$(NOECHO) \$(NOOP)\n\n";
# of Koha's files to have write permission by default.
foreach my $key (sort keys %$target_directories) {
$install .= "\t\$(NOECHO) chmod -R u+w \$(KOHA_DEST_$key)\n"
- unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
+ unless exists $skip_directories->{$key};
}
}
- elsif ($^O eq 'MSWin32' ) { # On Win32, the install probably needs to be done under the user account koha will be running as...
- # We can attempt some creative things with command line utils such as CACLS which allows permission
- # management from Win32 cmd.exe, but permissions really only apply to NTFS.
- foreach my $key (sort keys %$target_directories) {
- $install .= qq(
-KOHA_INST_$key = blib/$key
-KOHA_DEST_$key = $target_directories->{$key}
-) unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
- }
- $install .= qq(
-install :: all install_koha warn_koha_env_vars
-\t\$(NOECHO) \$(NOOP)
-);
- $install .= "install_koha ::\n";
- $install .= "\t\$(MOD_INSTALL) \\\n";
- foreach my $key (sort keys %$target_directories) {
- $install .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n"
- unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
- }
- }
+
$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();
- }
+ $install .= _update_zebra_conf_target();
$install .= upgrade();
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 .= "\t\$(NOECHO) chmod -R u+w \$(KOHA_DEST_ZEBRA_CONF_DIR)\n";
$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";
+ $target .= "\t\$(NOECHO) chmod -R u+w \$(KOHA_DEST_PAZPAR2_CONF_DIR)\n";
return $target;
}
foreach my $key (qw/KOHA_CONF_DIR INTRANET_TMPL_DIR INTRANET_WWW_DIR OPAC_TMPL_DIR OPAC_WWW_DIR
PAZPAR2_CONF_DIR ZEBRA_CONF_DIR PLUGINS_DIR/) {
$upgrade .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n"
- unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or
- exists $skip_directories->{$key} or
+ unless exists $skip_directories->{$key} or
not exists $target_directories->{$key};
}
$upgrade =~ s/\\\n$/\n/;
return $upgrade;
}
-
sub postamble {
# put directory mappings into Makefile
# so that Make will export as environment
my $env;
# Hereagain, we must alter syntax per platform...
- if ( $^O eq 'MSWin32' ) {
- # NOTE: it is imperative that there be no whitespaces in ENV=value...
- $env = join("\n", map { "__${_}__=$target_directories->{$_}" } keys %$target_directories);
- $env .= "\n\n";
- $env .= join("\n", map { "__${_}__=$config{$_}" } keys %config);
- }
- else {
+ {
$env = join("\n", map { "export __${_}__ := $target_directories->{$_}" } keys %$target_directories);
$env .= "\n\n";
$env .= join("\n", map { "export __${_}__ := $config{$_}" } keys %config);