diff --git a/Makefile.PL b/Makefile.PL index ada42246ff..ecd4297460 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -101,6 +101,7 @@ Makefile.PL - Koha packager and installer --font_dir Location of fonts (e.g. /usr/share/fonts/truetype/ttf-dejavu) --run_database_tests Run database dependent tests (yes, no) --install_base Base directory of installation (e.g. /usr/share/koha) + --template-cache-dir Specify a template cache directory (e.g. /var/cache/koha) --help Display this help message =head1 DESCRIPTION @@ -485,6 +486,7 @@ my %config_defaults = ( 'USE_MEMCACHED' => 'no', 'MEMCACHED_SERVERS' => '127.0.0.1:11211', 'MEMCACHED_NAMESPACE' => 'KOHA', + 'TEMPLATE_CACHE_DIR' => '/tmp/koha', 'FONT_DIR' => '/usr/share/fonts/truetype/ttf-dejavu' ); @@ -546,6 +548,7 @@ my $cli_koha_use_memcached = ""; my $cli_koha_font_dir = ""; my $cli_koha_run_database_tests = ""; my $cli_koha_install_base = ""; +my $cli_koha_template_cache_dir = ""; Getopt::Long::Configure('pass_through'); my $results = GetOptions( "prev-install-log=s" => \$koha_install_log, @@ -574,6 +577,7 @@ my $results = GetOptions( "font_dir=s" => \$cli_koha_font_dir, "run_database_tests=s" => \$cli_koha_run_database_tests, "install_base=s" => \$cli_koha_install_base, + "template-cache-dir=s" => \$cli_koha_template_cache_dir, "help" => sub { HelpMessage(0) }, ) or HelpMessage(1); @@ -861,7 +865,8 @@ sub get_cli_values { USE_MEMCACHED => $cli_koha_use_memcached, FONT_DIR => $cli_koha_font_dir, RUN_DATABASE_TESTS => $cli_koha_run_database_tests, - INSTALL_BASE => $cli_koha_install_base + INSTALL_BASE => $cli_koha_install_base, + TEMPLATE_CACHE_DIR => $cli_koha_template_cache_dir }; foreach my $key (keys %{$map}) { $values->{$key} = $map->{$key} if ($map->{$key}); @@ -1241,6 +1246,10 @@ Memcached namespace?); $config{'MEMCACHED_NAMESPACE'} = _get_value('MEMCACHED_NAMESPACE', $msg, $defaults->{'MEMCACHED_NAMESPACE'}, $valid_values, $install_log_values); } + $msg = q( +Template cache directory?); + $config{'TEMPLATE_CACHE_DIR'} = _get_value('TEMPLATE_CACHE_DIR', $msg, $defaults->{'TEMPLATE_CACHE_DIR'}, $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); diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml index 067e97854b..268175dc67 100644 --- a/etc/koha-conf.xml +++ b/etc/koha-conf.xml @@ -122,10 +122,7 @@ __PAZPAR2_TOGGLE_XML_POST__ __KOHA_CONF_DIR__/log4perl.conf __MEMCACHED_SERVERS__ __MEMCACHED_NAMESPACE__ - + __TEMPLATE_CACHE_DIR__ CHANGEME diff --git a/rewrite-config.PL b/rewrite-config.PL index d827106d93..5366493a18 100644 --- a/rewrite-config.PL +++ b/rewrite-config.PL @@ -153,6 +153,7 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr"; "__MEMCACHED_SERVERS__" => "", "__MEMCACHED_NAMESPACE__" => "", "__FONT_DIR__" => "/usr/share/fonts/truetype/ttf-dejavu", + "__TEMPLATE_CACHE_DIR__" => "/tmp/koha" ); # Override configuration from the environment