Permalink
Browse files

Add configuration file helper to the installer

Signed-off-by: Chris Cormack <crc@liblime.com>
  • Loading branch information...
1 parent 29ff87d commit e449c139fff95241bd3b9f1ddfc506d786a6e9a6 @mjray mjray committed with Chris Cormack Sep 6, 2007
View
@@ -28,8 +28,7 @@ use vars qw($VERSION $AUTOLOAD),
qw($context),
qw(@context_stack);
-$VERSION = do { my @v = '$Revision$' =~ /\d+/g;
- shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
+$VERSION = '3.00.00.002';
=head1 NAME
View
@@ -47,7 +47,7 @@ and generate configuration files.
=head1 VARIABLES
-=head2 NAME, VERSION, ABSTRACT, AUTHOR
+=head2 NAME, VERSION_FROM, ABSTRACT, AUTHOR
Basic metadata about this software.
@@ -79,7 +79,8 @@ to generate initial configuration files.
WriteMakefile(
NAME => 'koha',
- VERSION => strftime('2.9.%Y%m%d%H',gmtime),
+ #VERSION => strftime('2.9.%Y%m%d%H',gmtime),
+ VERSION_FROM => 'C4/Context.pm',
ABSTRACT => 'Award-winning integrated library system (ILS) and Web OPAC',
AUTHOR => 'Koha Developers <koha-devel@nongnu.org>',
NO_META => 1,
@@ -150,7 +151,14 @@ WriteMakefile(
# return { macro => { 'export TEST' => '755' } }
# },
-# PL_FILES => { # generator => target
+ 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'
+ ]
+ }
# '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'],
# 'misc/koha.conf.PL' => '$(INST_LIBDIR)/../etc/koha.conf',
# 'misc/apache-koha.conf.PL' => '$(INST_LIBDIR)/../etc/apache-koha.conf',
@@ -217,6 +225,16 @@ excluding non-files, CVS files and whitespace in filenames.
$result{$src} = '$(INST_LIBDIR)/koha/templates/'.$src;
}
}
+=pod
+
+etc files are copied to koha/etc
+
+=cut
+ # Misc etc to koha/etc
+ foreach my $src (glob("etc/*")) {
+ $result{$src} = '$(INST_LIBDIR)/koha/'.$src;
+ }
+
return \%result;
}
@@ -228,5 +246,9 @@ __END__
ExtUtils::MakeMaker(3)
+=head1 AUTHOR
+
+MJ Ray mjr at phonecoop.coop
+
=cut
View
@@ -0,0 +1,20 @@
+
+Koha Configuration Files:
+
+The following files specify the base configuration for Koha ZOOM:
+
+ * koha-httpd.conf
+In a debian system, this apache configuration file will be symlinked
+from /etc/apache2/sites-enabled
+Specify Koha's IP address with NameVirtualHost
+Set ServerName, etc
+
+ * koha-production.xml
+ * koha-testing.xml
+These are the production and testing configurations for zebrasrv and for Koha.
+The first part of each file specifies Zebra server names, indexing configuration files,
+and query language configurations. Koha configuration directives follow.
+
+ * zebra-authorities.cfg
+ * zebra-biblios.cfg
+
File renamed without changes.
View
@@ -0,0 +1,45 @@
+# CCL field mappings
+# $Id: default.bib,v 1.1 2006/06/13 16:44:21 mike Exp $
+#
+# The rule below is used when no fields are specified
+term t=l,r s=al
+#
+# Simple rule for a field called "clean"
+clean t=l,r
+#
+# Rules for some BIB-1 fields
+au u=1003 s=pw
+ti u=4 s=pw
+isbn u=7
+issn u=8
+cc u=20
+su u=21 s=pw
+date u=30 r=r
+dp u=31 r=r
+da u=32 r=r
+la u=54 s=pw
+ab u=62 s=pw
+note u=63 s=pw
+af u=1006 s=pw
+#
+# Rules for a few GILS fields
+north gils-attset,u=2040 r=o
+south gils-attset,u=2041 r=o
+east gils-attset,u=2038 r=o
+west gils-attest,u=2039 r=o
+distributor gils-attset,u=2000 s=pw
+distributorname gils-attset,u=2001 s=pw
+
+# Explain fields
+ExplainCategory exp1,1=1
+HumanStringLanguage exp1,1=2
+DatabaseName exp1,1=3
+TargetName exp1,1=4
+AttributeSetOID exp1,1=5
+RecordSyntaxOID exp1,1=6
+TagSetOID exp1,1=7
+ExtededServiceOID exp1,1=8
+DateAdded exp1,1=9
+DateChanged exp1,1=10
+DateExpires exp1,1=11
+ElementSetName exp1,1=12
View
@@ -0,0 +1,50 @@
+<yazgfs>
+<!-- [scheme:]host[:port][/databaseName] -->
+<!-- scheme: tcp, ssl, unix, http, sru -->
+<!-- can run all servers on tcp, but the unix socket is faster -->
+
+<listen id="biblioserver" >unix:__BASE_DIR__/tmp/bibliosocket</listen>
+<listen id="authorityserver" >unix:__BASE_DIR__/tmp/authoritysocket</listen>
+<!-- public server runs on tcp -->
+<!-- <listen id="publicserver" >tcp:@:9999</listen> -->
+
+<!-- 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>
+</server>
+<serverinfo id="biblioserver">
+ <ccl2rpn>__BASE_DIR__/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>
+</server>
+<serverinfo id="authorityserver">
+ <ccl2rpn>__BASE_DIR__/etc/ccl.properties</ccl2rpn>
+ <user>__ZEBRA_USER__</user>
+ <password>__ZEBRA_PASS__</password>
+</serverinfo>
+
+<!-- ADDITIONAL KOHA CONFIGURATION DIRECTIVE -->
+<config>
+ <database>__MYSQL_DB__</database>
+ <hostname>__MYSQL_HOST__</hostname>
+ <user>__MYSQL_USER__</user>
+ <pass>__MYSQL_PASS__</pass>
+ <biblioserver>biblios</biblioserver>
+ <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>
+</config>
+</yazgfs>
View
@@ -0,0 +1,59 @@
+# Koha Apache Configuration Directives
+
+#NameVirtualHost *
+
+## OPAC
+<VirtualHost __WEBSERVER_IP__:80>
+ ServerAdmin webmaster@__WEBSERVER_DOMAIN__
+ DocumentRoot __BASE_DIR__/opac/htdocs
+ 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"
+ Options +FollowSymLinks
+
+# Rewrite Rules
+ RewriteEngine On
+
+# Uncomment to turn on rewrite logging
+# RewriteLog __BASE_DIR__/log/opac-rewrite.log
+# RewriteLogLevel 1
+ RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
+ RewriteRule (.+) $1?%1%2 [N,R,NE]
+
+ RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT]
+ RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
+ RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
+</VirtualHost>
+
+## Intranet
+<VirtualHost __WEBSERVER_IP__:8080>
+ ServerAdmin webmaster@__WEBSERVER_DOMAIN__
+ DocumentRoot __BASE_DIR__/intranet/htdocs
+ ServerName __WEBSERVER_HOST__:8080
+# 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"
+ Options +FollowSymLinks
+ RewriteEngine On
+# Uncomment to turn on rewrite logging
+# RewriteLog __BASE_DIR__/log/intranet-rewrite.log
+# RewriteLogLevel 1
+
+ RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
+ RewriteRule (.+) $1?%1%2 [N,R,NE]
+ RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/detail\.pl?bib=$1 [PT]
+ RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
+ RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
+</VirtualHost>
File renamed without changes.
@@ -0,0 +1,46 @@
+
+# Simple Zebra configuration file that defines
+# a database with MARCXML records.
+# $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
+
+encoding: UTF-8
+# modulePath - where to look for loadable zebra modules
+modulePath: /usr/lib/idzebra-2.0/modules
+
+# Files that describe the attribute sets supported.
+attset: bib1.att
+attset: explain.att
+attset:gils.att
+
+#systag sysno rank
+# Specify record type
+iso2709.recordType:grs.marcxml.record
+recordType:grs.xml
+recordId: (bib1,Local-Number)
+# was auth1
+storeKeys:1
+storeData:1
+
+
+# Lock File Area
+lockDir: __BASE_DIR__/zebradb/authorities/lock
+perm.anonymous:r
+perm.kohaadmin:rw
+passw.kohalis
+shadow
+register: __BASE_DIR__/zebradb/authorities/register:4G
+shadow: __BASE_DIR__/zebradb/authorities/shadow:1G
+
+# Temp File area for result sets
+setTmpDir: __BASE_DIR__/zebradb/authorities/tmp
+
+# Temp File area for index program
+keyTmpDir: __BASE_DIR__/zebradb/authorities/key
+
+# Approx. Memory usage during indexing
+memMax: 200M
+rank:rank-1
+
View
@@ -0,0 +1,42 @@
+# Simple Zebra configuration file that defines
+# a database with MARCXML records.
+# $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
+# modulePath - where to look for loadable zebra modules
+modulePath: /usr/lib/idzebra-2.0/modules
+
+encoding: UTF-8
+# Files that describe the attribute sets supported.
+attset: bib1.att
+attset: explain.att
+attset:gils.att
+
+# systag sysno rank
+# Specify record type
+iso2709.recordType:grs.marcxml.record
+recordType:grs.xml
+recordId: (bib1,Local-number)
+storeKeys:1
+storeData:1
+
+
+# Lock File Area
+lockDir: __BASE_DIR__/zebradb/biblios/lock
+perm.anonymous:r
+perm.kohaadmin:rw
+passw.kohalis
+shadow
+register: __BASE_DIR__/zebradb/biblios/register:4G
+shadow: __BASE_DIR__/zebradb/biblios/shadow:4G
+
+# Temp File area for result sets
+setTmpDir: __BASE_DIR__/zebradb/biblios/tmp
+
+# Temp File area for index program
+keyTmpDir: __BASE_DIR__/zebradb/biblios/key
+
+# Approx. Memory usage during indexing
+memMax: 500M
+rank:rank-1
Oops, something went wrong.

0 comments on commit e449c13

Please sign in to comment.