installer: added update_zebra_conf target
authorGalen Charlton <galen.charlton@liblime.com>
Fri, 4 Jan 2008 22:59:36 +0000 (16:59 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Sat, 5 Jan 2008 00:40:33 +0000 (18:40 -0600)
This target is meant to allow the easy updating
of the Zebra configuration files from an installation
package.

This has been tested for a 'dev' mode install, not
for the other types.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Makefile.PL

index 98b000b..deea059 100644 (file)
@@ -1198,9 +1198,29 @@ install :: all install_koha warn_koha_env_vars
     $install .= "\t\$(NOECHO) \$(ECHO) For other post-installation tasks, please consult the README.\n";
     $install .= "\t\$(NOECHO) \$(ECHO)\n";
 
+    if ($config{'INSTALL_ZEBRA'} eq "yes") {
+        $install .= _update_zebra_conf_target();
+    }
+
     return $install;
 }
 
+=head 2 _update_zebra_conf_target
+
+Add an installation target for updating
+Zebra's configuration files.
+
+=cut
+
+sub _update_zebra_conf_target {
+
+    my $target = "\nupdate_zebra_conf ::\n";
+    $target   .= "\tumask 022; \$(MOD_INSTALL) \\\n";
+    $target .= "\t\t\$(KOHA_INST_ZEBRA_CONF_DIR) \$(KOHA_DEST_ZEBRA_CONF_DIR) \n";
+
+    return $target;
+}
+
 sub postamble {
     # put directory mappings into Makefile
     # so that Make will export as environment