Permalink
Browse files

Move many files to more FHS-like paths

Signed-off-by: Chris Cormack <crc@liblime.com>
  • Loading branch information...
1 parent 22b384e commit 243ec54e9a562bf9ceaf39baa43c6c15a5481a96 @mjray mjray committed with Chris Cormack Sep 7, 2007
Showing with 47 additions and 43 deletions.
  1. +10 −10 Makefile.PL
  2. +10 −10 etc/koha-conf.xml
  3. +17 −19 etc/koha-httpd.conf
  4. +1 −1 etc/zebra-authorities.cfg
  5. +1 −1 etc/zebra-biblios.cfg
  6. +8 −2 rewrite-config.PL
View
@@ -163,10 +163,10 @@ WriteMakefile(
PL_FILES => { # generator => target(s)
'rewrite-config.PL' => [
- '$(INST_LIBDIR)/koha/etc/koha-conf.xml',
- '$(INST_LIBDIR)/koha/etc/koha-httpd.conf',
- '$(INST_LIBDIR)/koha/etc/zebra-biblios.cfg',
- '$(INST_LIBDIR)/koha/etc/zebra-authorities.cfg'
+ '$(PREFIX)/share/koha/etc/koha-conf.xml',
+ '$(PREFIX)/share/koha/etc/koha-httpd.conf',
+ '$(PREFIX)/share/koha/etc/zebra-biblios.cfg',
+ '$(PREFIX)/share/koha/etc/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'],
@@ -206,15 +206,15 @@ C4/*.pm is copied to perl's lib namespace.
=pod
-CGIs are copied to koha/cgi-bin
-and other scripts to koha/scripts.
+CGIs are copied to $(PREFIX)/lib/cgi-bin/koha/
+and other scripts to koha/
=cut
foreach my $src ("mainpage.pl","help.pl",glob("*/*.pl"),glob("installer/*.pm"),glob("*/*/*.pl"),glob("*/*/*/*.pl")) {
if ($src =~ /(misc|updater|rss)\//) {
- $result{$src} = '$(INST_LIBDIR)/koha/scripts/'.$src;
+ $result{$src} = '$(INST_LIBDIR)/koha/'.$src;
} else {
- $result{$src} = '$(INST_LIBDIR)/koha/cgi-bin/'.$src;
+ $result{$src} = '$(PREFIX)/lib/cgi-bin/koha/'.$src;
}
}
@@ -236,12 +236,12 @@ excluding non-files, CVS files and whitespace in filenames.
}
=pod
-etc files are copied to koha/etc
+etc files are copied to /usr/share/koha/etc/
=cut
# Misc etc to koha/etc
foreach my $src (glob("etc/*")) {
- $result{$src} = '$(INST_LIBDIR)/koha/'.$src;
+ $result{$src} = '$(PREFIX)/share/koha/'.$src;
}
View
@@ -11,22 +11,22 @@
<!-- BIBLIOGRAPHIC RECORDS -->
<server id="biblioserver" listenref="biblioserver">
<directory>__BASE_DIR__/zebradb/biblios</directory>
- <config>__BASE_DIR__/etc/zebra-biblios.cfg</config>
- <cql2rpn>__BASE_DIR__/etc/pqf.properties</cql2rpn>
+ <config>__PREFIX__/share/koha/etc/zebra-biblios.cfg</config>
+ <cql2rpn>__PREFIX__/share/koha/etc/pqf.properties</cql2rpn>
</server>
<serverinfo id="biblioserver">
- <ccl2rpn>__BASE_DIR__/ccl.properties</ccl2rpn>
+ <ccl2rpn>__PREFIX__/share/koha/etc/ccl.properties</ccl2rpn>
<user>__ZEBRA_USER__</user>
<password>__ZEBRA_PASS__</password>
</serverinfo>
<!-- AUTHORITY RECORDS -->
<server id="authorityserver" listenref="authorityserver" >
<directory>__BASE_DIR__/zebradb/authorities</directory>
- <config>__BASE_DIR__/etc/zebra-authorities.cfg</config>
+ <config>__PREFIX__/share/koha/etc/zebra-authorities.cfg</config>
</server>
<serverinfo id="authorityserver">
- <ccl2rpn>__BASE_DIR__/etc/ccl.properties</ccl2rpn>
+ <ccl2rpn>__PREFIX__/share/koha/etc/ccl.properties</ccl2rpn>
<user>__ZEBRA_USER__</user>
<password>__ZEBRA_PASS__</password>
</serverinfo>
@@ -41,10 +41,10 @@
<biblioservershadow>1</biblioservershadow>
<authorityserver>authorities</authorityserver>
<authorityservershadow>1</authorityservershadow>
- <intranetdir>__BASE_DIR__/intranet/cgi-bin</intranetdir>
- <opacdir>__BASE_DIR__/opac/cgi-bin</opacdir>
- <opachtdocs>__BASE_DIR__/opac/htdocs/opac-tmpl</opachtdocs>
- <intrahtdocs>__BASE_DIR__/intranet/htdocs/intranet-tmpl</intrahtdocs>
- <includes>__BASE_DIR__/intranet/htdocs/intranet-tmpl/default/en/includes/</includes>
+ <intranetdir>__CGI_DIR__</intranetdir>
+ <opacdir>__CGI_DIR__/opac</opacdir>
+ <opachtdocs>__BASE_DIR__/templates/koha-tmpl/opac-tmpl</opachtdocs>
+ <intrahtdocs>__BASE_DIR__/templates/koha-tmpl/intranet-tmpl</intrahtdocs>
+ <includes>__BASE_DIR__/templates/koha-tmpl/intranet-tmpl/default/en/includes/</includes>
</config>
</yazgfs>
View
@@ -5,24 +5,23 @@
## OPAC
<VirtualHost __WEBSERVER_IP__:__WEBSERVER_PORT__>
ServerAdmin __WEBMASTER_EMAIL__
- DocumentRoot __BASE_DIR__/opac/htdocs
+ DocumentRoot __BASE_DIR__/templates/koha-tmpl/
ServerName __WEBSERVER_HOST__
# ServerAlias opac.mydomain.com
- ScriptAlias /cgi-bin/koha/ "__BASE_DIR__/opac/cgi-bin/"
- ScriptAlias /index.html "__BASE_DIR__/opac/cgi-bin/opac-main.pl"
- ScriptAlias /opac-search.pl "__BASE_DIR__/opac/cgi-bin/search"
- ScriptAlias /search "__BASE_DIR__/opac/cgi-bin/search"
- ErrorLog __BASE_DIR__/log/opac-error_log
-# TransferLog __BASE_DIR__/log/opac-access_log
- SetEnv PERL5LIB "__BASE_DIR__/intranet/modules"
- SetEnv KOHA_CONF "__BASE_DIR__/etc/koha-conf.xml"
+ ScriptAlias /cgi-bin/koha/ "__CGI_DIR__/opac/"
+ ScriptAlias /index.html "__CGI_DIR__/opac/opac-main.pl"
+ ScriptAlias /opac-search.pl "__CGI_DIR__/opac/search"
+ ScriptAlias /search "__CGI_DIR__/opac/search"
+ ErrorLog __LOG_DIR__/koha-opac-error_log
+# TransferLog __LOG_DIR__/koha-opac-access_log
+ SetEnv KOHA_CONF "__PREFIX__/share/koha/etc/koha-conf.xml"
Options +FollowSymLinks
# Rewrite Rules
RewriteEngine On
# Uncomment to turn on rewrite logging
-# RewriteLog __BASE_DIR__/log/opac-rewrite.log
+# RewriteLog __LOG_DIR__/koha-opac-rewrite.log
# RewriteLogLevel 1
RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
RewriteRule (.+) $1?%1%2 [N,R,NE]
@@ -35,20 +34,19 @@
## Intranet
<VirtualHost __WEBSERVER_IP__:__WEBSERVER_PORT_LIBRARIAN__>
ServerAdmin __WEBMASTER_EMAIL__
- DocumentRoot __BASE_DIR__/intranet/htdocs
+ DocumentRoot __BASE_DIR__/templates/koha-tmpl/
ServerName __WEBSERVER_HOST__:__WEBSERVER_PORT_LIBRARIAN__
# ServerAlias intranet.mydomain.com
- ScriptAlias /cgi-bin/koha/ "__BASE_DIR__/intranet/cgi-bin/"
- ScriptAlias /index.html "__BASE_DIR__/intranet/cgi-bin/mainpage.pl"
- ScriptAlias /search "__BASE_DIR__/intranet/cgi-bin/search.pl"
- ErrorLog __BASE_DIR__/log/error_log
-# TransferLog __BASE_DIR__/log/access_log
- SetEnv PERL5LIB "__BASE_DIR__/intranet/modules"
- SetEnv KOHA_CONF "__BASE_DIR__/etc/koha-conf.xml"
+ ScriptAlias /cgi-bin/koha/ "__CGI_DIR__/"
+ ScriptAlias /index.html "__CGI_DIR__/mainpage.pl"
+ ScriptAlias /search "__CGI_DIR__/search.pl"
+ ErrorLog __LOG_DIR__/koha-error_log
+# TransferLog __LOG_DIR__/koha-access_log
+ SetEnv KOHA_CONF "__PREFIX__/share/koha/etc/koha-conf.xml"
Options +FollowSymLinks
RewriteEngine On
# Uncomment to turn on rewrite logging
-# RewriteLog __BASE_DIR__/log/intranet-rewrite.log
+# RewriteLog __LOG_DIR__/koha-intranet-rewrite.log
# RewriteLogLevel 1
RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
@@ -4,7 +4,7 @@
# $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $
#
# Where are the config files located?
-profilePath:__BASE_DIR__/zebradb/authorities/tab:__BASE_DIR__/zebradb/tab
+profilePath:__PREFIX__/share/koha/etc/zebradb/authorities/tab:__PREFIX__/share/koha/etc/zebradb/tab
encoding: UTF-8
# modulePath - where to look for loadable zebra modules
@@ -3,7 +3,7 @@
# $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $
#
# Where are the config files located?
-profilePath:__BASE_DIR__/zebradb/biblios/tab:__BASE_DIR__/zebradb/tab
+profilePath:__PREFIX__/share/koha/etc/zebradb/biblios/tab:__PREFIX__/share/koha/etc/zebradb/tab
# modulePath - where to look for loadable zebra modules
modulePath: /usr/lib/idzebra-2.0/modules
View
@@ -41,7 +41,9 @@ guesses worked out by the script.
The following configuration keywords are available:
-BASE_DIR, MYSQL_DB, MYSQL_HOST, MYSQL_PASS, MYSQL_USER, WEBMASTER_EMAIL, WEBSERVER_DOMAIN,
+PREFIX,
+BASE_DIR, CGI_DIR, LOG_DIR,
+MYSQL_DB, MYSQL_HOST, MYSQL_PASS, MYSQL_USER, WEBMASTER_EMAIL, WEBSERVER_DOMAIN,
WEBSERVER_HOST, WEBSERVER_IP, WEBSERVER_PORT, WEBSERVER_PORT_LIBRARIAN, ZEBRA_PASS, ZEBRA_USER
=head1 EXAMPLES
@@ -61,16 +63,20 @@ $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";
# These are our configuration guesses
# Keys were extracted by
# <grep -o '__.*__' etc/* | cut -f2 -d: | sort -u | sed -e 's/^/ "/;s/$/" => "",/'
%configuration = (
- "__BASE_DIR__" => sprintf("/usr/lib/perl5/site-perl/%vd/koha",$^V),
+ "__BASE_DIR__" => ($ENV{'INSTALLSITELIB'} || sprintf($prefix."/lib/perl5/site_perl/%vd",$^V))."/koha",
+ "__CGI_DIR__" => $prefix."/lib/cgi-bin/koha",
+ "__LOG_DIR__" => "/var/log",
"__MYSQL_DB__" => "koha",
"__MYSQL_HOST__" => $myhost,
"__MYSQL_PASS__" => "katikoan",
"__MYSQL_USER__" => "kohaadmin",
+ "__PREFIX__" => $prefix,
"__WEBMASTER_EMAIL__" => 'webmaster@'.$mydomain,
"__WEBSERVER_DOMAIN__" => $mydomain,
"__WEBSERVER_HOST__" => $myhost,

0 comments on commit 243ec54

Please sign in to comment.