@ -411,6 +411,7 @@ my %config_defaults = (
'PAZPAR2_HOST' = > 'localhost' ,
'PAZPAR2_PORT' = > '11002' ,
'RUN_DATABASE_TESTS' = > 'no' ,
'PATH_TO_ZEBRA' = > '' ,
) ;
# set some default configuratio options based on OS
@ -947,6 +948,21 @@ Install the Zebra configuration files?);
$config { 'INSTALL_ZEBRA' } = _get_value( 'INSTALL_ZEBRA' , $msg , $defaults ->{ 'INSTALL_ZEBRA' } , $valid_values , $install_log_values ) ;
if ( $config { 'INSTALL_ZEBRA' } eq 'yes' ) {
if ( defined( my $zebra_path = find_zebra( ) ) ) {
$config { 'PATH_TO_ZEBRA' } = $zebra_path ;
print qq(
F o u n d 'zebrasrv' a n d 'zebraidx' i n $ z e b r a _ p a t h .
) ;
} else {
print q(
U n a b l e t o f i n d t h e Z e b r a p r o g r a m s 'zebrasrv' a n d 'zebraidx'
i n y o u r P A T H o r i n s o m e o f t h e u s u a l p l a c e s . I f y o u h a v e n ' t
i n s t a l l e d Z e b r a y e t , p l e a s e d o s o a n d r u n M a k e f i l e . P L a g a i n .
) ;
}
$msg = q(
S i n c e y o u ' v e c h o s e n t o u s e Z e b r a w i t h K o h a ,
y o u m u s t s p e c i f y t h e p r i m a r y M A R C f o r m a t o f t h e
@ -1327,6 +1343,32 @@ sub display_configuration {
print "'dmake -x MAXLINELENGTH=300000'\n\n" ;
}
= h e a d 2 f i n d _ z e b r a
A t t e m p t t o f i n d Z e b r a - c h e c k u s e r ' s P A T H a n d
a f e w o t h e r d i r e c t o r i e s f o r z e b r a s r v a n d z e b r a i d x .
FIXME : doesn 't handle Win 32
= c u t
s u b f i n d _ z e b r a {
my @search_dirs = map {
my $abs = File::Spec->rel2abs( $_ ) ;
my ( $toss , $directories ) ;
( $toss , $directories , $toss ) = File::Spec->splitpath( $abs , 1) ;
$directories ;
} split /:/, $ENV { PATH} ;
push @search_dirs, qw( /usr/local/bin /opt/local/bin /usr/bin) ;
my @zebrasrv_dirs = grep { -x File::Spec->catpath( '' , $_ , 'zebrasrv' ) } @search_dirs;
return unless @zebrasrv_dirs;
# verify that directory that contains zebrasrv also contains zebraidx
foreach my $dir ( @zebrasrv_dirs) {
return $dir if -x File::Spec->catpath( '' , $dir , 'zebraidx' ) ;
}
return ;
}
p a c k a g e M Y ;
# This will have to be reworked in order to accommodate Win32...