- $install .= "install_koha ::\n";
- $install .= "\t\$(NOECHO) umask 022; \$(MOD_INSTALL) \\\n";
- foreach my $key (sort keys %$target_directories) {
- $install .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n"
- unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
- }
- $install .= "\t\t\$(INST_MAN1DIR) \$(DESTINSTALLMAN1DIR) \\\n";
- $install .= "\t\t\$(INST_MAN3DIR) \$(DESTINSTALLMAN3DIR)\n";
-
- $install .= "\n";
- $install .= "set_koha_ownership ::\n";
- if ($config{'INSTALL_MODE'} eq 'standard' and $config{'KOHA_USER'} ne "root") {
- foreach my $key (sort keys %$target_directories) {
- $install .= "\t\$(NOECHO) chown -R $config{'KOHA_USER'}:$config{'KOHA_GROUP'} \$(KOHA_DEST_$key)\n"
- unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
- }
- } else {
- $install .= "\t\t\$(NOECHO) \$(NOOP)\n\n";
- }
-
- $install .= "\n";
- $install .= "set_koha_permissions ::\n";
- # This is necessary because EU::MM installs files
- # as either 0444 or 0555, and we want the owner
- # of Koha's files to have write permission by default.
- foreach my $key (sort keys %$target_directories) {
- $install .= "\t\$(NOECHO) chmod -R u+w \$(KOHA_DEST_$key)\n"
- unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
- }
- $install .= "\n";
+ $install .= "install_koha ::\n";
+ $install .= "\t\$(NOECHO) umask 022; \$(MOD_INSTALL) \\\n";
+ foreach my $key (sort keys %$target_directories) {
+ $install .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n"
+ unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
+ }
+ $install .= "\t\t\$(INST_MAN1DIR) \$(DESTINSTALLMAN1DIR) \\\n";
+ $install .= "\t\t\$(INST_MAN3DIR) \$(DESTINSTALLMAN3DIR)\n";
+
+ $install .= "\n";
+ $install .= "set_koha_ownership ::\n";
+ if ($config{'INSTALL_MODE'} eq 'standard' and $config{'KOHA_USER'} ne "root") {
+ foreach my $key (sort keys %$target_directories) {
+ $install .= "\t\$(NOECHO) chown -R $config{'KOHA_USER'}:$config{'KOHA_GROUP'} \$(KOHA_DEST_$key)\n"
+ unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
+ }
+ } else {
+ $install .= "\t\t\$(NOECHO) \$(NOOP)\n\n";
+ }
+
+ $install .= "\n";
+ $install .= "set_koha_permissions ::\n";
+ # This is necessary because EU::MM installs files
+ # as either 0444 or 0555, and we want the owner
+ # of Koha's files to have write permission by default.
+ foreach my $key (sort keys %$target_directories) {
+ $install .= "\t\$(NOECHO) chmod -R u+w \$(KOHA_DEST_$key)\n"
+ unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
+ }
+ }
+ elsif ($^O eq 'MSWin32' ) { # On Win32, the install probably needs to be done under the user account koha will be running as...
+ # We can attempt some creative things with command line utils such as CACLS which allows permission
+ # management from Win32 cmd.exe, but permissions really only apply to NTFS.
+ foreach my $key (sort keys %$target_directories) {
+ $install .= qq(
+KOHA_INST_$key = blib/$key
+KOHA_DEST_$key = $target_directories->{$key}
+) unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
+ }
+ $install .= qq(
+install :: all install_koha warn_koha_env_vars
+\t\$(NOECHO) \$(NOOP)
+);
+ $install .= "install_koha ::\n";
+ $install .= "\t\$(MOD_INSTALL) \\\n";
+ foreach my $key (sort keys %$target_directories) {
+ $install .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n"
+ unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key};
+ }
+ }
+ $install .= "\n";