From d1f96656653e89e6590a0b58c44be87c9506a743 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Tue, 20 Nov 2007 12:44:33 -0600 Subject: [PATCH] Now using install_base instead of prefix [Galen's note: during patch merge, ended up setting default INSTALL_BASE back to /usr instead of /usr/local. This needs to be examined again to see if C4 perl modules should go under /usr/local/lib instead of /usr/lib in Debian.] Signed-off-by: Galen Charlton --- Makefile.PL | 25 ++++++++++++++----------- rewrite-config.PL | 4 ++-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 6d59eb97c9..d768daca53 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -33,6 +33,7 @@ Makefile.PL - Koha packager and installer =head2 BASIC INSTALLATION perl Makefile.PL + or perl Makefile.PL INSTALL_BASE=/path/to/your/home/dir make sudo make install @@ -172,11 +173,11 @@ WriteMakefile( PL_FILES => { # generator => target(s) 'rewrite-config.PL' => [ - '$(PREFIX)/share/koha/etc/koha-conf.xml', - '$(PREFIX)/share/koha/etc/koha-httpd.conf', - '$(PREFIX)/share/koha/etc/zebradb/etc/passwd', - '$(PREFIX)/share/koha/etc/zebradb/zebra-biblios.cfg', - '$(PREFIX)/share/koha/etc/zebradb/zebra-authorities.cfg' + '$(INSTALL_BASE)/share/koha/etc/koha-conf.xml', + '$(INSTALL_BASE)/share/koha/etc/koha-httpd.conf', + '$(INSTALL_BASE)/share/koha/etc/zebradb/etc/passwd', + '$(INSTALL_BASE)/share/koha/etc/zebradb/zebra-biblios.cfg', + '$(INSTALL_BASE)/share/koha/etc/zebradb/zebra-authorities.cfg' ] } # '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'], @@ -216,16 +217,18 @@ C4/*.pm is copied to perl's lib namespace. =pod -CGIs are copied to $(PREFIX)/lib/cgi-bin/koha/ +CGIs are copied to $(INSTALL_BASE)/lib/cgi-bin/koha/ and other scripts to koha/ =cut foreach my $src ("mainpage.pl","help.pl","kohaversion.pl",glob("*/*.pl"),glob("installer/*"),glob("installer/*/*/*/*"),glob("*/*/*.pl"),glob("*/*/*/*.pl")) { + if (-f $src) { if ($src =~ /(misc|updater|rss)\//) { $result{$src} = '$(INST_LIBDIR)/koha/'.$src; } else { - $result{$src} = '$(PREFIX)/lib/cgi-bin/koha/'.$src; + $result{$src} = '$(INSTALL_BASE)/lib/cgi-bin/koha/'.$src; } + } } =pod @@ -253,14 +256,14 @@ etc files are copied to /usr/share/koha/etc/ # Misc etc to koha/etc foreach my $src (glob("etc/zebradb/*/*/*"),glob("etc/zebradb/*/*"),glob("etc/zebradb/*"),glob("etc/*")) { if (-f $src) { - $result{$src} = '$(PREFIX)/share/koha/'.$src; + $result{$src} = '$(INSTALL_BASE)/share/koha/'.$src; } } # set up zebra with the appropriate language and marc config - $result{"etc/zebradb/lang_defs/sort-string-$lang_value.chr"} = '$(PREFIX)/share/koha/etc/zebradb/etc/sort-string-utf.chr'; - $result{"etc/zebradb/marc_defs/biblios-$marc_value.abs"} = '$(PREFIX)/share/koha/etc/zebradb/biblios/etc/record.abs'; - $result{"etc/zebradb/marc_defs/authorities-$marc_value.abs"} = '$(PREFIX)/share/koha/etc/zebradb/authorities/etc/record.abs'; + $result{"etc/zebradb/lang_defs/sort-string-$lang_value.chr"} = '$(INSTALL_BASE)/share/koha/etc/zebradb/etc/sort-string-utf.chr'; + $result{"etc/zebradb/marc_defs/biblios-$marc_value.abs"} = '$(INSTALL_BASE)/share/koha/etc/zebradb/biblios/etc/record.abs'; + $result{"etc/zebradb/marc_defs/authorities-$marc_value.abs"} = '$(INSTALL_BASE)/share/koha/etc/zebradb/authorities/etc/record.abs'; return \%result; } diff --git a/rewrite-config.PL b/rewrite-config.PL index 7c2fa2a7a1..70307ca337 100644 --- a/rewrite-config.PL +++ b/rewrite-config.PL @@ -44,7 +44,7 @@ guesses worked out by the script. The following configuration keywords are available: PREFIX, -BASE_DIR, CGI_DIR, LOG_DIR, +BASE_DIR, CGI_DIR, LOG_DIR, INSTALL_BASE, DB_TYPE, DB_HOST, DB_PORT, DB_NAME, DB_PASS, DB_USER, WEBMASTER_EMAIL, WEBSERVER_DOMAIN, WEBSERVER_HOST, WEBSERVER_IP, WEBSERVER_PORT, WEBSERVER_PORT_LIBRARIAN, ZEBRA_PASS, ZEBRA_USER @@ -65,7 +65,7 @@ $mydomain = $myhost; $mydomain =~ s/^.*?\.//; # This is set here to rescue systems with broken DNS $myip = $ENV{'WEBSERVER_IP'} || inet_ntoa(scalar gethostbyname($myhost||'localhost')) || die "Cannot get our own IP address: DNS fault?"; -$prefix = $ENV{'PREFIX'} || "/usr/local"; +$prefix = $ENV{'INSTALL_BASE'} || "/usr"; # These are our configuration guesses # Keys were extracted by -- 2.11.0