Add configuration file helper to the installer
authorMJ Ray <mjr@phonecoop.coop>
Thu, 6 Sep 2007 13:56:03 +0000 (14:56 +0100)
committerChris Cormack <crc@liblime.com>
Thu, 6 Sep 2007 22:14:40 +0000 (17:14 -0500)
Signed-off-by: Chris Cormack <crc@liblime.com>
13 files changed:
C4/Context.pm
Makefile.PL
etc/README.txt [new file with mode: 0644]
etc/ccl.properties [new file with mode: 0644]
etc/cql.properties [new file with mode: 0644]
etc/koha-conf.xml [new file with mode: 0644]
etc/koha-httpd.conf [new file with mode: 0644]
etc/pqf.properties [new file with mode: 0644]
etc/zebra-authorities.cfg [new file with mode: 0644]
etc/zebra-biblios.cfg [new file with mode: 0644]
misc/zebra/ccl.properties [deleted file]
misc/zebra/pqf.properties [deleted file]
rewrite-config.PL [new file with mode: 0644]

index e762aa5..6451828 100644 (file)
@@ -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
 
index 3b2ae23..e1ccca8 100644 (file)
@@ -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
 
diff --git a/etc/README.txt b/etc/README.txt
new file mode 100644 (file)
index 0000000..01356a6
--- /dev/null
@@ -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
+
diff --git a/etc/ccl.properties b/etc/ccl.properties
new file mode 100644 (file)
index 0000000..110345a
--- /dev/null
@@ -0,0 +1,1045 @@
+# CCL field mappings
+# $Id$
+# There are four types of lines in a CCL profile: 
+#  1. qualifier specification
+#      qualifier-name   [  attributeset   ,]  type   =   val   [  attributeset   ,]  type   =   val   ...
+# 
+#  2. qualifier alias
+#      q q1 q2 q3
+#
+#  3. comments
+#      comments begin with 
+#
+#  4. directives
+#      @   directive    value
+#
+# see http://indexdata.dk/yaz/doc/tools.tkl#CCL for more details
+#
+# 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
+
+### 1. BIB1 USE ATTRIBUTES MAPPED TO CCL QUALIFIERS
+#
+# SEE http://www.loc.gov/z3950/agency/bib1.html
+#
+# The notation '$' following a USMARC tag refers to a
+# subfield of the named field.  The notation 'i' following a
+# USMARC tag refers to values of the second indicator in the named
+# field; when the second indicator of the field has the value
+# , the data in the field is associated with that Use
+# attribute.
+#
+#Use                  Value Definition                      USMARC tag(s)
+#-------------------- ----- ------------------------------  ------------------
+#Abstract               62  An abbreviated, accurate        520
+#                           representation of a work,
+#                           usually without added
+#                           interpretation or criticism.
+Abstract 1=62
+ab Abstract
+
+#Any                  1016  The record is selected if there
+#                           exists a Use attribute that the
+#                           target supports (and considers
+#                           appropriate - see note 1) such
+#                           that the record would be
+#                           selected if the target were to
+#                           substitute that attribute.
+#       Notes:
+#        (1) When the origin uses 'any' the intent is that the target
+#            locate records via commonly used access points. The target
+#            may define 'any' to refer to a selected set of Use
+#            attributes corresponding to its commonly used access points.
+#        (2) In set terminology: when Any is the Use attribute, the set
+#            of records selected is the union of the sets of records
+#            selected by each of the (appropriate) Use attributes that
+#            the target supports.
+Any 4=6 1=1016
+kw Any
+
+#Anywhere             1035  The record is selected if the
+#                           term value (as qualified by the
+#                           other attributes) occurs anywhere
+#                           in the record.
+#
+#            Note: A target might choose to support 'Anywhere' only in
+#            combination with specific (non-Use) attributes. For example, a
+#            target might support 'Anywhere' only in combination with the
+#            Relation attribute 'AlwaysMatches' (see below), to locate all
+#            records in a database.
+#
+#       Notes on relationship of Any and Anywhere:
+#        (1) A target may support Any but not Anywhere, or vice versa, or
+#            both.  However, if a target supports both, then it should
+#            exclude 'Anywhere' from the list of Use attributes
+#            corresponding to 'Any' (if it does not do so, then the set
+#            of records located by 'Any' will be a superset of those
+#            located by 'Anywhere').
+#        (2) A distinction between the two attributes may be informally
+#            expressed as follows: 'anywhere' might result in more
+#            expensive searching than 'any'; if the target (and origin)
+#            support both 'any' and 'anywhere', if the origin uses 'Any'
+#            (rather than 'Anywhere') it is asking the target to locate
+#            the term only if it can do so relatively inexpensively.
+#Anywhere 1=1035
+
+#Author-name          1003  A personal or corporate author, 100, 110, 111, 400
+#                           or a conference or meeting      410, 411, 700, 710,
+#                           name.  (No subject name         711, 800, 810, 811
+#                           headings are included.)
+Author 5=1 1=1003 s=pw
+au Author
+
+#Author-name-and-     1000  A personal or corporate author, 100/2XX, 110/2XX,
+#title                      or a conference or meeting      111/2XX, subfields
+#                           name, and the title of the      $a & $t in
+#                           item.  (No subject name         following: 400,410,
+#                           headings are included.)  The    411, 700, 710, 711,
+#                           syntax of the name-title        800, 810, 811
+#                           combination is up to the
+#                           target, unless used with the
+#                           Structure attribute Key (see
+#                           below).
+#Author-title 1=1000
+
+#Author-name-         1005  An organization or a group      110, 410, 710, 810
+#corporate                  of persons that is identified
+#                           by a particular name. (Differs
+#                           from attribute "name-corporate
+#                           (2)" in that corporate name
+#                           subject headings are not
+#                           included.)
+#Author-name-corporate 1=1005
+
+#Author-name-         1006  A meeting of individuals or     111, 411, 711, 811
+#conference                 representatives of various
+#                           bodies for the purpose of
+#                           discussing topics of common
+#                           interest. (Differs from
+#                           attribute "name-conference
+#                           (3)" in that conference name
+#                           subject headings are not
+#                           included.)
+#Author-name-conference 1=1006
+#af Author-name-conference
+
+#Author-name-personal 1004  A person's real name,           100, 400, 700, 800
+#                           pseudonym, title of nobility
+#                           nickname, or initials.
+#                           (Differs from attribute
+#                           "name-personal (1)" in that
+#                           personal name subject headings
+#                           are not included.)
+#Author-name-personal 1=1004
+
+#Author-Title-Subject 1036  An author or a title or a        1XX, 2XX, 4XX,
+#                           subject.                         6XX, 7XX, 8XX
+#
+#            Note: When the Use attribute is Author-name-and-title (1000)
+#            the term contains both an author name and a title.  When the
+#            Use attribute is Author-Title-Subject (1036), the term
+#            contains an author name or a title or a subject.
+#Author-Title-Subject 1=1036
+
+#Body of text         1010  Used in full-text searching to
+#                           indicate that the term is to
+#                           be searched only in that
+#                           portion of the record that the
+#                           target considers the body of
+#                           the text, as opposed to some
+#                           other discriminated part such
+#                           as a headline, title, or
+#                           abstract.
+#Body-of-text 1=1010
+
+#Classification-Bliss   15  A classification number from
+#                           the Bliss Classification,
+#                           developed by Henry Evelyn
+#                           Bliss.
+#Bliss-classification 1=15
+
+#Classification-Dewey   13  A classification number from    082
+#                           the Dewey Decimal
+#                           Classification, developed by
+#                           Melvyl Dewey.
+#Dewey-classification 1=13
+
+#Classification-        50  A classification number         086
+#government-publication     assigned to a government
+#                           document by a government
+#                           agency at any level (e.g.,
+#                           state, national,
+#                           international).
+#Number-govt-pub 1=50
+
+#Classification-LC      16  A classification number from    050
+#                           the US Library of Congress
+#                           Classification.
+#LC-call-number 1=16
+#
+#Classification-local   20  A local classification
+#                           number from a system not
+#                           specified elsewhere in this
+#                           list of attributes.
+Local-classification 4=1 1=20
+lcn Local-classification
+callnum Local-classification
+#Local-classification cc callnum dewey
+#
+#Classification-NAL     18  A classification number from    070
+#                           the US National Agriculture
+#                           Library Classification.
+#NAL-call-number 1=18
+#
+#Classification-NLM     17  A classification number from    060
+#                           the US National Library of
+#                           Medicine Classification.
+#NLM-call-number 1=17
+#
+#Classification-MOS     19  A classification number from
+#                           Mathematics Subject
+#                           Classification, compiled
+#                           in the Editorial Offices of
+#                           Mathematical Reviews and
+#                           Zentralblatt fur Mathematik.
+#MOS-call-number 1=19
+#
+#Classification-UDC     14  A classification number from    080
+#                           Universal Decimal
+#                           Classification, a system based
+#                           on the Dewey Decimal
+#                           Classification.
+#UDC-classification 1=14
+#
+#Code-bib-level       1021  A one-character alphabetic       Leader/07
+#                           code indicating the
+#                           bibliographic level such as
+#                           monograph, serial or collection
+#                           of the record.
+#Bib-level 1=1021
+#
+#Code-geographic-area   55  A code that indicates the       043
+#                           geographic area(s) that appear
+#                           or are implied in the headings
+#                           assigned to the item during
+#                           cataloging.
+#Code-geographic 1=55
+#
+#Code-geographic-     1022  A code that represents the      052
+#class                      geographic area and if
+#                           applicable the geographic
+#                           subarea covered by an item.
+#                           The codes are derived from
+#                           the LC Classification-Class G
+#                           and the expanded Cutter number
+#                           list.
+#Geographic-class 1=1022
+#
+#Code-institution       56  An authoritative-agency         040, 852$a
+#                           symbol for an institution
+#                           that is the source of the
+#                           record or the holding
+#                           location.  The code space is
+#                           defined by the target.
+#Code-institution 1=56
+#
+#Code-language          54  A code that indicates the       008/35-37, 041
+#                           language of the item.
+#                           The codes are defined by the
+#                           target.
+language          1=54
+ln language
+
+#Code-map-scale       1024  Coded form of cartographic      034
+#                           mathematical data, including
+#                           scale, projection and/or
+#                           coordinates related to the
+#                           item.
+#Map-scale 1=1024
+
+#Code-microform-        61  The code specifying the         007/11
+#generation                 generation of a microform.
+#Microform-generation 1=61
+#material-designation Microform-generation
+
+#Code-record-type     1001  A code that specifies the       Leader/06
+#                           characteristics and defines
+#                           the components of the record.
+#                           The codes are target-specific.
+Record-type 1=1001
+rtype Record-type
+mc-rtype Record-type
+mus 1=1001
+
+#Concept-reference    1015  Used within Z39.50-1988;
+#                           included here for historical
+#                           reasons but its use is
+#                           deprecated.
+#Concept-reference 1=1015
+
+#Concept-text         1014  Used within Z39.50-1988;
+#                           included here for historical
+#                           reasons but its use is
+#                           deprecated.
+#Concept-text        1=1014
+
+#Content-type         1034  The type of materials           derived value
+#                           contained in the item or        from 008/24-27
+#                           publication.  For example:
+#                           review, catalog, encyclopedia,
+#                           directory.
+Content-type         1=1034 t=b
+ctype Content-type
+
+#Control number-BNB     10  Character string that uniquely  015
+#                           identifies a record in the
+#                           British National Bibliography.
+#BNB-card-number 1=10
+
+#Control number-BNF     11  Character string that uniquely  015
+#                           identifies a record in the
+#                           Bibliotheque Nationale Francais.
+#BGF-number 1=11
+
+#Control number-DB      52  Character string that uniquely  015
+#                           identifies a record in the
+#                           Deutsche Bibliothek.
+#Number-db 1=52
+
+#Control number-LC       9  Character string that uniquely  010, 011
+#                           identifies a record in the
+#                           Library of Congress database.
+#LC-card-number 1=9
+#lc-card LC-card-number
+
+#Control number-local   12  Character string that uniquely  001, 035
+#                           identifies a record in a local
+#                           system (i.e., any system that
+#                           is not one of the four listed
+#                           above).
+Local-number 1=12
+
+#Date                   30  The point of time at which      005, 008/00-05,
+#                           a transaction or event          008/07-10, 260$c,
+#                           takes place.                    008/11-14, 033,etc.
+Date 1=30 4=109 r=r
+#yr Date
+
+#Date-publication       31  The date (usually year) in      008/07-10, 260$c
+#                           which a document is published.  046, 533$d
+Date-of-publication 1=31 4=109 r=r
+#dp Date-of-publication
+yr Date-of-publication
+
+#Date-acquisition       32  The date when a document was    541$d
+#                           acquired.
+Date-of-acquisition 1=32
+acqdate Date-of-acquisition
+#da Date-of-acquisition
+
+#Date/time added to   1011  The date and time that a        008/00-05
+#database                   record was added to the
+#                           database.
+#Date-time-added-to-db 1=1011
+
+#Date/time last       1012  The date and time a record      005
+#modified                   was last updated.
+#Date-time-last-modified       1=1012
+
+#Identifier--         1013  Used in full-text searching
+#authority/format           to indicate to the target
+#                           system the format of the
+#                           document that should be
+#                           returned to the originating
+#                           system.  The attribute carries
+#                           not only the format code, but
+#                           also the authority (e.g.,
+#                           system) that assigned that
+#                           code.
+#Authority/format-id 1=1013
+
+#Identifier-CODEN       60  A six-character, unique,        030
+#                           alphanumeric code assigned
+#                           to serial and monographic
+#                           publications by the CODEN
+#                           section of the Chemical
+#                           Abstracts Service.
+#CODEN 1=60
+
+#Identifier-document  1032  An identifier or Doc-ID,  
+#                           assigned by a server, that 
+#                           uniquely identifies a document 
+#                           on that server. May or may 
+#                           not be persistent. May be, 
+#                           for example, a URL.
+#            Note: this definition was modified October 1997.
+#Doc-id 1=1032
+
+#Identifier-ISBN         7  International Standard Book     020
+#                           Number -- internationally
+#                           agreed upon number that
+#                           identifies a book uniquely.
+#                           Cf. ANSI/NISO Z39.21 and
+#                           ISO 2108.
+ISBN         1=7
+nb ISBN
+
+#Identifier-ISSN         8  International Standard Serial   022, 4XX$x,
+#                           Number -- internationally       7XX$x
+#                           agreed upon number that
+#                           identifies a serial uniquely.
+#                           Cf. ANSI/NISO z39.9 and
+#                           ISO 3297.
+ISSN         1=8
+ns ISSN
+
+#Identifier-legal-      49  The copyright registration      017
+#deposit                    number that is assigned to
+#                           an item when the item is
+#                           deposited for copyright.
+#Number-legal-deposit 1=49
+
+#Identifier-local-call  53  Call number (e.g., shelf location)
+#                           assigned by a local system
+#                           (not a classification number).
+#Number-local-call 1=53
+
+#Identifier-national-   48  Character string that uniquely  015
+#bibliography               identifies a record in a
+#                           national bibliography.
+#Number-natl-biblio 1=48
+
+#Identifier-publisher-  51  A formatted number assigned     028
+#for-music                  by a publisher to a sound
+#                           recording or to printed music.
+#Number-music-publisher 1=51
+
+#Identifier-report    1027  A report number assigned to     027, 088
+#                           the item. This number could be
+#                           the STRN (Standard Technical
+#                           Report Number) or another
+#                           report number.
+#                           Cf. ANSI/NISO Z39.23 and
+#                           ISO 10444.
+#Report-number 1=1027
+
+#Identifier-standard  1007  Standard numbers such as ISBN,  010, 011, 015, 017,
+#                           ISSN, music publishers          018, 020, 022, 023,
+#                           numbers, CODEN, etc., that      024, 025, 027, 028,
+#                           are indexed together in many    030, 035, 037
+#                           online public-access catalogs.
+#Identifier-standard  1=1007 4=6
+Local-number  1=12
+#sn Identifier-standard
+sn Local-number
+#
+#Identifier-stock     1028  A stock number that could be    037
+#                           used for ordering the item.
+Stock-number 1=1028
+bc Stock-number
+
+#Identifier-thematic  1030  The numeric designation for a   $n in the following:
+#                           part/section of a work such as  130, 240, 243, 630,
+#                           the serial, opus or thematic    700, 730
+#                           index number.
+#Thematic-number 1=1030
+
+#Indexed-by           1023  For serials, a publication      510
+#                           in which the serial has been
+#                           indexed and/or abstracted.
+#Indexed-by          1=1023
+
+#Material-type        1031  A free-form string, more        derived value from
+#                           specific than the one-letter    Leader/06-07, 007,
+#                           code in Leader/06, that         008, and 502
+#                           describes the material type
+#                           of the item, e.g., cassette,
+#                           kit, computer database,
+#                           computer file.
+Material-type  1=1031
+#itemtype Material-type
+#collection Material-type
+collection-code Material-type
+mt Material-type
+mc-collection Material-type
+#dt-lh Material-type
+
+#Music-key            1025  A statement of the key in       $r in the following:
+#                           which the music is written.     130, 240, 243, 630,
+#                                                           700, 730
+#Music-key            1=1025
+
+#Name                 1002  The name of a person, corporate 100, 110, 111, 400,
+#                           body, conference, or meeting.   410, 411, 600, 610,
+#                           (Subject name headings are      611, 700, 710, 711,
+#                           included.)                      800, 810, 811
+#Name                 1=1002
+
+#Name-and-title         57  The name of a person, corporate 100/2XX, 110/2XX,
+#                           body, conference, or meeting,   111/2XX, subfields
+#                           and the title of an item.       $a & $t in
+#                           (Subject name headings are      following: 400,410,
+#                           included.)  The syntax of the   411, 600, 610, 611,
+#                           name-title combination is up    700, 710, 711, 800,
+#                           to the target, unless used      810, 811
+#                           with the Structure attribute
+#                           Key (see below).
+#Name-and-title         1=57
+
+#Name-corporate          2  An organization or a group      110, 410, 610, 710,
+#                           of persons that is identified   810
+#                           by a particular name. (Subject
+#                           name headings are included.)
+#Corporate-name 1=2
+#cpn Corporate-name
+
+#Name-conference         3  A meeting of individuals or     111, 411, 611, 711
+#                           representatives of various      811
+#                           bodies for the purpose of
+#                           discussing topics of common
+#                           interest.  (Subject name
+#                           headings are included.)
+#Conference-name 1=3
+#cfn Conference-name
+
+#Name-editor          1020  A person who prepared for       100 $a or 700 $a when
+#                           publication an item that is     the corresponding $e
+#                           not his or her own.             contains value 'ed.'
+#Editor 1=1020
+
+#Name-geographic        58  Name of a country,              651
+#                           jurisdiction, region, or
+#                           geographic feature.
+#Name-geographic        1=58
+
+#Name-geographic-place- 59  City or town where an item      008/15-17, 260$a
+#publication                was published.
+
+#Name-personal           1  A person's real name,           100, 400, 600, 700,
+#                           pseudonym, title of nobility    800
+#                           nickname, or initials.
+#Personal-name 1=1
+#pn Personal-name
+
+#Name-publisher       1018  The organization responsible    260$b
+#                           for the publication of the
+#                           item.
+Publisher 1=1018
+pb Publisher
+
+#Note                   63  A concise statement in which    5XX
+#                           such information as extended
+#                           physical description,
+#                           relationship to other works,
+#                           or contents may be recorded.
+Note                   1=63
+nt Note
+
+#Record-source        1019  The USMARC code or name of the  008/39, 040
+#                           organization(s) that created
+#                           the original record, assigned
+#                           the USMARC content designation
+#                           and transcribed the record into
+#                           machine-readable form, or
+#                           modified the existing USMARC
+#                           record; the cataloging source.
+#Record-source        1=1019
+
+#Server-choice        1017  The target substitutes one or
+#                           more access points.  The origin
+#                           leaves the choice to the target.
+#
+#
+#       Notes on relationship of Any and Server-choice:
+#        (1) When the origin uses 'Server-choice' it is asking the target
+#            to select one or more access points, and to use its best
+#            judgment in making that selection.  When 'Any' is used,
+#            there is no selection process involved; the target is to
+#            apply all of the (appropriate) supported Use attributes.
+#            The origin is asking the target to make a choice of access
+#            points.
+#        (2) The target might support 'Any' and not 'Server-choice', or
+#            vice versa, or both.  If the target supports both, when the
+#            origin uses 'Server-choice', the target might choose 'Any';
+#            however, it might choose any other Use attribute.
+#Server-choice        1=1017
+
+#Subject                21  The primary topic on which a    600, 610, 611, 630,
+#                           work is focused.                650, 651, 653, 654,
+#                                                           655, 656, 657, 69X
+Subject                1=21
+su Subject
+su-to Subject
+su-geo Subject
+su-ut Subject
+#Subject-BDI            23  Subject headings from
+#                           Bibliotek Dokumentasjon
+#                           Informasjon -- a controlled
+#                           subject vocabulary used and
+#                           maintained by the five Nordic
+#                           countries (Denmark, Finland,
+#                           Iceland, Norway, and Sweden).
+#BDI-index-subject 1=23
+
+#Subject-INSPEC         24  Subject headings from           600i2, 610i2,
+#                           Information Services for the    611i2, 630i2,
+#                           Physics and Engineering         650i2, 651i2
+#                           Communities -- the Information
+#                           Services Division of the
+#                           Institution of Electrical
+#                           Engineers.
+#INSPEC-subject 1=24
+
+#Subject-LC             27  Subject headings from           600i0, 610i0,
+#                           US Library of Congress          611i0, 630i0,
+#                           Subject Headings.               650i0, 651i0
+#LC-subject-heading 1=27
+
+#Subject-LC-          1008  Subject headings, for use       600i1, 610i1,
+#children's                 with children's literature,     611i1, 630i1,
+#                           that conform to the             650i1, 651i1
+#                           formulation guidelines in
+#                           the "AC Subject Headings"
+#                           section of the Library of
+#                           Congress Subject Headings.
+#Subject-LC-childrens 1=1008
+
+#Subject-local          29  Subjects headings defined
+#                           locally.
+#Local-subject-index 1=29
+
+#Subject-MESH           25  Subject headings from           600i2, 610i2,
+#                           Medical Subject Headings --     611i2, 630i2,
+#                           maintained by the US National   650i2, 651i2
+#                           Library of Medicine.
+#MESH-subject 1=25
+
+#Subject-name-        1009  A person's real name,           600
+#personal                   pseudonym, title of nobility
+#                           nickname, or initials that
+#                           appears in a subject heading.
+Subject-name-personal 1=1009
+su-na 1=1009
+#Subject-name-personal
+#Subject-PA             26  Subject headings from           600i2, 610i2,
+#                           Thesaurus of Psychological      611i2, 630i2,
+#                           Index Terms -- maintained       650i2, 651i2
+#                           by the Retrieval Services Unit
+#                           of the American Psychological
+#                           Association.
+#PA-subject 1=26
+
+#Subject-PRECIS         45  Subject headings from
+#                           PREserved Context Index
+#                           System -- a string of indexing
+#                           terms set down in a prescribed
+#                           order, each term being preceded
+#                           by a manipulation code which
+#                           governs the production of
+#                           pre-coordinated subject index
+#                           entries under selected terms --
+#                           maintained by the British
+#                           Library.
+#Subject-precis 1=45
+
+#Subject-RAMEAU         22  Subject headings from
+#                           Repertoire d'authorite de
+#                           matieres encyclopedique
+#                           unifie -- maintained by the
+#                           Bibliotheque Nationale
+#                           (France).
+#Subject-Rameau 1=22
+
+#Subject-RSWK           46  Subject headings from
+#                           Regeln fur den
+#                           Schlagwortkatalog --
+#                           maintained by the Deutsches
+#                           Bibliotheksinstitut.
+#Subject-rswk 1=46
+
+#Subject-RVM            28  Subject headings from           600i6, 610i6,
+#                           Repertoire des vedettes-        611i6, 630i6,
+#                           matiere -- maintained by the    650i6, 651i6
+#                           Bibliotheque de l'Universite
+#                           de Laval.
+#RVM-subject-heading 1=28
+
+#Subject-subdivision    47  An extension to a subject       6XX$x, 6XX$y,
+#                           heading indicating the form,    6XX$z
+#                           place, period of time treated,
+#                           or aspect of the subject
+#                           treated.
+#Subject-subdivision 1=47
+
+#Title                   4  A word, phrase, character,      130, 21X-24X, 440,
+#                           or group of characters,         490, 730, 740, 830,
+#                           normally appearing in an item,  840, subfield $t
+#                           that names the item or the      in the following:
+#                           work contained in it.           400, 410, 410, 600,
+#                                                           610, 611, 700, 710,
+#                                                           711, 800, 810, 811
+Title 1=4
+#5=1 1=4 s=pw
+#1=4
+ti Title
+
+#Title-abbreviated      43  Shortened form of the title;    210, 211 (obs.),
+#                           either assigned by national     246
+#                           centers under the auspices of
+#                           the International Serials Data
+#                           System, or a title (such as an
+#                           acronym) that is popularly
+#                           associated with the item.
+#Title-abbreviated      1=43
+
+#Title-added-title-page 37  A title on a title page         246i5
+#                           preceding or following the
+#                           title page chosen as the basis
+#                           for the description of the
+#                           item.  It may be more general
+#                           (e.g., a series title page),
+#                           or equally general (e.g., a
+#                           title page in another
+#                           language).
+#Title-added-title-page 1=37
+
+#Title-caption          38  A title given at the beginning  246i6
+#                           of the first page of the text.
+#Title-caption          1=38
+
+#Title-collective       34  A title proper that is an       243
+#                           inclusive title for an item
+#                           containing several works.
+#Title-collective       1=34
+
+#Title-cover            36  The title printed on the        246i4
+#                           cover of an item as issued. 
+Title-cover            1=36
+
+#Title-expanded         44  An expanded (or augmented)      214 (obs.), 246
+#                           title has been enlarged with
+#                           descriptive words by the
+#                           cataloger to provide
+#                           additional indexing and
+#                           searching capabilities.
+#Title-expanded         1=44
+
+#Title-former           42  A former title or title         247, 780
+#                           variation when one
+#                           bibliographic record
+#                           represents all issues of
+#                           a serial that has changed
+#                           title.
+#Title-former           1=42
+
+#Title-host-item      1033  The title of the item            773$t
+#                           containing the part
+#                           described in the record, for
+#                           example, a journal title
+#                           when the record describes an
+#                           article in the journal.
+Host-item      1=1033
+
+#Title-key              33  The unique name assigned to     222
+#                           a serial by the International
+#                           Serials Data System (ISDS).
+#Title-key              1=33
+
+#Title-other-variant    41  A variation from the title      212 (obs.), 246i3,
+#                           page title appearing elsewhere  247, 740
+#                           in the item (e.g., a variant
+#                           cover title, caption title,
+#                           running title, or title from
+#                           another volume) or in another
+#                           issue.
+#Title-other-variant    1=41
+
+#Title-parallel         35  The title proper in another     246i1
+#                           language and/or script.
+#Title-parallel         1=35
+
+#Title-related-       1026  Serial titles related to this   247, 780, 785
+#periodical                 item, either the immediate
+#                           predecessor or the immediate
+#                           successor.
+#Related-periodical 1=1026
+#Title-running          39  A title, or abbreviated title,  246i7
+#                           that is repeated at the head
+#                           or foot of each page or leaf.
+#Title-running          1=39
+
+#Title-series            5  Collective title applying to    440, 490, 830, 840,
+#                           a group of separate, but        subfield $t in the
+#                           related, items.                 following: 400,410,
+#                                                           411, 800, 810, 811
+Title-series            1=5
+#series Title-series
+se Title-series
+
+#Title-spine            40  A title appearing on the        246i8
+#                           spine of an item.
+#Title-spine            1=40
+
+#Title-uniform           6  The particular title by which   130, 240, 730,
+#                           a work is to be identified      subfield $t in the
+#                           for cataloging purposes.        following: 700,710,
+#                                                           711
+Title-uniform           1=6
+ut Title-uniform
+#Authority-number           Koha-Auth-Number  The Number   
+#                           for an authority to be searched subfield $9 in the
+#                           for cataloging purposes.        following: 700,701,702,710,
+#                                                           711,712 and some 6XX fields (Unimarc)
+Authority-number           1=8910
+an Authority-Number
+Koha-Auth-Number Authority-Number
+
+#Authority/format-id        authtypecode  The Code 
+#                           associated to an authority type
+#                                                            152$b in authority records
+Authority/format-id           1=Authority/format-id
+at Authority/format-id
+
+#Heading-Entity             Information for Heading in an 
+#                           authority record 
+#                                                             usually 2.. fields
+Heading-Entity           1=Heading-Entity
+he Heading-Entity
+
+
+### 2. BIB1 RELATION ATTRIBUTES
+lt 2=1
+le 2=2
+eq 2=3
+ge 2=4
+ne 2=5
+phonetic 2=6
+stem 2=100
+relevance 2=102
+rk 2=102
+rank relevance
+
+AlwaysMatches 2=103
+Within 2=104
+
+### 3. BIB1 POSITION ATTRIBUTES
+first-in-field 3=1
+
+# we have to fake startswith until zebra supports it
+# starts with if we want no truncation ... need to ad 'term #'
+# finds 'starts with it' but not italian
+# see http://lists.indexdata.dk/pipermail/yazlist/2006-July/001664.html
+startswithnt 3=1 5=101 6=3
+
+# starts with with truncation
+first-in-subfield 3=2
+any-position-in-field 3=3
+
+### 4. BIB1 STRUCTURE ATTRIBUTES
+st-phrase 4=1
+phr st-phrase
+st-word        4=2
+st-key         4=3
+st-year        4=4
+st-date-normalized     4=5
+st-word-list   4=6
+wrdl 4=6
+
+# there was a reason I didn't want to use this but it's
+# escaped me -- JF
+wrd 4=6
+
+#st-word
+st-date-un-normalized  4=100
+st-name-normalized     4=101
+st-name-un-normalized  4=102
+st-structure   4=103
+st-urx         4=104
+st-free-form-text      4=105
+st-document-text       4=106
+st-local       number 4=107
+st-string      4=108
+st-numeric     4=109
+#string 109
+
+### 5. BIB1 TRUNCATION ATTRIBUTES
+right-Truncation 5=1
+rt right-Truncation
+left-Truncation        5=2
+left-and-right         5=3
+do-not-truncate        5=100
+process-in-search-term         5=101
+regExpr-1      5=102
+fuzzy 5=103
+regExpr-2      5=103
+Z39-58 5=104
+
+### 6. BIB1 STRUCTURE ATTRIBUTES
+incomplete-subfield    6=1
+complete-subfield      6=2
+complete-field         6=3
+
+### COMBINATIONS OF THE ABOVE
+ext 4=1 6=3
+
+## ATTRIBUTES NOT IN BIB1 OR ELSE ONES I DON"T KNOW WHERE IN BIB1 THEY BELONG
+#Language
+#ln 1=8805
+#language 1=8805
+
+#Musical Composition
+#mc
+
+# Publisher Location
+
+Place-publication 1=59
+pl Place-publication
+#pl 1=59
+
+# Extent
+Extent 1=8001
+
+#Summary                       1=8002
+#att 8900            
+#Call-Number 1=8900
+#date-entered-on-file 1=8800
+#date1 1=8801
+#date2 1=8802
+#language 8805
+ff8-22 1=8822
+ff8-23 1=8823
+ff8-34 1=8834
+
+#att 8700            ff7-00
+#att 8701            ff7-01
+#att 8702            ff7-02
+#att 9520            withdrawn
+#att 9521            lost
+lost 1=9521 4=109
+#att 9522            onloan
+
+############## SUBJECT-RELATED
+# Topical Term
+#tt
+# Descriptor
+#de
+# Genre/Form
+#ge
+# Geographic Coverage
+#gc
+
+## Additional Author distinctions needed for field weighting
+# lastname,firstname entry in $100$a
+Author-personal-bibliography 1=8900
+aub Author-personal-bibliography
+# Author-in-order - firstname lastname in 245$c statement of responsibility
+Author-in-order 1=8901
+auo Author-in-order
+
+### LIMITS
+# AUDIENCE
+audience 1=8822
+aud audience
+
+# CONTENT and Literary form
+fiction 1=8833
+fic fiction
+#mystery 1=
+biography 1=8834
+bio biography
+
+# FORMAT
+format 1=8823
+
+# format limit
+l-format 1=8703
+
+#fmt format
+
+# BRANCH (of local library)
+branch 1=1033
+
+Illustration-code 1=Illustration-code 
+# Item Type
+
+# Year limit
+#yr 1=8801 4=109 r=r
+
+## STATUSES
+onloan 1=9522
+datedue 1=9522
+
+popularity 1=9523
+
+# Material Category
+mc 1=8700
+## TYPE LIMITS
+dt-bks 1=8700
+dt-vis 1=8700
+dt-sr 1=8700
+dt-cf 1=8700
+dt-map 1=8700
+
+# Rank Weights
+r1 9=32
+r2 9=28
+r3 9=26
+r4 9=10
+r5 9=22
+r6 9=20
+r7 9=18
+r8 9=16
+r9 9=14
+
+# Sorting
+title-sort-za 7=2 1=36
+title-sort-az 7=1 1=36
+# CCL DIRECTIVES
+# Truncation characters (it seems to take multiple arguments)
+@truncation ? *
+# field specifies how multiple fields are to be combined.
+# There are two modes: or: multiple qualifier fields are
+# ORed, merge: attributes for the qualifier fields are
+# merged and assigned to one term.
+@field merge
+# case specificies if CCL operatores and qualifiers
+# should be compared with case sensitivity or not.
+# Specify 0 for case sensitive; 1 for case insensitive.
+@case 0
+# Tokens for CCL operators (it seems you can assign multiple tokens per operator which is nice)
+@and and +
+@or or |
+# make sure - doesn't conflict with another usage of this token
+@not not
+@set set
+# Not sure if you can specify tokens for prox operators, but here are the defaults
+# proximity of a, b - distance n - any order:
+# a %n b
+# proximity of a, b - distance n - in order:
+# a !n b
+# Integer n may be omitted - in which case distance is 1.
+
+# 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
diff --git a/etc/cql.properties b/etc/cql.properties
new file mode 100644 (file)
index 0000000..c61de44
--- /dev/null
@@ -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
diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml
new file mode 100644 (file)
index 0000000..ff7cc2e
--- /dev/null
@@ -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>
diff --git a/etc/koha-httpd.conf b/etc/koha-httpd.conf
new file mode 100644 (file)
index 0000000..78ed848
--- /dev/null
@@ -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>
diff --git a/etc/pqf.properties b/etc/pqf.properties
new file mode 100644 (file)
index 0000000..9d1ff86
--- /dev/null
@@ -0,0 +1,163 @@
+# $Id$
+#
+# Propeties file to drive org.z3950.zing.cql.CQLNode's toPQF()
+# back-end and the YAZ CQL-to-PQF converter.  This specifies the
+# interpretation of various CQL indexes, relations, etc. in terms
+# of Type-1 query attributes.
+#
+# This configuration file generates queries using BIB-1 attributes.
+# See http://www.loc.gov/z3950/agency/zing/cql/dc-indexes.html
+# for the Maintenance Agency's work-in-progress mapping of Dublin Core
+# indexes to Attribute Architecture (util, XD and BIB-2)
+# attributes.
+
+# Identifiers for prefixes used in this file. (index.*)
+set.cql                = info:srw/cql-context-set/1/cql-v1.1
+set.rec                = info:srw/cql-context-set/2/rec-1.0
+set.dc         = info:srw/cql-context-set/1/dc-v1.1
+set.bath       = http://zing.z3950.org/cql/bath/2.0/
+
+# default set (in query)
+set            = info:srw/cql-context-set/1/dc-v1.1
+
+# The default access point and result-set references
+index.cql.serverChoice                 = 1=1016
+       # srw.serverChoice is deprecated in favour of cql.serverChoice
+       # BIB-1 "any"
+
+index.rec.id                           = 1=12
+
+index.dc.identifier                            = 1=1007          
+index.dc.title                         = 1=4
+index.dc.subject                       = 1=21
+index.dc.creator                       = 1=1003
+index.dc.author                                = 1=1003
+index.dc.itemtype                       = 1=1031
+index.dc.barcode                        = 1=1028
+index.dc.branch                         = 1=1033
+index.dc.isbn                           = 1=7
+index.dc.issn                           = 1=8
+index.dc.any                           = 1=1016
+index.dc.note                  = 1=63
+
+       ### Unofficial synonym for "creator"
+index.dc.editor                                = 1=1020
+index.dc.publisher                     = 1=1018
+index.dc.description                   = 1=62
+       # "abstract"
+index.dc.date                          = 1=30
+index.dc.resourceType                  = 1=1031
+       # guesswork: "Material-type"
+index.dc.format                                = 1=1034
+       # guesswork: "Content-type"
+index.dc.resourceIdentifier            = 1=12
+       # "Local number"
+#index.dc.source                               = 1=1019
+       # "Record-source"
+index.dc.language                      = 1=54
+       # "Code--language"
+       
+index.dc.Place-publication             = 1=59
+       # "Place-publication"
+
+index.dc.relation                      = 1=?
+       ### No idea how to represent this
+index.dc.coverage                      = 1=?
+       ### No idea how to represent this
+index.dc.rights                                = 1=?
+       ### No idea how to represent this
+
+# Relation attributes are selected according to the CQL relation by
+# looking up the "relation.<relation>" property:
+#
+relation.<                             = 2=1
+relation.le                            = 2=2
+relation.eq                            = 2=3
+relation.exact                         = 2=3
+relation.ge                            = 2=4
+relation.>                             = 2=5
+relation.<>                            = 2=6
+
+### These two are not really right:
+relation.all                           = 2=3
+relation.any                           = 2=3
+
+# BIB-1 doesn't have a server choice relation, so we just make the
+# choice here, and use equality (which is clearly correct).
+relation.scr                           = 2=3
+
+# Relation modifiers.
+#
+relationModifier.relevant              = 2=102
+relationModifier.fuzzy                  = 5=103
+       ### 100 is "phonetic", which is not quite the same thing
+relationModifier.stem                  = 2=101
+relationModifier.phonetic              = 2=100
+
+# Position attributes may be specified for anchored terms (those
+# beginning with "^", which is stripped) and unanchored (those not
+# beginning with "^").  This may change when we get a BIB-1 truncation
+# attribute that says "do what CQL does".
+#
+position.first                         = 3=1 6=1
+       # "first in field"
+position.any                           = 3=3 6=1
+       # "any position in field"
+position.last                          = 3=4 6=1
+       # not a standard BIB-1 attribute
+position.firstAndLast                  = 3=3 6=3
+       # search term is anchored to be complete field
+
+# Structure attributes may be specified for individual relations; a
+# default structure attribute my be specified by the pseudo-relation
+# "*", to be used whenever a relation not listed here occurs.
+#
+structure.exact                                = 4=108
+       # string
+structure.all                          = 4=2
+structure.any                          = 4=2
+structure.*                            = 4=1
+       # phrase
+
+# Truncation attributes used to implement CQL wildcard patterns.  The
+# simpler forms, left, right- and both-truncation will be used for the
+# simplest patterns, so that we produce PQF queries that conform more
+# closely to the Bath Profile.  However, when a more complex pattern
+# such as "foo*bar" is used, we fall back on Z39.58-style masking.
+#
+truncation.right                       = 5=1
+truncation.left                                = 5=2
+truncation.both                                = 5=3
+truncation.none                                = 5=100
+truncation.z3958                       = 5=104
+
+# Finally, any additional attributes that should always be included
+# with each term can be specified in the "always" property.
+#
+always                                 = 6=1
+# 6=1: completeness = incomplete subfield
+
+
+# Bath Profile support, added Thu Dec 18 13:06:20 GMT 2003
+# See the Bath Profile for SRW at
+#      http://zing.z3950.org/cql/bath.html
+# including the Bath Context Set defined within that document.
+#
+# In this file, we only map index-names to BIB-1 use attributes, doing
+# so in accordance with the specifications of the Z39.50 Bath Profile,
+# and leaving the relations, wildcards, etc. to fend for themselves.
+
+index.bath.keyTitle                    = 1=33
+index.bath.possessingInstitution       = 1=1044
+index.bath.name                                = 1=1002
+index.bath.personalName                        = 1=1
+index.bath.corporateName               = 1=2
+index.bath.conferenceName              = 1=3
+index.bath.uniformTitle                        = 1=6
+index.bath.isbn                                = 1=7
+index.bath.issn                                = 1=8
+index.bath.geographicName              = 1=58
+index.bath.notes                       = 1=63
+index.bath.topicalSubject              = 1=1079
+index.bath.genreForm                   = 1=1075
+
diff --git a/etc/zebra-authorities.cfg b/etc/zebra-authorities.cfg
new file mode 100644 (file)
index 0000000..fe88796
--- /dev/null
@@ -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
+
diff --git a/etc/zebra-biblios.cfg b/etc/zebra-biblios.cfg
new file mode 100644 (file)
index 0000000..a70d510
--- /dev/null
@@ -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
diff --git a/misc/zebra/ccl.properties b/misc/zebra/ccl.properties
deleted file mode 100644 (file)
index 110345a..0000000
+++ /dev/null
@@ -1,1045 +0,0 @@
-# CCL field mappings
-# $Id$
-# There are four types of lines in a CCL profile: 
-#  1. qualifier specification
-#      qualifier-name   [  attributeset   ,]  type   =   val   [  attributeset   ,]  type   =   val   ...
-# 
-#  2. qualifier alias
-#      q q1 q2 q3
-#
-#  3. comments
-#      comments begin with 
-#
-#  4. directives
-#      @   directive    value
-#
-# see http://indexdata.dk/yaz/doc/tools.tkl#CCL for more details
-#
-# 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
-
-### 1. BIB1 USE ATTRIBUTES MAPPED TO CCL QUALIFIERS
-#
-# SEE http://www.loc.gov/z3950/agency/bib1.html
-#
-# The notation '$' following a USMARC tag refers to a
-# subfield of the named field.  The notation 'i' following a
-# USMARC tag refers to values of the second indicator in the named
-# field; when the second indicator of the field has the value
-# , the data in the field is associated with that Use
-# attribute.
-#
-#Use                  Value Definition                      USMARC tag(s)
-#-------------------- ----- ------------------------------  ------------------
-#Abstract               62  An abbreviated, accurate        520
-#                           representation of a work,
-#                           usually without added
-#                           interpretation or criticism.
-Abstract 1=62
-ab Abstract
-
-#Any                  1016  The record is selected if there
-#                           exists a Use attribute that the
-#                           target supports (and considers
-#                           appropriate - see note 1) such
-#                           that the record would be
-#                           selected if the target were to
-#                           substitute that attribute.
-#       Notes:
-#        (1) When the origin uses 'any' the intent is that the target
-#            locate records via commonly used access points. The target
-#            may define 'any' to refer to a selected set of Use
-#            attributes corresponding to its commonly used access points.
-#        (2) In set terminology: when Any is the Use attribute, the set
-#            of records selected is the union of the sets of records
-#            selected by each of the (appropriate) Use attributes that
-#            the target supports.
-Any 4=6 1=1016
-kw Any
-
-#Anywhere             1035  The record is selected if the
-#                           term value (as qualified by the
-#                           other attributes) occurs anywhere
-#                           in the record.
-#
-#            Note: A target might choose to support 'Anywhere' only in
-#            combination with specific (non-Use) attributes. For example, a
-#            target might support 'Anywhere' only in combination with the
-#            Relation attribute 'AlwaysMatches' (see below), to locate all
-#            records in a database.
-#
-#       Notes on relationship of Any and Anywhere:
-#        (1) A target may support Any but not Anywhere, or vice versa, or
-#            both.  However, if a target supports both, then it should
-#            exclude 'Anywhere' from the list of Use attributes
-#            corresponding to 'Any' (if it does not do so, then the set
-#            of records located by 'Any' will be a superset of those
-#            located by 'Anywhere').
-#        (2) A distinction between the two attributes may be informally
-#            expressed as follows: 'anywhere' might result in more
-#            expensive searching than 'any'; if the target (and origin)
-#            support both 'any' and 'anywhere', if the origin uses 'Any'
-#            (rather than 'Anywhere') it is asking the target to locate
-#            the term only if it can do so relatively inexpensively.
-#Anywhere 1=1035
-
-#Author-name          1003  A personal or corporate author, 100, 110, 111, 400
-#                           or a conference or meeting      410, 411, 700, 710,
-#                           name.  (No subject name         711, 800, 810, 811
-#                           headings are included.)
-Author 5=1 1=1003 s=pw
-au Author
-
-#Author-name-and-     1000  A personal or corporate author, 100/2XX, 110/2XX,
-#title                      or a conference or meeting      111/2XX, subfields
-#                           name, and the title of the      $a & $t in
-#                           item.  (No subject name         following: 400,410,
-#                           headings are included.)  The    411, 700, 710, 711,
-#                           syntax of the name-title        800, 810, 811
-#                           combination is up to the
-#                           target, unless used with the
-#                           Structure attribute Key (see
-#                           below).
-#Author-title 1=1000
-
-#Author-name-         1005  An organization or a group      110, 410, 710, 810
-#corporate                  of persons that is identified
-#                           by a particular name. (Differs
-#                           from attribute "name-corporate
-#                           (2)" in that corporate name
-#                           subject headings are not
-#                           included.)
-#Author-name-corporate 1=1005
-
-#Author-name-         1006  A meeting of individuals or     111, 411, 711, 811
-#conference                 representatives of various
-#                           bodies for the purpose of
-#                           discussing topics of common
-#                           interest. (Differs from
-#                           attribute "name-conference
-#                           (3)" in that conference name
-#                           subject headings are not
-#                           included.)
-#Author-name-conference 1=1006
-#af Author-name-conference
-
-#Author-name-personal 1004  A person's real name,           100, 400, 700, 800
-#                           pseudonym, title of nobility
-#                           nickname, or initials.
-#                           (Differs from attribute
-#                           "name-personal (1)" in that
-#                           personal name subject headings
-#                           are not included.)
-#Author-name-personal 1=1004
-
-#Author-Title-Subject 1036  An author or a title or a        1XX, 2XX, 4XX,
-#                           subject.                         6XX, 7XX, 8XX
-#
-#            Note: When the Use attribute is Author-name-and-title (1000)
-#            the term contains both an author name and a title.  When the
-#            Use attribute is Author-Title-Subject (1036), the term
-#            contains an author name or a title or a subject.
-#Author-Title-Subject 1=1036
-
-#Body of text         1010  Used in full-text searching to
-#                           indicate that the term is to
-#                           be searched only in that
-#                           portion of the record that the
-#                           target considers the body of
-#                           the text, as opposed to some
-#                           other discriminated part such
-#                           as a headline, title, or
-#                           abstract.
-#Body-of-text 1=1010
-
-#Classification-Bliss   15  A classification number from
-#                           the Bliss Classification,
-#                           developed by Henry Evelyn
-#                           Bliss.
-#Bliss-classification 1=15
-
-#Classification-Dewey   13  A classification number from    082
-#                           the Dewey Decimal
-#                           Classification, developed by
-#                           Melvyl Dewey.
-#Dewey-classification 1=13
-
-#Classification-        50  A classification number         086
-#government-publication     assigned to a government
-#                           document by a government
-#                           agency at any level (e.g.,
-#                           state, national,
-#                           international).
-#Number-govt-pub 1=50
-
-#Classification-LC      16  A classification number from    050
-#                           the US Library of Congress
-#                           Classification.
-#LC-call-number 1=16
-#
-#Classification-local   20  A local classification
-#                           number from a system not
-#                           specified elsewhere in this
-#                           list of attributes.
-Local-classification 4=1 1=20
-lcn Local-classification
-callnum Local-classification
-#Local-classification cc callnum dewey
-#
-#Classification-NAL     18  A classification number from    070
-#                           the US National Agriculture
-#                           Library Classification.
-#NAL-call-number 1=18
-#
-#Classification-NLM     17  A classification number from    060
-#                           the US National Library of
-#                           Medicine Classification.
-#NLM-call-number 1=17
-#
-#Classification-MOS     19  A classification number from
-#                           Mathematics Subject
-#                           Classification, compiled
-#                           in the Editorial Offices of
-#                           Mathematical Reviews and
-#                           Zentralblatt fur Mathematik.
-#MOS-call-number 1=19
-#
-#Classification-UDC     14  A classification number from    080
-#                           Universal Decimal
-#                           Classification, a system based
-#                           on the Dewey Decimal
-#                           Classification.
-#UDC-classification 1=14
-#
-#Code-bib-level       1021  A one-character alphabetic       Leader/07
-#                           code indicating the
-#                           bibliographic level such as
-#                           monograph, serial or collection
-#                           of the record.
-#Bib-level 1=1021
-#
-#Code-geographic-area   55  A code that indicates the       043
-#                           geographic area(s) that appear
-#                           or are implied in the headings
-#                           assigned to the item during
-#                           cataloging.
-#Code-geographic 1=55
-#
-#Code-geographic-     1022  A code that represents the      052
-#class                      geographic area and if
-#                           applicable the geographic
-#                           subarea covered by an item.
-#                           The codes are derived from
-#                           the LC Classification-Class G
-#                           and the expanded Cutter number
-#                           list.
-#Geographic-class 1=1022
-#
-#Code-institution       56  An authoritative-agency         040, 852$a
-#                           symbol for an institution
-#                           that is the source of the
-#                           record or the holding
-#                           location.  The code space is
-#                           defined by the target.
-#Code-institution 1=56
-#
-#Code-language          54  A code that indicates the       008/35-37, 041
-#                           language of the item.
-#                           The codes are defined by the
-#                           target.
-language          1=54
-ln language
-
-#Code-map-scale       1024  Coded form of cartographic      034
-#                           mathematical data, including
-#                           scale, projection and/or
-#                           coordinates related to the
-#                           item.
-#Map-scale 1=1024
-
-#Code-microform-        61  The code specifying the         007/11
-#generation                 generation of a microform.
-#Microform-generation 1=61
-#material-designation Microform-generation
-
-#Code-record-type     1001  A code that specifies the       Leader/06
-#                           characteristics and defines
-#                           the components of the record.
-#                           The codes are target-specific.
-Record-type 1=1001
-rtype Record-type
-mc-rtype Record-type
-mus 1=1001
-
-#Concept-reference    1015  Used within Z39.50-1988;
-#                           included here for historical
-#                           reasons but its use is
-#                           deprecated.
-#Concept-reference 1=1015
-
-#Concept-text         1014  Used within Z39.50-1988;
-#                           included here for historical
-#                           reasons but its use is
-#                           deprecated.
-#Concept-text        1=1014
-
-#Content-type         1034  The type of materials           derived value
-#                           contained in the item or        from 008/24-27
-#                           publication.  For example:
-#                           review, catalog, encyclopedia,
-#                           directory.
-Content-type         1=1034 t=b
-ctype Content-type
-
-#Control number-BNB     10  Character string that uniquely  015
-#                           identifies a record in the
-#                           British National Bibliography.
-#BNB-card-number 1=10
-
-#Control number-BNF     11  Character string that uniquely  015
-#                           identifies a record in the
-#                           Bibliotheque Nationale Francais.
-#BGF-number 1=11
-
-#Control number-DB      52  Character string that uniquely  015
-#                           identifies a record in the
-#                           Deutsche Bibliothek.
-#Number-db 1=52
-
-#Control number-LC       9  Character string that uniquely  010, 011
-#                           identifies a record in the
-#                           Library of Congress database.
-#LC-card-number 1=9
-#lc-card LC-card-number
-
-#Control number-local   12  Character string that uniquely  001, 035
-#                           identifies a record in a local
-#                           system (i.e., any system that
-#                           is not one of the four listed
-#                           above).
-Local-number 1=12
-
-#Date                   30  The point of time at which      005, 008/00-05,
-#                           a transaction or event          008/07-10, 260$c,
-#                           takes place.                    008/11-14, 033,etc.
-Date 1=30 4=109 r=r
-#yr Date
-
-#Date-publication       31  The date (usually year) in      008/07-10, 260$c
-#                           which a document is published.  046, 533$d
-Date-of-publication 1=31 4=109 r=r
-#dp Date-of-publication
-yr Date-of-publication
-
-#Date-acquisition       32  The date when a document was    541$d
-#                           acquired.
-Date-of-acquisition 1=32
-acqdate Date-of-acquisition
-#da Date-of-acquisition
-
-#Date/time added to   1011  The date and time that a        008/00-05
-#database                   record was added to the
-#                           database.
-#Date-time-added-to-db 1=1011
-
-#Date/time last       1012  The date and time a record      005
-#modified                   was last updated.
-#Date-time-last-modified       1=1012
-
-#Identifier--         1013  Used in full-text searching
-#authority/format           to indicate to the target
-#                           system the format of the
-#                           document that should be
-#                           returned to the originating
-#                           system.  The attribute carries
-#                           not only the format code, but
-#                           also the authority (e.g.,
-#                           system) that assigned that
-#                           code.
-#Authority/format-id 1=1013
-
-#Identifier-CODEN       60  A six-character, unique,        030
-#                           alphanumeric code assigned
-#                           to serial and monographic
-#                           publications by the CODEN
-#                           section of the Chemical
-#                           Abstracts Service.
-#CODEN 1=60
-
-#Identifier-document  1032  An identifier or Doc-ID,  
-#                           assigned by a server, that 
-#                           uniquely identifies a document 
-#                           on that server. May or may 
-#                           not be persistent. May be, 
-#                           for example, a URL.
-#            Note: this definition was modified October 1997.
-#Doc-id 1=1032
-
-#Identifier-ISBN         7  International Standard Book     020
-#                           Number -- internationally
-#                           agreed upon number that
-#                           identifies a book uniquely.
-#                           Cf. ANSI/NISO Z39.21 and
-#                           ISO 2108.
-ISBN         1=7
-nb ISBN
-
-#Identifier-ISSN         8  International Standard Serial   022, 4XX$x,
-#                           Number -- internationally       7XX$x
-#                           agreed upon number that
-#                           identifies a serial uniquely.
-#                           Cf. ANSI/NISO z39.9 and
-#                           ISO 3297.
-ISSN         1=8
-ns ISSN
-
-#Identifier-legal-      49  The copyright registration      017
-#deposit                    number that is assigned to
-#                           an item when the item is
-#                           deposited for copyright.
-#Number-legal-deposit 1=49
-
-#Identifier-local-call  53  Call number (e.g., shelf location)
-#                           assigned by a local system
-#                           (not a classification number).
-#Number-local-call 1=53
-
-#Identifier-national-   48  Character string that uniquely  015
-#bibliography               identifies a record in a
-#                           national bibliography.
-#Number-natl-biblio 1=48
-
-#Identifier-publisher-  51  A formatted number assigned     028
-#for-music                  by a publisher to a sound
-#                           recording or to printed music.
-#Number-music-publisher 1=51
-
-#Identifier-report    1027  A report number assigned to     027, 088
-#                           the item. This number could be
-#                           the STRN (Standard Technical
-#                           Report Number) or another
-#                           report number.
-#                           Cf. ANSI/NISO Z39.23 and
-#                           ISO 10444.
-#Report-number 1=1027
-
-#Identifier-standard  1007  Standard numbers such as ISBN,  010, 011, 015, 017,
-#                           ISSN, music publishers          018, 020, 022, 023,
-#                           numbers, CODEN, etc., that      024, 025, 027, 028,
-#                           are indexed together in many    030, 035, 037
-#                           online public-access catalogs.
-#Identifier-standard  1=1007 4=6
-Local-number  1=12
-#sn Identifier-standard
-sn Local-number
-#
-#Identifier-stock     1028  A stock number that could be    037
-#                           used for ordering the item.
-Stock-number 1=1028
-bc Stock-number
-
-#Identifier-thematic  1030  The numeric designation for a   $n in the following:
-#                           part/section of a work such as  130, 240, 243, 630,
-#                           the serial, opus or thematic    700, 730
-#                           index number.
-#Thematic-number 1=1030
-
-#Indexed-by           1023  For serials, a publication      510
-#                           in which the serial has been
-#                           indexed and/or abstracted.
-#Indexed-by          1=1023
-
-#Material-type        1031  A free-form string, more        derived value from
-#                           specific than the one-letter    Leader/06-07, 007,
-#                           code in Leader/06, that         008, and 502
-#                           describes the material type
-#                           of the item, e.g., cassette,
-#                           kit, computer database,
-#                           computer file.
-Material-type  1=1031
-#itemtype Material-type
-#collection Material-type
-collection-code Material-type
-mt Material-type
-mc-collection Material-type
-#dt-lh Material-type
-
-#Music-key            1025  A statement of the key in       $r in the following:
-#                           which the music is written.     130, 240, 243, 630,
-#                                                           700, 730
-#Music-key            1=1025
-
-#Name                 1002  The name of a person, corporate 100, 110, 111, 400,
-#                           body, conference, or meeting.   410, 411, 600, 610,
-#                           (Subject name headings are      611, 700, 710, 711,
-#                           included.)                      800, 810, 811
-#Name                 1=1002
-
-#Name-and-title         57  The name of a person, corporate 100/2XX, 110/2XX,
-#                           body, conference, or meeting,   111/2XX, subfields
-#                           and the title of an item.       $a & $t in
-#                           (Subject name headings are      following: 400,410,
-#                           included.)  The syntax of the   411, 600, 610, 611,
-#                           name-title combination is up    700, 710, 711, 800,
-#                           to the target, unless used      810, 811
-#                           with the Structure attribute
-#                           Key (see below).
-#Name-and-title         1=57
-
-#Name-corporate          2  An organization or a group      110, 410, 610, 710,
-#                           of persons that is identified   810
-#                           by a particular name. (Subject
-#                           name headings are included.)
-#Corporate-name 1=2
-#cpn Corporate-name
-
-#Name-conference         3  A meeting of individuals or     111, 411, 611, 711
-#                           representatives of various      811
-#                           bodies for the purpose of
-#                           discussing topics of common
-#                           interest.  (Subject name
-#                           headings are included.)
-#Conference-name 1=3
-#cfn Conference-name
-
-#Name-editor          1020  A person who prepared for       100 $a or 700 $a when
-#                           publication an item that is     the corresponding $e
-#                           not his or her own.             contains value 'ed.'
-#Editor 1=1020
-
-#Name-geographic        58  Name of a country,              651
-#                           jurisdiction, region, or
-#                           geographic feature.
-#Name-geographic        1=58
-
-#Name-geographic-place- 59  City or town where an item      008/15-17, 260$a
-#publication                was published.
-
-#Name-personal           1  A person's real name,           100, 400, 600, 700,
-#                           pseudonym, title of nobility    800
-#                           nickname, or initials.
-#Personal-name 1=1
-#pn Personal-name
-
-#Name-publisher       1018  The organization responsible    260$b
-#                           for the publication of the
-#                           item.
-Publisher 1=1018
-pb Publisher
-
-#Note                   63  A concise statement in which    5XX
-#                           such information as extended
-#                           physical description,
-#                           relationship to other works,
-#                           or contents may be recorded.
-Note                   1=63
-nt Note
-
-#Record-source        1019  The USMARC code or name of the  008/39, 040
-#                           organization(s) that created
-#                           the original record, assigned
-#                           the USMARC content designation
-#                           and transcribed the record into
-#                           machine-readable form, or
-#                           modified the existing USMARC
-#                           record; the cataloging source.
-#Record-source        1=1019
-
-#Server-choice        1017  The target substitutes one or
-#                           more access points.  The origin
-#                           leaves the choice to the target.
-#
-#
-#       Notes on relationship of Any and Server-choice:
-#        (1) When the origin uses 'Server-choice' it is asking the target
-#            to select one or more access points, and to use its best
-#            judgment in making that selection.  When 'Any' is used,
-#            there is no selection process involved; the target is to
-#            apply all of the (appropriate) supported Use attributes.
-#            The origin is asking the target to make a choice of access
-#            points.
-#        (2) The target might support 'Any' and not 'Server-choice', or
-#            vice versa, or both.  If the target supports both, when the
-#            origin uses 'Server-choice', the target might choose 'Any';
-#            however, it might choose any other Use attribute.
-#Server-choice        1=1017
-
-#Subject                21  The primary topic on which a    600, 610, 611, 630,
-#                           work is focused.                650, 651, 653, 654,
-#                                                           655, 656, 657, 69X
-Subject                1=21
-su Subject
-su-to Subject
-su-geo Subject
-su-ut Subject
-#Subject-BDI            23  Subject headings from
-#                           Bibliotek Dokumentasjon
-#                           Informasjon -- a controlled
-#                           subject vocabulary used and
-#                           maintained by the five Nordic
-#                           countries (Denmark, Finland,
-#                           Iceland, Norway, and Sweden).
-#BDI-index-subject 1=23
-
-#Subject-INSPEC         24  Subject headings from           600i2, 610i2,
-#                           Information Services for the    611i2, 630i2,
-#                           Physics and Engineering         650i2, 651i2
-#                           Communities -- the Information
-#                           Services Division of the
-#                           Institution of Electrical
-#                           Engineers.
-#INSPEC-subject 1=24
-
-#Subject-LC             27  Subject headings from           600i0, 610i0,
-#                           US Library of Congress          611i0, 630i0,
-#                           Subject Headings.               650i0, 651i0
-#LC-subject-heading 1=27
-
-#Subject-LC-          1008  Subject headings, for use       600i1, 610i1,
-#children's                 with children's literature,     611i1, 630i1,
-#                           that conform to the             650i1, 651i1
-#                           formulation guidelines in
-#                           the "AC Subject Headings"
-#                           section of the Library of
-#                           Congress Subject Headings.
-#Subject-LC-childrens 1=1008
-
-#Subject-local          29  Subjects headings defined
-#                           locally.
-#Local-subject-index 1=29
-
-#Subject-MESH           25  Subject headings from           600i2, 610i2,
-#                           Medical Subject Headings --     611i2, 630i2,
-#                           maintained by the US National   650i2, 651i2
-#                           Library of Medicine.
-#MESH-subject 1=25
-
-#Subject-name-        1009  A person's real name,           600
-#personal                   pseudonym, title of nobility
-#                           nickname, or initials that
-#                           appears in a subject heading.
-Subject-name-personal 1=1009
-su-na 1=1009
-#Subject-name-personal
-#Subject-PA             26  Subject headings from           600i2, 610i2,
-#                           Thesaurus of Psychological      611i2, 630i2,
-#                           Index Terms -- maintained       650i2, 651i2
-#                           by the Retrieval Services Unit
-#                           of the American Psychological
-#                           Association.
-#PA-subject 1=26
-
-#Subject-PRECIS         45  Subject headings from
-#                           PREserved Context Index
-#                           System -- a string of indexing
-#                           terms set down in a prescribed
-#                           order, each term being preceded
-#                           by a manipulation code which
-#                           governs the production of
-#                           pre-coordinated subject index
-#                           entries under selected terms --
-#                           maintained by the British
-#                           Library.
-#Subject-precis 1=45
-
-#Subject-RAMEAU         22  Subject headings from
-#                           Repertoire d'authorite de
-#                           matieres encyclopedique
-#                           unifie -- maintained by the
-#                           Bibliotheque Nationale
-#                           (France).
-#Subject-Rameau 1=22
-
-#Subject-RSWK           46  Subject headings from
-#                           Regeln fur den
-#                           Schlagwortkatalog --
-#                           maintained by the Deutsches
-#                           Bibliotheksinstitut.
-#Subject-rswk 1=46
-
-#Subject-RVM            28  Subject headings from           600i6, 610i6,
-#                           Repertoire des vedettes-        611i6, 630i6,
-#                           matiere -- maintained by the    650i6, 651i6
-#                           Bibliotheque de l'Universite
-#                           de Laval.
-#RVM-subject-heading 1=28
-
-#Subject-subdivision    47  An extension to a subject       6XX$x, 6XX$y,
-#                           heading indicating the form,    6XX$z
-#                           place, period of time treated,
-#                           or aspect of the subject
-#                           treated.
-#Subject-subdivision 1=47
-
-#Title                   4  A word, phrase, character,      130, 21X-24X, 440,
-#                           or group of characters,         490, 730, 740, 830,
-#                           normally appearing in an item,  840, subfield $t
-#                           that names the item or the      in the following:
-#                           work contained in it.           400, 410, 410, 600,
-#                                                           610, 611, 700, 710,
-#                                                           711, 800, 810, 811
-Title 1=4
-#5=1 1=4 s=pw
-#1=4
-ti Title
-
-#Title-abbreviated      43  Shortened form of the title;    210, 211 (obs.),
-#                           either assigned by national     246
-#                           centers under the auspices of
-#                           the International Serials Data
-#                           System, or a title (such as an
-#                           acronym) that is popularly
-#                           associated with the item.
-#Title-abbreviated      1=43
-
-#Title-added-title-page 37  A title on a title page         246i5
-#                           preceding or following the
-#                           title page chosen as the basis
-#                           for the description of the
-#                           item.  It may be more general
-#                           (e.g., a series title page),
-#                           or equally general (e.g., a
-#                           title page in another
-#                           language).
-#Title-added-title-page 1=37
-
-#Title-caption          38  A title given at the beginning  246i6
-#                           of the first page of the text.
-#Title-caption          1=38
-
-#Title-collective       34  A title proper that is an       243
-#                           inclusive title for an item
-#                           containing several works.
-#Title-collective       1=34
-
-#Title-cover            36  The title printed on the        246i4
-#                           cover of an item as issued. 
-Title-cover            1=36
-
-#Title-expanded         44  An expanded (or augmented)      214 (obs.), 246
-#                           title has been enlarged with
-#                           descriptive words by the
-#                           cataloger to provide
-#                           additional indexing and
-#                           searching capabilities.
-#Title-expanded         1=44
-
-#Title-former           42  A former title or title         247, 780
-#                           variation when one
-#                           bibliographic record
-#                           represents all issues of
-#                           a serial that has changed
-#                           title.
-#Title-former           1=42
-
-#Title-host-item      1033  The title of the item            773$t
-#                           containing the part
-#                           described in the record, for
-#                           example, a journal title
-#                           when the record describes an
-#                           article in the journal.
-Host-item      1=1033
-
-#Title-key              33  The unique name assigned to     222
-#                           a serial by the International
-#                           Serials Data System (ISDS).
-#Title-key              1=33
-
-#Title-other-variant    41  A variation from the title      212 (obs.), 246i3,
-#                           page title appearing elsewhere  247, 740
-#                           in the item (e.g., a variant
-#                           cover title, caption title,
-#                           running title, or title from
-#                           another volume) or in another
-#                           issue.
-#Title-other-variant    1=41
-
-#Title-parallel         35  The title proper in another     246i1
-#                           language and/or script.
-#Title-parallel         1=35
-
-#Title-related-       1026  Serial titles related to this   247, 780, 785
-#periodical                 item, either the immediate
-#                           predecessor or the immediate
-#                           successor.
-#Related-periodical 1=1026
-#Title-running          39  A title, or abbreviated title,  246i7
-#                           that is repeated at the head
-#                           or foot of each page or leaf.
-#Title-running          1=39
-
-#Title-series            5  Collective title applying to    440, 490, 830, 840,
-#                           a group of separate, but        subfield $t in the
-#                           related, items.                 following: 400,410,
-#                                                           411, 800, 810, 811
-Title-series            1=5
-#series Title-series
-se Title-series
-
-#Title-spine            40  A title appearing on the        246i8
-#                           spine of an item.
-#Title-spine            1=40
-
-#Title-uniform           6  The particular title by which   130, 240, 730,
-#                           a work is to be identified      subfield $t in the
-#                           for cataloging purposes.        following: 700,710,
-#                                                           711
-Title-uniform           1=6
-ut Title-uniform
-#Authority-number           Koha-Auth-Number  The Number   
-#                           for an authority to be searched subfield $9 in the
-#                           for cataloging purposes.        following: 700,701,702,710,
-#                                                           711,712 and some 6XX fields (Unimarc)
-Authority-number           1=8910
-an Authority-Number
-Koha-Auth-Number Authority-Number
-
-#Authority/format-id        authtypecode  The Code 
-#                           associated to an authority type
-#                                                            152$b in authority records
-Authority/format-id           1=Authority/format-id
-at Authority/format-id
-
-#Heading-Entity             Information for Heading in an 
-#                           authority record 
-#                                                             usually 2.. fields
-Heading-Entity           1=Heading-Entity
-he Heading-Entity
-
-
-### 2. BIB1 RELATION ATTRIBUTES
-lt 2=1
-le 2=2
-eq 2=3
-ge 2=4
-ne 2=5
-phonetic 2=6
-stem 2=100
-relevance 2=102
-rk 2=102
-rank relevance
-
-AlwaysMatches 2=103
-Within 2=104
-
-### 3. BIB1 POSITION ATTRIBUTES
-first-in-field 3=1
-
-# we have to fake startswith until zebra supports it
-# starts with if we want no truncation ... need to ad 'term #'
-# finds 'starts with it' but not italian
-# see http://lists.indexdata.dk/pipermail/yazlist/2006-July/001664.html
-startswithnt 3=1 5=101 6=3
-
-# starts with with truncation
-first-in-subfield 3=2
-any-position-in-field 3=3
-
-### 4. BIB1 STRUCTURE ATTRIBUTES
-st-phrase 4=1
-phr st-phrase
-st-word        4=2
-st-key         4=3
-st-year        4=4
-st-date-normalized     4=5
-st-word-list   4=6
-wrdl 4=6
-
-# there was a reason I didn't want to use this but it's
-# escaped me -- JF
-wrd 4=6
-
-#st-word
-st-date-un-normalized  4=100
-st-name-normalized     4=101
-st-name-un-normalized  4=102
-st-structure   4=103
-st-urx         4=104
-st-free-form-text      4=105
-st-document-text       4=106
-st-local       number 4=107
-st-string      4=108
-st-numeric     4=109
-#string 109
-
-### 5. BIB1 TRUNCATION ATTRIBUTES
-right-Truncation 5=1
-rt right-Truncation
-left-Truncation        5=2
-left-and-right         5=3
-do-not-truncate        5=100
-process-in-search-term         5=101
-regExpr-1      5=102
-fuzzy 5=103
-regExpr-2      5=103
-Z39-58 5=104
-
-### 6. BIB1 STRUCTURE ATTRIBUTES
-incomplete-subfield    6=1
-complete-subfield      6=2
-complete-field         6=3
-
-### COMBINATIONS OF THE ABOVE
-ext 4=1 6=3
-
-## ATTRIBUTES NOT IN BIB1 OR ELSE ONES I DON"T KNOW WHERE IN BIB1 THEY BELONG
-#Language
-#ln 1=8805
-#language 1=8805
-
-#Musical Composition
-#mc
-
-# Publisher Location
-
-Place-publication 1=59
-pl Place-publication
-#pl 1=59
-
-# Extent
-Extent 1=8001
-
-#Summary                       1=8002
-#att 8900            
-#Call-Number 1=8900
-#date-entered-on-file 1=8800
-#date1 1=8801
-#date2 1=8802
-#language 8805
-ff8-22 1=8822
-ff8-23 1=8823
-ff8-34 1=8834
-
-#att 8700            ff7-00
-#att 8701            ff7-01
-#att 8702            ff7-02
-#att 9520            withdrawn
-#att 9521            lost
-lost 1=9521 4=109
-#att 9522            onloan
-
-############## SUBJECT-RELATED
-# Topical Term
-#tt
-# Descriptor
-#de
-# Genre/Form
-#ge
-# Geographic Coverage
-#gc
-
-## Additional Author distinctions needed for field weighting
-# lastname,firstname entry in $100$a
-Author-personal-bibliography 1=8900
-aub Author-personal-bibliography
-# Author-in-order - firstname lastname in 245$c statement of responsibility
-Author-in-order 1=8901
-auo Author-in-order
-
-### LIMITS
-# AUDIENCE
-audience 1=8822
-aud audience
-
-# CONTENT and Literary form
-fiction 1=8833
-fic fiction
-#mystery 1=
-biography 1=8834
-bio biography
-
-# FORMAT
-format 1=8823
-
-# format limit
-l-format 1=8703
-
-#fmt format
-
-# BRANCH (of local library)
-branch 1=1033
-
-Illustration-code 1=Illustration-code 
-# Item Type
-
-# Year limit
-#yr 1=8801 4=109 r=r
-
-## STATUSES
-onloan 1=9522
-datedue 1=9522
-
-popularity 1=9523
-
-# Material Category
-mc 1=8700
-## TYPE LIMITS
-dt-bks 1=8700
-dt-vis 1=8700
-dt-sr 1=8700
-dt-cf 1=8700
-dt-map 1=8700
-
-# Rank Weights
-r1 9=32
-r2 9=28
-r3 9=26
-r4 9=10
-r5 9=22
-r6 9=20
-r7 9=18
-r8 9=16
-r9 9=14
-
-# Sorting
-title-sort-za 7=2 1=36
-title-sort-az 7=1 1=36
-# CCL DIRECTIVES
-# Truncation characters (it seems to take multiple arguments)
-@truncation ? *
-# field specifies how multiple fields are to be combined.
-# There are two modes: or: multiple qualifier fields are
-# ORed, merge: attributes for the qualifier fields are
-# merged and assigned to one term.
-@field merge
-# case specificies if CCL operatores and qualifiers
-# should be compared with case sensitivity or not.
-# Specify 0 for case sensitive; 1 for case insensitive.
-@case 0
-# Tokens for CCL operators (it seems you can assign multiple tokens per operator which is nice)
-@and and +
-@or or |
-# make sure - doesn't conflict with another usage of this token
-@not not
-@set set
-# Not sure if you can specify tokens for prox operators, but here are the defaults
-# proximity of a, b - distance n - any order:
-# a %n b
-# proximity of a, b - distance n - in order:
-# a !n b
-# Integer n may be omitted - in which case distance is 1.
-
-# 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
diff --git a/misc/zebra/pqf.properties b/misc/zebra/pqf.properties
deleted file mode 100644 (file)
index 9d1ff86..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-# $Id$
-#
-# Propeties file to drive org.z3950.zing.cql.CQLNode's toPQF()
-# back-end and the YAZ CQL-to-PQF converter.  This specifies the
-# interpretation of various CQL indexes, relations, etc. in terms
-# of Type-1 query attributes.
-#
-# This configuration file generates queries using BIB-1 attributes.
-# See http://www.loc.gov/z3950/agency/zing/cql/dc-indexes.html
-# for the Maintenance Agency's work-in-progress mapping of Dublin Core
-# indexes to Attribute Architecture (util, XD and BIB-2)
-# attributes.
-
-# Identifiers for prefixes used in this file. (index.*)
-set.cql                = info:srw/cql-context-set/1/cql-v1.1
-set.rec                = info:srw/cql-context-set/2/rec-1.0
-set.dc         = info:srw/cql-context-set/1/dc-v1.1
-set.bath       = http://zing.z3950.org/cql/bath/2.0/
-
-# default set (in query)
-set            = info:srw/cql-context-set/1/dc-v1.1
-
-# The default access point and result-set references
-index.cql.serverChoice                 = 1=1016
-       # srw.serverChoice is deprecated in favour of cql.serverChoice
-       # BIB-1 "any"
-
-index.rec.id                           = 1=12
-
-index.dc.identifier                            = 1=1007          
-index.dc.title                         = 1=4
-index.dc.subject                       = 1=21
-index.dc.creator                       = 1=1003
-index.dc.author                                = 1=1003
-index.dc.itemtype                       = 1=1031
-index.dc.barcode                        = 1=1028
-index.dc.branch                         = 1=1033
-index.dc.isbn                           = 1=7
-index.dc.issn                           = 1=8
-index.dc.any                           = 1=1016
-index.dc.note                  = 1=63
-
-       ### Unofficial synonym for "creator"
-index.dc.editor                                = 1=1020
-index.dc.publisher                     = 1=1018
-index.dc.description                   = 1=62
-       # "abstract"
-index.dc.date                          = 1=30
-index.dc.resourceType                  = 1=1031
-       # guesswork: "Material-type"
-index.dc.format                                = 1=1034
-       # guesswork: "Content-type"
-index.dc.resourceIdentifier            = 1=12
-       # "Local number"
-#index.dc.source                               = 1=1019
-       # "Record-source"
-index.dc.language                      = 1=54
-       # "Code--language"
-       
-index.dc.Place-publication             = 1=59
-       # "Place-publication"
-
-index.dc.relation                      = 1=?
-       ### No idea how to represent this
-index.dc.coverage                      = 1=?
-       ### No idea how to represent this
-index.dc.rights                                = 1=?
-       ### No idea how to represent this
-
-# Relation attributes are selected according to the CQL relation by
-# looking up the "relation.<relation>" property:
-#
-relation.<                             = 2=1
-relation.le                            = 2=2
-relation.eq                            = 2=3
-relation.exact                         = 2=3
-relation.ge                            = 2=4
-relation.>                             = 2=5
-relation.<>                            = 2=6
-
-### These two are not really right:
-relation.all                           = 2=3
-relation.any                           = 2=3
-
-# BIB-1 doesn't have a server choice relation, so we just make the
-# choice here, and use equality (which is clearly correct).
-relation.scr                           = 2=3
-
-# Relation modifiers.
-#
-relationModifier.relevant              = 2=102
-relationModifier.fuzzy                  = 5=103
-       ### 100 is "phonetic", which is not quite the same thing
-relationModifier.stem                  = 2=101
-relationModifier.phonetic              = 2=100
-
-# Position attributes may be specified for anchored terms (those
-# beginning with "^", which is stripped) and unanchored (those not
-# beginning with "^").  This may change when we get a BIB-1 truncation
-# attribute that says "do what CQL does".
-#
-position.first                         = 3=1 6=1
-       # "first in field"
-position.any                           = 3=3 6=1
-       # "any position in field"
-position.last                          = 3=4 6=1
-       # not a standard BIB-1 attribute
-position.firstAndLast                  = 3=3 6=3
-       # search term is anchored to be complete field
-
-# Structure attributes may be specified for individual relations; a
-# default structure attribute my be specified by the pseudo-relation
-# "*", to be used whenever a relation not listed here occurs.
-#
-structure.exact                                = 4=108
-       # string
-structure.all                          = 4=2
-structure.any                          = 4=2
-structure.*                            = 4=1
-       # phrase
-
-# Truncation attributes used to implement CQL wildcard patterns.  The
-# simpler forms, left, right- and both-truncation will be used for the
-# simplest patterns, so that we produce PQF queries that conform more
-# closely to the Bath Profile.  However, when a more complex pattern
-# such as "foo*bar" is used, we fall back on Z39.58-style masking.
-#
-truncation.right                       = 5=1
-truncation.left                                = 5=2
-truncation.both                                = 5=3
-truncation.none                                = 5=100
-truncation.z3958                       = 5=104
-
-# Finally, any additional attributes that should always be included
-# with each term can be specified in the "always" property.
-#
-always                                 = 6=1
-# 6=1: completeness = incomplete subfield
-
-
-# Bath Profile support, added Thu Dec 18 13:06:20 GMT 2003
-# See the Bath Profile for SRW at
-#      http://zing.z3950.org/cql/bath.html
-# including the Bath Context Set defined within that document.
-#
-# In this file, we only map index-names to BIB-1 use attributes, doing
-# so in accordance with the specifications of the Z39.50 Bath Profile,
-# and leaving the relations, wildcards, etc. to fend for themselves.
-
-index.bath.keyTitle                    = 1=33
-index.bath.possessingInstitution       = 1=1044
-index.bath.name                                = 1=1002
-index.bath.personalName                        = 1=1
-index.bath.corporateName               = 1=2
-index.bath.conferenceName              = 1=3
-index.bath.uniformTitle                        = 1=6
-index.bath.isbn                                = 1=7
-index.bath.issn                                = 1=8
-index.bath.geographicName              = 1=58
-index.bath.notes                       = 1=63
-index.bath.topicalSubject              = 1=1079
-index.bath.genreForm                   = 1=1075
-
diff --git a/rewrite-config.PL b/rewrite-config.PL
new file mode 100644 (file)
index 0000000..9f92467
--- /dev/null
@@ -0,0 +1,105 @@
+# Copyright 2007 MJ Ray
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+#
+# Current maintainer MJR http://mjr.towers.org.uk/
+# See http://www.koha.org/wiki/?page=KohaInstaller
+
+use Sys::Hostname;
+use Socket;
+
+=head1 NAME
+
+rewrite-config.PL - helper for the Koha packager and installer
+
+=head1 SYNOPSIS
+
+       perl rewrite-config.PL configurationfile
+
+=head1 DESCRIPTION
+
+This helper script replaces placeholders in the
+configuration files with value either supplied through
+the environment (with export, or by putting them on
+the start of the make command linke) or with reasonable
+guesses worked out by the script.
+
+=head2 KEYS
+
+The following configuration keys are available:
+
+BASE_DIR, MYSQL_DB, MYSQL_HOST, MYSQL_PASS, MYSQL_USER, WEBSERVER_DOMAIN,
+WEBSERVER_HOST, WEBSERVER_IP, ZEBRA_PASS, ZEBRA_USER
+
+=cut
+
+$myhost = hostname();
+$mydomain = $myhost;
+$mydomain =~ s/^.*?\.//;
+
+# 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),
+  "__MYSQL_DB__" => "koha",
+  "__MYSQL_HOST__" => $myhost,
+  "__MYSQL_PASS__" => "katikoan",
+  "__MYSQL_USER__" => "kohaadmin",
+  "__WEBSERVER_DOMAIN__" => $mydomain,
+  "__WEBSERVER_HOST__" => $myhost,
+  # This is set like this to rescue systems with broken DNS
+  "__WEBSERVER_IP__" => $ENV{'WEBSERVER_IP'} || inet_ntoa(scalar gethostbyname($myhost||'localhost')) || die "Cannot get our own IP address: DNS fault?",
+  "__ZEBRA_PASS__" => "zebrastripes",
+  "__ZEBRA_USER__" => "kohauser",
+);
+
+# Override configuration from the environment
+foreach $key (keys %configuration) {
+  if (defined($ENV{$key})) {
+    $configuration{$key} = $ENV{$key};
+  }
+}
+
+$fname = $ARGV[0];
+$file = read_file($fname);
+$file =~ s/__.*?__/$configuration{$&}/seg;
+chmod 0644, $fname;
+open(OUTPUT,">$fname") || die "Can't open $fname for write: $!";
+print OUTPUT $file;
+close(OUTPUT);
+
+# Idea taken from perlfaq5
+sub read_file($) {
+  local(*INPUT,$/);
+  open(INPUT,$_[0]) || die "Can't open $_[0] for read";
+  my $file = <INPUT>;
+  return $file;
+}
+
+__END__
+
+
+=head1 SEE ALSO
+
+Makefile.PL, ExtUtils::MakeMaker(3)
+
+=head1 AUTHOR
+
+MJ Ray mjr at phonecoop.coop
+
+=cut
+