Bug 11649 - Always use words "copy number" - intranet
[koha_fer] / Makefile.PL
index 5aa9310..66f9a0f 100644 (file)
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 #
 # 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., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# 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.
 #
 # Current maintainer MJR http://mjr.towers.org.uk/
 #
 # Current maintainer MJR http://mjr.towers.org.uk/
-# See http://www.koha.org/wiki/?page=KohaInstaller
 #
 
 use strict;
 #
 
 use strict;
@@ -25,9 +24,16 @@ use ExtUtils::MakeMaker;
 use POSIX;
 use File::Spec;
 use Getopt::Long;
 use POSIX;
 use File::Spec;
 use Getopt::Long;
+use FindBin; # we need to enforce which C4::Installer::PerlModule is used in case more than one is installed
+
+use lib $FindBin::Bin;
+
+use C4::Installer;
+
+my $koha_pm = C4::Installer::PerlModules->new;
 
 my $DEBUG = 0;
 
 my $DEBUG = 0;
-die "perl 5.6.1 or later required" unless ($] >= 5.006001);
+die "perl 5.10 or later required" unless ($] >= 5.010000);
 
 # Hash up directory structure & files beginning with the directory we were called from (should be the base of koha)...
 
 
 # Hash up directory structure & files beginning with the directory we were called from (should be the base of koha)...
 
@@ -220,6 +226,14 @@ command-line, e.g., READMEs.
 
 Directory for Apache and Zebra logs produced by Koha.
 
 
 Directory for Apache and Zebra logs produced by Koha.
 
+=item BACKUP_DIR
+
+Directory for backup files produced by Koha.
+
+=item PLUGINS_DIR
+
+Directory for external Koha plugins.
+
 =item PAZPAR2_CONF_DIR
 
 Directory for PazPar2 configuration files.
 =item PAZPAR2_CONF_DIR
 
 Directory for PazPar2 configuration files.
@@ -251,6 +265,8 @@ my $target_map = {
   './changelanguage.pl'         => 'INTRANET_CGI_DIR',
   './check_sysprefs.pl'         => 'NONE',
   './circ'                      => 'INTRANET_CGI_DIR',
   './changelanguage.pl'         => 'INTRANET_CGI_DIR',
   './check_sysprefs.pl'         => 'NONE',
   './circ'                      => 'INTRANET_CGI_DIR',
+  './course_reserves'           => 'INTRANET_CGI_DIR',
+  './docs/history.txt'          => { target => 'DOC_DIR', trimdir => -1 },
   './offline_circ'             => 'INTRANET_CGI_DIR',
   './edithelp.pl'               => 'INTRANET_CGI_DIR',
   './etc'                       => { target => 'KOHA_CONF_DIR', trimdir => -1 },
   './offline_circ'             => 'INTRANET_CGI_DIR',
   './edithelp.pl'               => 'INTRANET_CGI_DIR',
   './etc'                       => { target => 'KOHA_CONF_DIR', trimdir => -1 },
@@ -260,6 +276,7 @@ my $target_map = {
   './installer-CPAN.pl'         => 'NONE',
   './installer'                 => 'INTRANET_CGI_DIR',
   './errors'                    => {target => 'INTRANET_CGI_DIR'},
   './installer-CPAN.pl'         => 'NONE',
   './installer'                 => 'INTRANET_CGI_DIR',
   './errors'                    => {target => 'INTRANET_CGI_DIR'},
+  './Koha'                      => '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', 
   './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', 
@@ -275,16 +292,21 @@ my $target_map = {
   './misc/koha-install-log'     => { target => 'MISC_DIR', trimdir => -1 },
   './misc/installer_devel_notes' => 'NONE',
   './opac'                      => 'OPAC_CGI_DIR',
   './misc/koha-install-log'     => { target => 'MISC_DIR', trimdir => -1 },
   './misc/installer_devel_notes' => 'NONE',
   './opac'                      => 'OPAC_CGI_DIR',
+  './OpenILS'                   => 'PERL_MODULE_DIR',
   './README.txt'                => 'NONE',
   './patroncards'               => 'INTRANET_CGI_DIR',
   './README.txt'                => 'NONE',
   './patroncards'               => 'INTRANET_CGI_DIR',
+  './patron_lists'              => 'INTRANET_CGI_DIR',
+  './plugins'                   => 'INTRANET_CGI_DIR',
   './reports'                   => 'INTRANET_CGI_DIR',
   './reserve'                   => 'INTRANET_CGI_DIR',
   './reviews'                   => 'INTRANET_CGI_DIR',
   './rewrite-config.PL'         => 'NONE',
   './reviews'                   => 'INTRANET_CGI_DIR',
   './serials'                   => 'INTRANET_CGI_DIR',
   './reports'                   => 'INTRANET_CGI_DIR',
   './reserve'                   => 'INTRANET_CGI_DIR',
   './reviews'                   => 'INTRANET_CGI_DIR',
   './rewrite-config.PL'         => 'NONE',
   './reviews'                   => 'INTRANET_CGI_DIR',
   './serials'                   => 'INTRANET_CGI_DIR',
+  './services'                  => 'INTRANET_CGI_DIR',
   './skel'                      => 'NONE',
   './skel/var/log/koha'         => { target => 'LOG_DIR', trimdir => -1 },
   './skel'                      => 'NONE',
   './skel/var/log/koha'         => { target => 'LOG_DIR', trimdir => -1 },
+  './skel/var/spool/koha'       => { target => 'BACKUP_DIR', trimdir => -1 },
   './skel/var/run/koha/zebradb' => { target => 'ZEBRA_RUN_DIR', trimdir => -1 },
   './skel/var/lock/koha/zebradb/authorities' => { target => 'ZEBRA_LOCK_DIR', trimdir => 6 },
   './skel/var/lib/koha/zebradb/authorities/key'  => { target => 'ZEBRA_DATA_DIR', trimdir => 6 },
   './skel/var/run/koha/zebradb' => { target => 'ZEBRA_RUN_DIR', trimdir => -1 },
   './skel/var/lock/koha/zebradb/authorities' => { target => 'ZEBRA_LOCK_DIR', trimdir => 6 },
   './skel/var/lib/koha/zebradb/authorities/key'  => { target => 'ZEBRA_DATA_DIR', trimdir => 6 },
@@ -296,6 +318,7 @@ my $target_map = {
   './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/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/lib/koha/plugins' => { target => 'PLUGINS_DIR', trimdir => 6 },
   './sms'                       => 'INTRANET_CGI_DIR',
   './suggestion'                => 'INTRANET_CGI_DIR',
   './svc'                       => 'INTRANET_CGI_DIR',
   './sms'                       => 'INTRANET_CGI_DIR',
   './suggestion'                => 'INTRANET_CGI_DIR',
   './svc'                       => 'INTRANET_CGI_DIR',
@@ -306,6 +329,7 @@ my $target_map = {
                                            # that should go in /var/tmp/koha
   './tools'                     => 'INTRANET_CGI_DIR',
   './virtualshelves'            => 'INTRANET_CGI_DIR',
                                            # that should go in /var/tmp/koha
   './tools'                     => 'INTRANET_CGI_DIR',
   './virtualshelves'            => 'INTRANET_CGI_DIR',
+  './xml_sax.pl'                => 'PERL_MODULE_DIR',
   # ignore files and directories created by the install itself
   './pm_to_blib'                => 'NONE',
   './blib'                      => 'NONE',
   # ignore files and directories created by the install itself
   './pm_to_blib'                => 'NONE',
   './blib'                      => 'NONE',
@@ -400,8 +424,10 @@ my %config_defaults = (
   'INSTALL_SRU'       => 'yes',
   'INSTALL_PAZPAR2'   => 'no',
   'AUTH_INDEX_MODE'   => 'dom',
   'INSTALL_SRU'       => 'yes',
   'INSTALL_PAZPAR2'   => 'no',
   'AUTH_INDEX_MODE'   => 'dom',
+  'BIB_INDEX_MODE'    => 'dom',
   'ZEBRA_MARC_FORMAT' => 'marc21',
   'ZEBRA_LANGUAGE'    => 'en',
   'ZEBRA_MARC_FORMAT' => 'marc21',
   'ZEBRA_LANGUAGE'    => 'en',
+  'ZEBRA_TOKENIZER'   => 'chr',
   'ZEBRA_USER'        => 'kohauser',
   'ZEBRA_PASS'        => 'zebrastripes',
   'ZEBRA_SRU_HOST'    => 'localhost',
   'ZEBRA_USER'        => 'kohauser',
   'ZEBRA_PASS'        => 'zebrastripes',
   'ZEBRA_SRU_HOST'    => 'localhost',
@@ -451,8 +477,10 @@ my %valid_config_values = (
   'INSTALL_ZEBRA' => { 'yes' => 1, 'no' => 1 },
   'INSTALL_SRU' => { 'yes' => 1, 'no' => 1 },
   'AUTH_INDEX_MODE' => { 'grs1' => 1, 'dom' => 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
+  '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_TOKENIZER' => { chr => 1, icu => 1 },
   'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
   'USE_MEMCACHED'      => { 'yes' => 1, 'no' => 1 },
 );
   'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
   'USE_MEMCACHED'      => { 'yes' => 1, 'no' => 1 },
 );
@@ -479,28 +507,32 @@ my $pl_files = {
       'rewrite-config.PL' => [
          'blib/KOHA_CONF_DIR/koha-conf.xml',
          'blib/KOHA_CONF_DIR/koha-httpd.conf',
       'rewrite-config.PL' => [
          'blib/KOHA_CONF_DIR/koha-conf.xml',
          'blib/KOHA_CONF_DIR/koha-httpd.conf',
+         'blib/ZEBRA_CONF_DIR/etc/default.idx',
          'blib/MISC_DIR/koha-install-log'
          ],
          'fix-perl-path.PL' => [       # this script ensures the correct shebang line for the platform installed on...
                 'blib'
          'blib/MISC_DIR/koha-install-log'
          ],
          'fix-perl-path.PL' => [       # this script ensures the correct shebang line for the platform installed on...
                 'blib'
-                ]
+                ],
 };
 
 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',
 };
 
 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/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',
     );
     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',
+        'blib/SCRIPT_DIR/koha-index-daemon-ctl.sh',
     );
     if ($config{'INSTALL_PAZPAR2'} eq 'yes') {
         push @{ $pl_files->{'rewrite-config.PL'} }, (
     );
     if ($config{'INSTALL_PAZPAR2'} eq 'yes') {
         push @{ $pl_files->{'rewrite-config.PL'} }, (
@@ -509,8 +541,11 @@ if ($config{'INSTALL_ZEBRA'} eq "yes") {
         );
     }
     $config{'ZEBRA_AUTH_CFG'} = $config{'AUTH_INDEX_MODE'} eq 'dom' ? 'zebra-authorities-dom.cfg' : 'zebra-authorities.cfg';
         );
     }
     $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{'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") {
 }
 
 if ($config{'INSTALL_MODE'} ne "dev") {
@@ -520,10 +555,15 @@ if ($config{'INSTALL_MODE'} ne "dev") {
     );
 }
 
     );
 }
 
+$config{ZEBRA_TOKENIZER_STMT} = $config{ZEBRA_TOKENIZER} eq 'icu'
+    ? 'icuchain words-icu.xml'
+    : 'charmap word-phrase-utf.chr';
+
 my %test_suite_override_dirs = (
     KOHA_CONF_DIR  => ['etc'],
     ZEBRA_CONF_DIR => ['etc', 'zebradb'],
     LOG_DIR        => ['var', 'log'],
 my %test_suite_override_dirs = (
     KOHA_CONF_DIR  => ['etc'],
     ZEBRA_CONF_DIR => ['etc', 'zebradb'],
     LOG_DIR        => ['var', 'log'],
+    BACKUP_DIR     => ['var', 'spool'],
     SCRIPT_DIR     => ['bin'],
     ZEBRA_LOCK_DIR => ['var', 'lock', 'zebradb'],
     ZEBRA_DATA_DIR => ['var', 'lib', 'zebradb'],
     SCRIPT_DIR     => ['bin'],
     ZEBRA_LOCK_DIR => ['var', 'lock', 'zebradb'],
     ZEBRA_DATA_DIR => ['var', 'lib', 'zebradb'],
@@ -535,96 +575,9 @@ WriteMakefile(
               #VERSION     => strftime('2.9.%Y%m%d%H',gmtime),
               VERSION_FROM => 'kohaversion.pl',
               ABSTRACT     => 'Award-winning integrated library system (ILS) and Web OPAC',
               #VERSION     => strftime('2.9.%Y%m%d%H',gmtime),
               VERSION_FROM => 'kohaversion.pl',
               ABSTRACT     => 'Award-winning integrated library system (ILS) and Web OPAC',
-              AUTHOR       => 'Koha Developers <koha-devel@nongnu.org>',
+              AUTHOR       => 'Koha Contributors <http://koha-community.org/>',
               NO_META      => 1,
               NO_META      => 1,
-              PREREQ_PM => {
-                            'Algorithm::CheckDigits'           => 0.50,
-                                                       'Authen::CAS::Client'              => 0.05,
-                            'Biblio::EndnoteStyle'             => 0.05,
-                            'CGI'                              => 3.15,
-                            'CGI::Carp'                        => 1.29,
-                            'CGI::Session'                     => 4.20,
-                            'CGI::Session::Serialize::yaml'    => 4.20,
-                            'Class::Factory::Util'             => 1.6,
-                            'Class::Accessor'                  => 0.30,
-                            'DBD::mysql'                       => 4.004,
-                            'DBD::SQLite2'                     => 0.33, # optional, used for offline circulation
-                            'DBI'                              => 1.53,
-                            'Data::Dumper'                     => 2.121,
-                            'Data::ICal'                       => 0.13,
-                            'Date::Calc'                       => 5.4,
-                            'Date::ICal'                       => 1.72,
-                            'Date::Manip'                      => 5.44,
-                            'Digest::MD5'                      => 2.36,
-                            'Digest::SHA'                      => 5.43,
-                            'Email::Date'                      => 1.103,
-                            'File::Temp'                       => 0.16,
-                            'GD'                               => 2.39,    #optional, used for patron image feature
-                            'GD::Barcode::UPCE'                => 1.1,
-                            'Graphics::Magick'                 => 1.3.7,   #optional, used for patron cards creator
-                            'Getopt::Long'                     => 2.35,
-                            'Getopt::Std'                      => 1.05,
-                            'HTML::Template::Pro'              => 0.69,
-                            'HTML::Scrubber'                   => 0.08,
-                            'HTTP::Cookies'                    => 1.39,
-                            'HTTP::OAI'                        => 3.20,
-                            'HTTP::Request::Common'            => 1.26,
-                            'IPC::Cmd'                         => 0.46,
-                            'JSON'                             => 2.07, # Needed by admin/item_circulation_alerts.pl
-                            'LWP::Simple'                      => 1.41,
-                            'LWP::UserAgent'                   => 2.033,
-                            'Lingua::Stem'                     => 0.82,
-                           'Lingua::Stem::Snowball'           => 0.952,
-                            'List::Util'                       => 1.18,
-                            'List::MoreUtils'                  => 0.21,
-                            'Locale::Language'                 => 2.07,
-                            'MARC::Charset'                    => 0.98,
-                            'MARC::Crosswalk::DublinCore'      => 0.02,
-                            'MARC::File::XML'                  => 0.88,
-                            'MARC::Record'                     => 2.00,
-                            'MIME::Base64'                     => 3.07,
-                            'MIME::Lite'                       => 3.00,
-                            'MIME::QuotedPrint'                => 3.07,
-                            'Mail::Sendmail'                   => 0.79,
-                            'Memoize::Memcached'               => 0.03, # optional
-                            'Net::LDAP'                        => 0.33, # optional
-                            'Net::LDAP::Filter'                => 0.14, # optional
-                            'Net::Z3950::ZOOM'                 => 1.16,
-                            'Number::Format'                   => 1.52,
-                            'PDF::API2'                        => 2.000,
-                            'PDF::API2::Page'                  => 2.000,
-                            'PDF::API2::Util'                  => 2.000,
-                            'PDF::API2::Simple'                => 1.000,
-                            'PDF::Table'                       => 0.9.3,
-                            'PDF::Reuse'                       => 0.33,
-                            'PDF::Reuse::Barcode'              => 0.05,
-                            'POE'                              => 0.9999,
-                            'POSIX'                            => 1.09,
-                            'Schedule::At'                     => 1.06,
-                            'Storable'                        => 2.21,
-                            'SMS::Send'                        => 0.05, # optional
-                            'Term::ANSIColor'                  => 1.10,
-                            'Test'                             => 1.25,
-                            'Test::Harness'                    => 2.56,
-                            'Test::More'                       => 0.80,
-                            'Text::CSV'                        => 0.01,
-                            'Text::CSV_XS'                     => 0.32,
-                            'Text::CSV::Encoded'               => 0.09,
-                            'Text::Iconv'                      => 1.7,
-                            'Text::Wrap'                       => 2005.082401,
-                            'Time::HiRes'                      => 1.86,
-                            'Time::localtime'                  => 1.02,
-                            'Unicode::Normalize'               => 0.32,
-                            'URI::Escape'                      => 1.36,
-                            'XML::Dumper'                      => 0.81,
-                            'XML::LibXML'                      => 1.59,
-                            'XML::LibXSLT'                     => 1.59,
-                            'XML::SAX::ParserFactory'          => 1.01,
-                            'XML::SAX::Writer'                 => 0.44,
-                            'XML::Simple'                      => 2.14,
-                            'XML::RSS'                         => 1.31,
-                            'YAML::Syck'                       => 0.71,
-                        },
+              PREREQ_PM    => $koha_pm->prereq_pm,
 
               # File tree mapping
               PM => $file_map,
 
               # File tree mapping
               PM => $file_map,
@@ -997,8 +950,8 @@ Since you've chosen to use Zebra with Koha,
 you must specify the primary MARC format of the
 records to be indexed by Zebra.
 
 you must specify the primary MARC format of the
 records to be indexed by Zebra.
 
-Koha provides Zebra configuration files for MARC 21
-and UNIMARC.
+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);
 
 MARC format for Zebra indexing);
         $msg .= _add_valid_values_disp('ZEBRA_MARC_FORMAT', $valid_values);
@@ -1014,6 +967,20 @@ Primary language for Zebra indexing);
 
         $msg = q(
 Koha can use one of  two different indexing modes
 
         $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.
+
+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 = q(
+Koha can use one of  two different indexing modes
 for the MARC authorities records:
 
 grs1 - uses the Zebra GRS-1 filter, available
 for the MARC authorities records:
 
 grs1 - uses the Zebra GRS-1 filter, available
@@ -1026,6 +993,15 @@ Authorities indexing mode);
         $config{'AUTH_INDEX_MODE'} = _get_value('AUTH_INDEX_MODE', $msg, $defaults->{'AUTH_INDEX_MODE'}, $valid_values, $install_log_values);
 
         $msg = q(
         $config{'AUTH_INDEX_MODE'} = _get_value('AUTH_INDEX_MODE', $msg, $defaults->{'AUTH_INDEX_MODE'}, $valid_values, $install_log_values);
 
         $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 = q(
 Please specify Zebra database user);
         $config{'ZEBRA_USER'} = _get_value('ZEBRA_USER', $msg, $defaults->{'ZEBRA_USER'}, $valid_values, $install_log_values);
 
 Please specify Zebra database user);
         $config{'ZEBRA_USER'} = _get_value('ZEBRA_USER', $msg, $defaults->{'ZEBRA_USER'}, $valid_values, $install_log_values);
 
@@ -1193,6 +1169,7 @@ sub _get_value {
 
     # take value from install log if present
     if (exists $install_log_values{$key}) {
 
     # take value from install log if present
     if (exists $install_log_values{$key}) {
+        $install_log_values{$key} =~ s/\$/\$\$/g;
         return $install_log_values{$key};
     }
 
         return $install_log_values{$key};
     }
 
@@ -1212,6 +1189,7 @@ sub _get_value {
         $retry_msg .= _add_valid_values_disp($key, $valid_values);
         $val = prompt($retry_msg, $default);
     }
         $retry_msg .= _add_valid_values_disp($key, $valid_values);
         $val = prompt($retry_msg, $default);
     }
+    $val =~ s/\$/\$\$/g;
     return $val;
 }
 
     return $val;
 }
 
@@ -1265,6 +1243,8 @@ sub get_target_directories {
         $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
         $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lock', 'zebradb');
         $dirmap{'LOG_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'log');
         $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
         $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lock', 'zebradb');
         $dirmap{'LOG_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'log');
+        $dirmap{'BACKUP_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'spool');
+        $dirmap{'PLUGINS_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'lib', 'koha', 'plugins');
         $dirmap{'ZEBRA_DATA_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'lib', 'zebradb');
         $dirmap{'ZEBRA_RUN_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'run', 'zebradb');
     } elsif ($mode eq 'dev') {
         $dirmap{'ZEBRA_DATA_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'lib', 'zebradb');
         $dirmap{'ZEBRA_RUN_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'run', 'zebradb');
     } elsif ($mode eq 'dev') {
@@ -1294,6 +1274,8 @@ sub get_target_directories {
         $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
         $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lock', 'zebradb');
         $dirmap{'LOG_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'log');
         $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
         $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lock', 'zebradb');
         $dirmap{'LOG_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'log');
+        $dirmap{'BACKUP_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'spool');
+        $dirmap{'PLUGINS_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'lib', 'plugins');
         $dirmap{'ZEBRA_DATA_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'lib', 'zebradb');
         $dirmap{'ZEBRA_RUN_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'run', 'zebradb');
     } else {
         $dirmap{'ZEBRA_DATA_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'lib', 'zebradb');
         $dirmap{'ZEBRA_RUN_DIR'} =  File::Spec->catdir(@basedir, $package, 'var', 'run', 'zebradb');
     } else {
@@ -1315,6 +1297,8 @@ sub get_target_directories {
         $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
         $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'var', 'lock', $package, 'zebradb');
         $dirmap{'LOG_DIR'} =  File::Spec->catdir(File::Spec->rootdir(), 'var', 'log', $package);
         $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
         $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'var', 'lock', $package, 'zebradb');
         $dirmap{'LOG_DIR'} =  File::Spec->catdir(File::Spec->rootdir(), 'var', 'log', $package);
+        $dirmap{'BACKUP_DIR'} =  File::Spec->catdir(File::Spec->rootdir(), 'var', 'spool', $package);
+        $dirmap{'PLUGINS_DIR'} =  File::Spec->catdir(File::Spec->rootdir(), 'var', 'lib', $package, 'plugins');
         $dirmap{'ZEBRA_DATA_DIR'} =  File::Spec->catdir(File::Spec->rootdir(), 'var', 'lib', $package, 'zebradb');
         $dirmap{'ZEBRA_RUN_DIR'} =  File::Spec->catdir(File::Spec->rootdir(), 'var', 'run', $package, 'zebradb');
     }
         $dirmap{'ZEBRA_DATA_DIR'} =  File::Spec->catdir(File::Spec->rootdir(), 'var', 'lib', $package, 'zebradb');
         $dirmap{'ZEBRA_RUN_DIR'} =  File::Spec->catdir(File::Spec->rootdir(), 'var', 'run', $package, 'zebradb');
     }
@@ -1387,6 +1371,8 @@ sub _add_destdir {
 sub display_configuration {
     my $config = shift;
     my $dirmap = shift;
 sub display_configuration {
     my $config = shift;
     my $dirmap = shift;
+    my @version = grep /\/usr\/share\/perl\//, @INC;
+    push @version, ('/usr/share/perl/5.10') if !$version[0];
     print "\n\nKoha will be installed with the following configuration parameters:\n\n";
     foreach my $key (sort keys %$config) {
         print sprintf("%-25.25s%s\n", $key, $config->{$key});
     print "\n\nKoha will be installed with the following configuration parameters:\n\n";
     foreach my $key (sort keys %$config) {
         print sprintf("%-25.25s%s\n", $key, $config->{$key});
@@ -1399,7 +1385,7 @@ sub display_configuration {
     print "\n\nTo change any configuration setting, please run\n";
     print "perl Makefile.PL again.  To override one of the target\n";
     print "directories, you can do so on the command line like this:\n";
     print "\n\nTo change any configuration setting, please run\n";
     print "perl Makefile.PL again.  To override one of the target\n";
     print "directories, you can do so on the command line like this:\n";
-    print "\nperl Makefile.PL PERL_MODULE_DIR=/usr/share/perl/5.8\n\n";
+    print "\nperl Makefile.PL PERL_MODULE_DIR=$version[0]\n\n";
     print "You can also set different default values for parameters\n";
     print "or override directory locations by using environment variables.\n";
     print "\nFor example:\n\n";
     print "You can also set different default values for parameters\n";
     print "or override directory locations by using environment variables.\n";
     print "\nFor example:\n\n";
@@ -1586,7 +1572,7 @@ make_upgrade_backup ::
 \t\$(NOECHO) umask 022; \$(MOD_BACKUP) \\
 /;
     foreach my $key (qw/KOHA_CONF_DIR INTRANET_TMPL_DIR INTRANET_WWW_DIR OPAC_TMPL_DIR OPAC_WWW_DIR
 \t\$(NOECHO) umask 022; \$(MOD_BACKUP) \\
 /;
     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/) {
+                     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
        $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
@@ -1603,13 +1589,6 @@ sub postamble {
     # variables -- this is for the use of
     # rewrite-confg.PL
 
     # variables -- this is for the use of
     # rewrite-confg.PL
 
-    # quote '$' in the two password parameters
-    my %config = %config;
-    $config{'DB_PASS'} =~ s/\$/\$\$/g;
-    if ($config{'INSTALL_ZEBRA'} eq "yes") {
-        $config{'ZEBRA_PASS'} =~ s/\$/\$\$/g;
-    }
-
     my $env;
        # Hereagain, we must alter syntax per platform...
        if ( $^O eq 'MSWin32' ) {
     my $env;
        # Hereagain, we must alter syntax per platform...
        if ( $^O eq 'MSWin32' ) {
@@ -1624,29 +1603,6 @@ sub postamble {
                $env .= join("\n", map { "export __${_}__ := $config{$_}" } keys %config);
        }
 
                $env .= join("\n", map { "export __${_}__ := $config{$_}" } keys %config);
        }
 
-    if ( $config{'RUN_DATABASE_TESTS'} eq 'yes' ) {
-        if ( open( my $confhandle, '>', 't/test-config.txt' ) ) {
-            print $confhandle "# This configuration file lets the t/Makefile prepare a test koha-conf.xml file.\n";
-            print $confhandle "# It is generated by the top-level Makefile.PL.\n";
-            print $confhandle "# It is separate from the standard koha-conf.xml so that you can edit this by hand and test with different configurations.\n";
-
-            # these directories will be relocated to the 't' directory
-            foreach my $dirname ( keys %$target_directories ) {
-                my $dir = main::_strip_destdir( $target_directories->{$dirname} );
-                if ( exists $test_suite_override_dirs{$dirname} ) {
-                    $dir = main::get_test_dir($dirname);
-                }
-                print $confhandle "$dirname = $dir\n"
-            }
-            print $confhandle "\n";
-
-            print $confhandle join( "\n", map { "$_ = $config{$_}" } keys( %config ) ), "\n";
-            close( $confhandle );
-        } else {
-            warn 'unable to open conf file for database dependent tests: $!';
-        }
-
-    }
     return "$env\n";
 }
 
     return "$env\n";
 }
 
@@ -1664,4 +1620,5 @@ MJ Ray mjr at phonecoop.coop
 Galen Charlton galen.charlton at liblime.com
 
 =cut
 Galen Charlton galen.charlton at liblime.com
 
 =cut
+
 FIXME: deal with .htaccess
 FIXME: deal with .htaccess