View | Details | Raw Unified | Return to bug 8507
Collapse All | Expand All

(-)a/debian/docs/koha-create.xml (+16 lines)
Lines 27-32 Link Here
27
      <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option>|<option>--use-db</option></arg>
27
      <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option>|<option>--use-db</option></arg>
28
      <arg><option>--marcflavor</option> marc21|normarc|unimarc</arg>
28
      <arg><option>--marcflavor</option> marc21|normarc|unimarc</arg>
29
      <arg><option>--zebralang</option> en|es|fr|nb|ru|uk</arg>
29
      <arg><option>--zebralang</option> en|es|fr|nb|ru|uk</arg>
30
      <arg><option>--auth-idx</option> dom|grs1</arg>
31
      <arg><option>--biblio-idx</option> dom|grs1</arg>
30
      <arg><option>--defaultsql</option> /path/to/some.sql</arg>
32
      <arg><option>--defaultsql</option> /path/to/some.sql</arg>
31
      <arg><option>--configfile</option> /path/to/config</arg>
33
      <arg><option>--configfile</option> /path/to/config</arg>
32
      <arg><option>--passwdfile</option> /path/to/passwd</arg>
34
      <arg><option>--passwdfile</option> /path/to/passwd</arg>
Lines 109-114 Link Here
109
      </listitem>
111
      </listitem>
110
    </varlistentry>
112
    </varlistentry>
111
113
114
    <varlistentry>
115
      <term><option>--auth-idx</option></term>
116
      <listitem>
117
        <para>Specified the desired indexing mode for authority records. Valid options are <option>dom</option> (default) and <option>grs1</option>.</para>
118
      </listitem>
119
    </varlistentry>
120
121
    <varlistentry>
122
      <term><option>--biblio-idx</option></term>
123
      <listitem>
124
        <para>Specified the desired indexing mode for bibliographic records. Valid options are <option>dom</option> (default) and <option>grs1</option>.</para>
125
      </listitem>
126
    </varlistentry>
127
112
  </variablelist>
128
  </variablelist>
113
  </refsect1>
129
  </refsect1>
114
130
(-)a/debian/scripts/koha-create (-1 / +45 lines)
Lines 22-27 set -e Link Here
22
usage="Usage: $0 [--create-db|--request-db|--populate-db|--use-db] \
22
usage="Usage: $0 [--create-db|--request-db|--populate-db|--use-db] \
23
    [--marcflavor marc21|normarc|unimarc] \
23
    [--marcflavor marc21|normarc|unimarc] \
24
    [--zebralang en|es|fr|nb|ru|uk] \
24
    [--zebralang en|es|fr|nb|ru|uk] \
25
    [--auth-idx dom|grs1] [--biblio-idx dom|grs1] \
25
    [--defaultsql /path/to/some.sql] \
26
    [--defaultsql /path/to/some.sql] \
26
    [--configfile /path/to/config] [--passwdfile /path/to/passwd] \
27
    [--configfile /path/to/config] [--passwdfile /path/to/passwd] \
27
    [--database database] [--adminuser n] instancename"
28
    [--database database] [--adminuser n] instancename"
Lines 45-50 generate_config_file() { Link Here
45
        -e "s/__ZEBRA_PASS__/$zebrapwd/g" \
46
        -e "s/__ZEBRA_PASS__/$zebrapwd/g" \
46
        -e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \
47
        -e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \
47
        -e "s/__ZEBRA_LANGUAGE__/$ZEBRA_LANGUAGE/g" \
48
        -e "s/__ZEBRA_LANGUAGE__/$ZEBRA_LANGUAGE/g" \
49
        -e "s/__BIBLIO_INDEXING__/$BIBLIO_INDEXING/g" \
50
        -e "s/__AUTHORITY_INDEXING__/$AUTHORITY_INDXING/g" \
48
        -e "s/__DB_NAME__/$mysqldb/g" \
51
        -e "s/__DB_NAME__/$mysqldb/g" \
49
        -e "s/__DB_HOST__/$mysqlhost/g" \
52
        -e "s/__DB_HOST__/$mysqlhost/g" \
50
        -e "s/__DB_USER__/$mysqluser/g" \
53
        -e "s/__DB_USER__/$mysqluser/g" \
Lines 75-80 getinstancemysqldatabase() { Link Here
75
    xmlstarlet sel -t -v 'yazgfs/config/database' "/etc/koha/sites/$1/koha-conf.xml"
78
    xmlstarlet sel -t -v 'yazgfs/config/database' "/etc/koha/sites/$1/koha-conf.xml"
76
}
79
}
77
80
81
set_authority_indexing()
82
{
83
    indexing_mode=$1
84
85
    case $indexing_mode in
86
        "grs1")
87
            AUTHORITY_INDEXING=""
88
            ;;
89
        "dom")
90
            AUTHORITY_INDEXING="-dom"
91
            ;;
92
        *)
93
            die "Error: '$indexing_mode' is not a valid indexing mode for authority records."
94
            ;;
95
    esac
96
}
97
98
set_biblio_indexing()
99
{
100
    indexing_mode=$1
101
102
    case $indexing_mode in
103
        "grs1")
104
            BIBLIO_INDEXING=""
105
            ;;
106
        "dom")
107
            BIBLIO_INDEXING="-dom"
108
            ;;
109
        *)
110
            die "Error: '$indexing_mode' is not a valid indexing mode for bibliographic records."
111
            ;;
112
    esac
113
}
114
78
# Set defaults and read config file, if it exists.
115
# Set defaults and read config file, if it exists.
79
DOMAIN=""
116
DOMAIN=""
80
OPACPORT="80"
117
OPACPORT="80"
Lines 86-91 INTRASUFFIX="" Link Here
86
DEFAULTSQL=""
123
DEFAULTSQL=""
87
ZEBRA_MARC_FORMAT="marc21"
124
ZEBRA_MARC_FORMAT="marc21"
88
ZEBRA_LANGUAGE="en"
125
ZEBRA_LANGUAGE="en"
126
BIBLIO_INDEXING="-dom"
127
AUTHORITY_INDEXING="-dom"
89
ADMINUSER="1"
128
ADMINUSER="1"
90
PASSWDFILE="/etc/koha/passwd"
129
PASSWDFILE="/etc/koha/passwd"
91
if [ -e /etc/koha/koha-sites.conf ]
130
if [ -e /etc/koha/koha-sites.conf ]
Lines 95-101 fi Link Here
95
134
96
[ $# -ge 2 ] && [ $# -le 16 ] || die $usage
135
[ $# -ge 2 ] && [ $# -le 16 ] || die $usage
97
136
98
TEMP=`getopt -o crpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,marcflavor:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser: \
137
TEMP=`getopt -o crpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,marcflavor:,\
138
      auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser: \
99
     -n "$0" -- "$@"`
139
     -n "$0" -- "$@"`
100
140
101
# Note the quotes around `$TEMP': they are essential!
141
# Note the quotes around `$TEMP': they are essential!
Lines 115-120 while true ; do Link Here
115
        -u|--use-db) op=use ; shift ;;
155
        -u|--use-db) op=use ; shift ;;
116
		-m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;;
156
		-m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;;
117
		-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
157
		-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
158
		--auth-idx) set_authority_indexing "$2" ; shift 2 ;;
159
		--biblio-idx) set_biblio_indexing "$2" ; shift 2 ;;
118
		-d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;;
160
		-d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;;
119
		-f|--configfile) configfile="$2" ; shift 2 ;;
161
		-f|--configfile) configfile="$2" ; shift 2 ;;
120
        -s|--passwdfile) CLO_PASSWDFILE="$2" ; shift 2 ;;
162
        -s|--passwdfile) CLO_PASSWDFILE="$2" ; shift 2 ;;
Lines 261-266 eof Link Here
261
    # Generate and install Zebra config files.
303
    # Generate and install Zebra config files.
262
    generate_config_file zebra-biblios-site.cfg.in \
304
    generate_config_file zebra-biblios-site.cfg.in \
263
        "/etc/koha/sites/$name/zebra-biblios.cfg"
305
        "/etc/koha/sites/$name/zebra-biblios.cfg"
306
    generate_config_file zebra-biblios-dom-site.cfg.in \
307
        "/etc/koha/sites/$name/zebra-biblios-dom.cfg"
264
    generate_config_file zebra-authorities-site.cfg.in \
308
    generate_config_file zebra-authorities-site.cfg.in \
265
        "/etc/koha/sites/$name/zebra-authorities.cfg"
309
        "/etc/koha/sites/$name/zebra-authorities.cfg"
266
    generate_config_file zebra-authorities-dom-site.cfg.in \
310
    generate_config_file zebra-authorities-dom-site.cfg.in \
(-)a/debian/templates/koha-conf-site.xml.in (-4 / +3 lines)
Lines 26-32 Link Here
26
<!-- BIBLIOGRAPHIC RECORDS -->
26
<!-- BIBLIOGRAPHIC RECORDS -->
27
<server id="biblioserver"  listenref="biblioserver">
27
<server id="biblioserver"  listenref="biblioserver">
28
    <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
28
    <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
29
    <config>/etc/koha/sites/__KOHASITE__/zebra-biblios.cfg</config>
29
    <config>/etc/koha/sites/__KOHASITE__/zebra-biblios__BIBLIO_INDEXING__.cfg</config>
30
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
30
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
31
     <retrievalinfo>
31
     <retrievalinfo>
32
       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
32
       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
Lines 102-108 Link Here
102
<!-- AUTHORITY RECORDS -->
102
<!-- AUTHORITY RECORDS -->
103
<server id="authorityserver"  listenref="authorityserver" >
103
<server id="authorityserver"  listenref="authorityserver" >
104
    <directory>/var/lib/koha/__KOHASITE__/authorities</directory>
104
    <directory>/var/lib/koha/__KOHASITE__/authorities</directory>
105
    <config>/etc/koha/sites/__KOHASITE__/zebra-authorities-dom.cfg</config>
105
    <config>/etc/koha/sites/__KOHASITE__/zebra-authorities__AUTHORITY_INDEXING__.cfg</config>
106
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
106
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
107
    <xi:include href="/etc/koha/__ZEBRA_MARC_FORMAT__-retrieval-info-auth-dom.xml"
107
    <xi:include href="/etc/koha/__ZEBRA_MARC_FORMAT__-retrieval-info-auth-dom.xml"
108
                xmlns:xi="http://www.w3.org/2001/XInclude">
108
                xmlns:xi="http://www.w3.org/2001/XInclude">
Lines 176-182 Link Here
176
176
177
<server id="publicserver"  listenref="publicserver">
177
<server id="publicserver"  listenref="publicserver">
178
    <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
178
    <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
179
    <config>/etc/koha/sites/__KOHASITE__/zebra-biblios.cfg</config>
179
    <config>/etc/koha/sites/__KOHASITE__/zebra-biblios__BIBLIO_INDXING__.cfg</config>
180
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
180
    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
181
     <retrievalinfo>
181
     <retrievalinfo>
182
       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
182
       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
183
- 

Return to bug 8507