1 # Copyright 2007 MJ Ray
3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 2 of the License, or (at your option) any later
10 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along with
15 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
16 # Suite 330, Boston, MA 02111-1307 USA
18 # Current maintainer MJR http://mjr.towers.org.uk/
19 # See http://www.koha.org/wiki/?page=KohaInstaller
22 use ExtUtils::MakeMaker;
26 die "perl 5.6.1 or later required" unless ($] >= 5.006001);
28 # Hash up directory structure & files beginning with the directory we were called from (should be the base of koha)...
30 my $dirtree = hashdir('.');
35 Makefile.PL - Koha packager and installer
39 =head2 BASIC INSTALLATION
45 =head2 PACKAGING RELEASE TARBALLS
56 This is a packager and installer that uses
57 ExtUtils::MakeMaker, which is fairly common
59 As well as building tar or zip files
60 and installing with the above commands,
61 it allows us to check pre-requisites
62 and generate configuration files.
66 =head2 NAME, VERSION_FROM, ABSTRACT, AUTHOR
68 Basic metadata about this software.
72 Suppress generation of META.yml file.
76 Hash of perl modules and versions required.
84 Maybe use prompt() here in future to get configuration values
85 interactively at installation time.
89 This is a hash of PL scripts to run after installation and
90 the files to ask them to generate.
91 Maybe use the values from CONFIGURE
92 to generate initial configuration files in future.
98 This is a hash mapping directories and files in the
99 source tree to installation target directories. The rules
100 for this mapping are:
104 =item If a directory or file is specified, it and its
105 contents will be copied to the installation target directory.
107 =item If a subdirectory of a mapped directory is specified,
108 its target overrides the parent's target for that subdirectory.
110 =item The value of each map entry may either be a scalar containing
111 one target or a reference to an array of targets, in which case
112 the directory or file is copied to each target.
114 =item Any files at the top level of the source tree that are
115 not included in the map will not be installed.
117 =item Any directories at the top level of the source tree
118 that are not included in the map will be installed in
119 INTRANET_CGI_DIR. This is a sensible default given the
120 current organization of the source tree, but (FIXME) it
121 would be better to reorganize the source tree to better
122 match the installation system, to allow adding new directories
123 without having to adjust Makefile.PL each time. The idea
124 is to make the C<%target_map> hash as minimal as possible.
128 The permitted installation targets are:
132 =item INTRANET_CGI_DIR
134 CGI scripts for intranet (staff) interface.
136 =item INTRANET_TMPL_DIR
138 HTML templates for the intranet interface.
140 =item INTRANET_WWW_DIR
142 HTML files, images, etc. for DocumentRoot for the intranet interface.
146 CGI scripts for OPAC (public) interface.
150 HTML templates for the OPAC interface.
154 HTML files, images, etc. for DocumentRoot for the OPAC interface.
156 =item PERL_MODULE_DIR
158 Perl modules (at present just the C4 modules) that are intimately
159 tied to Koha. Depending on the installation options, these
160 may or may not be installed one of the standard directories
161 in Perl's default @LIB.
165 Directory for Koha configuration files.
169 Directory for Zebra configuration files.
173 This is a dummy target used to explicitly state
174 that a given file or directory is not to be installed.
175 This is used either for parts of the installer itself
176 or for development tools that are not applicable to a
177 production installation.
184 'about.pl' => 'INTRANET_CGI_DIR',
185 'acqui' => 'INTRANET_CGI_DIR',
186 'admin' => 'INTRANET_CGI_DIR',
187 'authorities' => 'INTRANET_CGI_DIR',
188 'C4' => 'PERL_MODULE_DIR',
189 'catalogue' => 'INTRANET_CGI_DIR',
190 'cataloguing' => 'INTRANET_CGI_DIR',
191 'changelanguage.pl' => [ 'INTRANET_CGI_DIR', 'OPAC_CGI_DIR' ],
192 'check_sysprefs.pl' => 'NONE',
193 'circ' => 'INTRANET_CGI_DIR',
194 'edithelp.pl' => 'INTRANET_CGI_DIR',
195 'etc' => 'KOHA_CONF_DIR',
196 'etc/zebradb' => 'ZEBRA_CONF_DIR',
197 'installer-CPAN.pl' => 'NONE',
198 'installer' => 'INTRANET_CGI_DIR',
199 'koha-tmpl' => 'NONE',
200 'koha-tmpl/intranet-tmpl' => 'INTRANET_TMPL_DIR',
201 'koha-tmpl/opac-tmpl' => 'OPAC_TMPL_DIR',
202 'koha-version.pl' => 'INTRANET_CGI_DIR', # FIXME this may need to be in OPAC_CGI_DIR as well, with an update to C4::Context
203 'labels' => 'INTRANET_CGI_DIR',
204 'mainpage.pl' => 'INTRANET_CGI_DIR',
205 'Makefile.PL' => 'NONE',
206 'MANIFEST.SKIP' => 'NONE',
207 'members' => 'INTRANET_CGI_DIR',
208 'misc' => 'NONE', # FIXME deal with a little later
209 'opac' => 'OPAC_CGI_DIR',
210 'README.txt' => 'NONE',
211 'reports' => 'INTRANET_CGI_DIR',
212 'reserve' => 'INTRANET_CGI_DIR',
213 'reviews' => 'INTRANET_CGI_DIR',
214 'rewrite-config.PL' => 'NONE',
215 'reviews' => 'INTRANET_CGI_DIR',
216 'rss' => 'NONE', # FIXME deal with a little later
217 'serials' => 'INTRANET_CGI_DIR',
218 'sms' => 'INTRANET_CGI_DIR',
219 'suggestion' => 'INTRANET_CGI_DIR',
220 'svc' => 'INTRANET_CGI_DIR',
222 'tmp' => 'NONE', # FIXME deal with later
223 'tools' => 'INTRANET_CGI_DIR',
224 'virtualshelves' => 'INTRANET_CGI_DIR',
227 =head1 CONFIGURATION OPTIONS
229 The following configuration options are used by the installer.
235 Specifies whether installation will be FHS-compliant (default,
236 assumes user has root), put everything under
237 a single directory (for users installing on a web host
238 that allows CGI scripts and a MySQL database but not root
239 access), or development (for a developer who wants to run
240 Koha from a git clone with no fuss).
244 Directory under which most components will go. Default
245 value will vary depending on INSTALL_MODE.
249 Whether to install Zebra configuration files and data
252 =item ZEBRA_MARC_FORMAT
254 Specifies format of MARC records to be indexed by Zebra.
258 Specifies primary language of records that will be
265 # default configuration options
266 my %config_defaults = (
267 'INSTALL_MODE' => 'standard',
268 'INSTALL_BASE' => '/usr/share/koha',
269 'INSTALL_ZEBRA' => 'yes',
270 'ZEBRA_MARC_FORMAT' => 'marc21',
271 'ZEBRA_LANGUAGE' => 'en',
274 # valid values for certain configuration options
275 my %valid_config_values = (
276 'INSTALL_MODE' => { 'standard' => 1, 'single' => 1, 'dev' => 1 },
277 'INSTALL_ZEBRA' => { 'yes' => 1, 'no' => 1 },
278 'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation
279 'ZEBRA_LANGUAGE' => { 'en' => 1, 'fr' => 1 }, # FIXME should generate from contents of distribution
282 my %config = get_configuration(\%config_defaults, \%valid_config_values);
283 my %target_directories = get_target_directories(\%config);
287 #VERSION => strftime('2.9.%Y%m%d%H',gmtime),
288 VERSION_FROM => 'C4/Context.pm',
289 ABSTRACT => 'Award-winning integrated library system (ILS) and Web OPAC',
290 AUTHOR => 'Koha Developers <koha-devel@nongnu.org>',
295 'CGI::Session' => '4.10',
296 'Class::Factory::Util' => 1.7,
297 'Class::Accessor' => 0.30,
298 'DBD::mysql' => 3.0008,
300 'Data::Dumper' => 2.121_08,
302 'Date::Manip' => 5.44,
303 'Digest::MD5' => 2.36,
304 'File::Temp' => 0.16,
305 'GD::Barcode::UPCE' => 1.1,
306 'Getopt::Long' => 2.35,
307 'Getopt::Std' => 1.05,
308 'HTML::Template::Pro' => 0.65,
309 'HTTP::Cookies' => 1.39,
310 'HTTP::Request::Common' => 1.26,
311 'LWP::Simple' => 1.41,
312 'LWP::UserAgent' => 2.033,
313 'Lingua::Stem' => 0.82,
314 'List::Util' => 1.18,
315 'Locale::Language' => 2.07,
316 'MARC::Charset' => 0.98,
317 'MARC::Crosswalk::DublinCore' => 0.03,
318 'MARC::File::XML' => 0.88,
319 'MARC::Record' => 2.00,
320 'MIME::Base64' => 3.07,
321 'MIME::QuotedPrint' => 3.07,
322 'Mail::Sendmail' => 0.79,
323 'PDF::API2' => 2.000,
324 'PDF::API2::Page' => 2.000,
325 'PDF::API2::Util' => 2.000,
326 'PDF::Reuse' => 0.33,
327 'PDF::Reuse::Barcode' => 0.05,
329 'Schedule::At' => 1.06,
330 'Term::ANSIColor' => 1.10,
332 'Test::Harness' => 2.56,
333 'Test::More' => 0.62,
335 'Text::CSV_XS' => 0.32,
336 'Text::Wrap' => 2005.082401,
337 'Time::HiRes' => 1.86,
338 'Time::localtime' => 1.02,
339 'Unicode::Normalize' => 0.32,
340 'XML::Dumper' => 0.81,
341 'XML::LibXML' => 1.59,
342 'XML::SAX::ParserFactory' => 1.01,
343 'XML::Simple' => 2.14,
350 PM => unhashdir($dirtree),
353 'test' => {TESTS => 't/dummy.t'},
356 # # Ask for options with prompt($question,$default) calls here?
357 # return { macro => { 'export TEST' => '755' } }
360 PL_FILES => { # generator => target(s)
361 'rewrite-config.PL' => [
362 '$(PREFIX)/share/koha/etc/koha-conf.xml',
363 '$(PREFIX)/share/koha/etc/koha-httpd.conf',
364 '$(PREFIX)/share/koha/etc/zebradb/etc/passwd',
365 '$(PREFIX)/share/koha/etc/zebradb/zebra-biblios.cfg',
366 '$(PREFIX)/share/koha/etc/zebradb/zebra-authorities.cfg'
369 # 'opac/getfromintranet.PL' => ['$(INST_LIBDIR)/opac/cgi-bin/detail.pl','$(INST_LIBDIR)/opac/cgi-bin/moredetail.pl','$(INST_LIBDIR)/opac/cgi-bin/search.pl','$(INST_LIBDIR)/opac/cgi-bin/subjectsearch.pl','$(INST_LIBDIR)/opac/cgi-bin/logout.pl'],
370 # 'misc/koha.conf.PL' => '$(INST_LIBDIR)/../etc/koha.conf',
371 # 'misc/apache-koha.conf.PL' => '$(INST_LIBDIR)/../etc/apache-koha.conf',
372 # 'misc/koha.sql.PL' => '$(INST_LIBDIR)/intranet/scripts/koha.sql',
373 # 'z3950/z3950-daemon-options.PL' => '$(INST_LIBDIR)/intranet/scripts/z3950daemon/z3950-daemon-options',
374 # # fake target to check permissions
375 # 'misc/chmod.PL' => '$(INST_LIBDIR)/fake-target'
377 # need to set ownerships
378 # need to load koha.sql
379 # need to link koha-httpd.conf
380 # need to start z3950-daemon
387 This function recurses through the directory structure and builds
388 a hash of hashes containing the structure with arrays holding filenames.
389 This directory hashing routine was taken from BrowserUK @ http://www.perlmonks.org/?node_id=219919
395 opendir my $dh, $dir or die $!;
396 my $tree = {}->{$dir} = {};
397 while( my $file = readdir($dh) ) {
398 next if $file =~ m/^\.{1,2}/;
399 my $path = $dir .'/' . $file;
400 $tree->{$file} = hashdir($path), next if -d $path;
401 push @{$tree->{'.'}}, $file;
408 This function unhashes the hash of hashes generated by hashdir().
409 This directory unhashing routine is the personal work of Chris Nighswonger (fbcit).
410 Modified here to build koha makefile. It lists all files and where to install each one.
411 It then returns a hash reference suitable for the PM variable above.
417 my $dirlevel = shift;
418 my $toplevel = $dirlevel;
419 for my $k1 ( sort keys %$dirhash ) {
420 if ($k1 ne '.' && $k1 ne '') {
421 $dirlevel = ( $dirlevel ? $dirlevel . '/' . $k1 : $k1 );
422 &unhashdir($dirhash->{ $k1 }, $dirlevel);
423 $dirlevel = $toplevel;
425 elsif ( $k1 eq '.' ) {
426 foreach $file ( @{$dirhash->{ $k1 }} ) {
427 # TODO: There are some hacks here that may be able to be improved... -fbcit
428 if ( $file =~ /^./ ) { next; } # skip hidden files and directories.
430 elsif ( $file =~ /\.pm/ && $dirlevel =~ /C4/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(INST_LIBDIR)/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # C4/*.pm is copied to perl's lib namespace.
432 elsif ( $dirlevel !~ /koha-tmpl/ && $dirlevel =~ /(installer|errors)/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(PREFIX)/lib/cgi-bin/koha/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # error templates are copied to $(PREFIX)/lib/cgi-bin/koha/
434 elsif ( $dirlevel =~ /koha-tmpl/ && $dirlevel !~ /errors/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(INST_LIBDIR)/koha/templates/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # error templates are copied to $(INST_LIBDIR)/koha/templates/
436 elsif ( $dirlevel =~ /(misc|rss)/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(INST_LIBDIR)/koha/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # misc & rss are copied to koha,
438 # elsif ( $dirlevel =~ /(intranet-tmpl|opac-tmpl)/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(INST_LIBDIR)/koha/templates/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # Templates are copied to koha/templates,
440 elsif ( $file !~ /\.pl/ && $dirlevel =~ /etc/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(PREFIX)/share/koha/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # Misc etc to koha/etc
442 elsif ( $file =~ /\.pl/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(PREFIX)/lib/cgi-bin/koha/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # CGIs are copied to $(PREFIX)/lib/cgi-bin/koha/ print $result{ ($dirlevel ? $dirlevel . '/' . $file : $file)},"\n\n";
451 =head2 get_configuration_options
453 This prompts the user for various configuration options.
457 sub get_configuration {
458 my $defaults = shift;
459 my $valid_values = shift;
463 By default, Koha can be installed in one of three ways:
465 standard: Install files in conformance with the Filesystem
466 Hierarchy Standard (FHS). This is the default mode
467 and should be used when installing a production
468 Koha system. On Unix systems, root access is
469 needed to complete a standard installation.
471 single: Install files under a single directory. This option
472 is useful for installing Koha without root access, e.g.,
473 on a web host that allows CGI scripts and MySQL databases
474 but requires the user to keep all files under the user's
477 dev: Create a set of symbolic links and configuration files to
478 allow Koha to run directly from the source distribution.
479 This mode is useful for developers who want to run
480 Koha from a git clone.
482 Please choose the installation mode);
483 $msg .= _add_valid_values_disp('INSTALL_MODE', $valid_values);
484 $config{'INSTALL_MODE'} = _get_value('INSTALL_MODE', $msg, $defaults->{'INSTALL_MODE'}, $valid_values);
486 # set message and default value for INSTALL_BASE
487 # depending on value of INSTALL_MODE
488 my $install_base_default = $defaults->{'INSTALL_BASE'};
489 if ($config{'INSTALL_MODE'} eq 'dev') {
491 Please specify the directory in which to install Koha's
492 active configuration files and (if applicable) the
493 Zebra database. Koha's CGI scripts and templates will
494 be run from the current directory.);
495 # FIXME - home directory portability consideration apply
496 $install_base_default = (exists $ENV{'HOME'}) ? "$ENV{'HOME'}/koha-dev" : "/usr/share/koha-dev";
497 } elsif ($config{'INSTALL_MODE'} eq 'single') {
498 $msg = "\nPlease specify the directory in which to install Koha";
499 # FIXME -- we're assuming under a 'single' mode install
500 # that user will likely want to install under the home
501 # directory. This is OK in and of itself, but we should
502 # use File::HomeDir to locate the home directory portably.
503 # This is deferred for now because File::HomeDir is not yet
505 $install_base_default = (exists $ENV{'HOME'}) ? "$ENV{'HOME'}/koha" : "/usr/share/koha";
509 Please specify the directory under which most Koha files
512 Note that if you are planning in installing more than
513 one instance of Koha, you may want to modify the last
514 component of the directory path, which will be used
515 as the package name in the FHS layout.);
517 $config{'INSTALL_BASE'} = _get_value('INSTALL_BASE', $msg, $install_base_default, $valid_values);
520 Koha can use the Zebra search engine for high-performance
521 searching of bibliographic and authority records. If you
522 have installed the Zebra software and would like to use it,
523 please answer 'yes' to the following question. Otherwise,
524 Koha will default to using its internal search engine.
526 Please specify whether to install the Zebra configuration files);
527 $msg .= _add_valid_values_disp('INSTALL_ZEBRA', $valid_values);
528 $config{'INSTALL_ZEBRA'} = _get_value('INSTALL_ZEBRA', $msg, $defaults->{'INSTALL_ZEBRA'}, $valid_values);
530 if ($config{'INSTALL_ZEBRA'} eq 'yes') {
532 Since you've chosen to use Zebra with Koha,
533 you must specify the primary MARC format of the
534 records to be indexed by Zebra.
536 Koha provides Zebra configuration files for MARC 21
539 Please specify the MARC format);
540 $msg .= _add_valid_values_disp('ZEBRA_MARC_FORMAT', $valid_values);
541 $config{'ZEBRA_MARC_FORMAT'} = _get_value('ZEBRA_MARC_FORMAT', $msg, $defaults->{'ZEBRA_MARC_FORMAT'}, $valid_values);
543 Koha supplies Zebra configuration files tuned for
544 searching either English (en) or French (fr) MARC
547 Please specify the primary language of the MARC records);
548 $msg .= _add_valid_values_disp('ZEBRA_LANGUAGE', $valid_values);
549 $config{'ZEBRA_LANGUAGE'} = _get_value('ZEBRA_LANGUAGE', $msg, $defaults->{'ZEBRA_LANGUAGE'}, $valid_values);
554 sub _add_valid_values_disp {
556 my $valid_values = shift;
559 if (exists $valid_values->{$key}) {
560 $disp = " (" . join(", ", sort keys %{ $valid_values->{$key} }) . ")";
569 my $valid_values = shift;
571 my $val = prompt($msg, $default);
572 while (exists $valid_values->{$key} and not exists $valid_values->{$key}->{$val}) {
573 my $retry_msg = "Value '$val' is not a valid option.\n";
574 $retry_msg .= "Please enter a value";
575 $retry_msg .= _add_valid_values_disp($key, $valid_values);
576 $val = prompt($retry_msg, $default);
581 =head2 get_target_directories
583 Creates a hash mapping from symbols for installation target
584 directories to actual directory paths.
588 sub get_target_directories {
591 my $base = $config->{'INSTALL_BASE'};
592 my $mode = $config->{'INSTALL_MODE'};
594 # get last component of install base directory
595 # to treat as package name
596 my ($volume, $directories, $file) = File::Spec->splitpath($base, 1);
597 my @basedir = File::Spec->splitdir($directories);
598 my $package = pop @basedir;
601 if ($mode eq 'single') {
602 # mode is standard, i.e., 'fhs'
603 $dirmap{'INTRANET_CGI_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'cgi-bin');
604 $dirmap{'INTRANET_TMPL_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'templates');
605 $dirmap{'INTRANET_WWW_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'www');
606 $dirmap{'OPAC_CGI_DIR'} = File::Spec->catdir(@basedir, $package, 'opac', 'cgi-bin');
607 $dirmap{'OPAC_TMPL_DIR'} = File::Spec->catdir(@basedir, $package, 'opac', 'templates');
608 $dirmap{'OPAC_WWW_DIR'} = File::Spec->catdir(@basedir, $package, 'opac', 'www');
609 $dirmap{'PERL_MODULE_DIR'} = File::Spec->catdir(@basedir, $package, 'lib');
610 $dirmap{'KOHA_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc');
611 $dirmap{'ZEBRA_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc', 'zebradb');
612 $dirmap{'EXAMPLE_DIR'} = File::Spec->catdir(@basedir, $package, 'example');
613 $dirmap{'SCRIPT_DIR'} = File::Spec->catdir(@basedir, $package, 'bin');
614 $dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man');
615 $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
616 $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lock', 'zebradb');
617 $dirmap{'LOG_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'log');
618 $dirmap{'ZEBRA_DATA_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lib', 'zebradb');
619 } elsif ($mode eq 'dev') {
620 my $curdir = File::Spec->rel2abs(File::Spec->curdir());
621 $dirmap{'INTRANET_CGI_DIR'} = File::Spec->catdir($curdir);
622 $dirmap{'INTRANET_TMPL_DIR'} = File::Spec->catdir($curdir, 'koha-tmpl', 'intranet-tmpl');
623 $dirmap{'INTRANET_WWW_DIR'} = File::Spec->catdir($curdir, 'koha-tmpl', 'intranet-tmpl');
624 $dirmap{'OPAC_CGI_DIR'} = File::Spec->catdir($curdir, 'opac');
625 $dirmap{'OPAC_TMPL_DIR'} = File::Spec->catdir($curdir, 'koha-tmpl', 'opac-tmpl');
626 $dirmap{'OPAC_WWW_DIR'} = File::Spec->catdir($curdir, 'koha-tmpl', 'opac-tmpl');
627 $dirmap{'PERL_MODULE_DIR'} = File::Spec->catdir($curdir);
628 $dirmap{'KOHA_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc');
629 $dirmap{'ZEBRA_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc', 'zebradb');
630 $dirmap{'EXAMPLE_DIR'} = File::Spec->catdir(@basedir, $package, 'example');
631 $dirmap{'SCRIPT_DIR'} = File::Spec->catdir(@basedir, $package, 'bin');
632 $dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man');
633 $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
634 $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lock', 'zebradb');
635 $dirmap{'LOG_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'log');
636 $dirmap{'ZEBRA_DATA_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lib', 'zebradb');
638 # mode is standard, i.e., 'fhs'
639 $dirmap{'INTRANET_CGI_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'cgi-bin');
640 $dirmap{'INTRANET_TMPL_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'templates');
641 $dirmap{'INTRANET_WWW_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'www');
642 $dirmap{'OPAC_CGI_DIR'} = File::Spec->catdir(@basedir, $package, 'opac', 'cgi-bin');
643 $dirmap{'OPAC_TMPL_DIR'} = File::Spec->catdir(@basedir, $package, 'opac', 'templates');
644 $dirmap{'OPAC_WWW_DIR'} = File::Spec->catdir(@basedir, $package, 'opac', 'www');
645 $dirmap{'PERL_MODULE_DIR'} = File::Spec->catdir(@basedir, $package, 'lib');
646 $dirmap{'KOHA_CONF_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'etc', $package);
647 $dirmap{'ZEBRA_CONF_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'etc', $package, 'zebradb');
648 $dirmap{'EXAMPLE_DIR'} = File::Spec->catdir(@basedir, $package, 'example');
649 $dirmap{'SCRIPT_DIR'} = File::Spec->catdir(@basedir, $package, 'bin');
650 $dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man');
651 $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
652 $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'var', 'lock', $package, 'zebradb');
653 $dirmap{'LOG_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'var', 'log', $package);
654 $dirmap{'ZEBRA_DATA_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'var', 'lib', $package, 'zebradb');
657 foreach my $key (sort keys %dirmap) {
658 print sprintf("%-25.25s%s\n", $key, $dirmap{$key});
665 #warn "\n\n\noverride\n\n\n";
674 ExtUtils::MakeMaker(3)
678 MJ Ray mjr at phonecoop.coop