Bug 17951: (follow-up) Make Makefile.PL handle template_cache_dir config
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 25 Apr 2017 15:25:32 +0000 (12:25 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 22 Dec 2017 16:15:39 +0000 (13:15 -0300)
commita523f09e043fa7d6a17fc93406f966cab5671583
tree2305fd8e98ea9afe0d248abaadc3b9122a781b1f
parent06a1f18a1b7c0b34d0519084d17fd52a7f32bec4
Bug 17951: (follow-up) Make Makefile.PL handle template_cache_dir config

This patch adds Makefile.PL the capability of handling the template_cache_dir configuration entry.
To do so, it:
- Adds the --template-cache-dir option switch (consistency with koha-create)
- Sets a default value for template_cache_dir to '/tmp/koha'
- Adds a dialog requesting the path for the template cache dir to Makefile.PL
- It tweaks etc/koha-conf.xml so it is correctly changed by rewrite-config.PL

To test:
- Apply this patch
- Run:
  $ perl Makefile.PL --template-cache-dir your/favourite/dir
=> SUCCESS: The dialogs don't ask for template cache dir
=> SUCCESS: The resulting Makefile contains an entry for TEMPLATE_CACHE_DIR which value
            matches what we passed to --template-cache-dir
- Run:
  $ perl Makefile.PL
- When prompted for a template cache dir, introduce whatever you want
=> SUCCESS: The default you are offered is /tmp/koha
=> SUCCESS: At the end of the process, Makefile contains what we put in there
- Run:
  $ sudo make install
=> SUCCESS: The resulting koha-conf.xml contains a <template_cache_dir> entry containing
            whatever you picked for that purpose.
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Makefile.PL
etc/koha-conf.xml
rewrite-config.PL