;;; Hey, Emacs, this file is -*- Common-Lisp -*- ... got that?

(in-package :tsdb)

(setf *tsdb-cache-connections-p* t)

(setf *pvm-encoding* :utf-8)

(defparameter %logon% 
  (let ((root (system:getenv "LOGONROOT")))
    (when root (namestring (parse-namestring root)))))

(when %logon%
  ;;
  ;; point to Norwegian skeletons, rather than the default English ones
  ;;
  (tsdb 
   :skeleton
   (format nil "~a/lingo/lkb/src/tsdb/skeletons/norsk" %logon%))
  ;;
  ;; define [incr tsdb()] clients in terms of binary to run, command-line
  ;; arguments, and the host to run on; if the default of `(short-site-name)'
  ;; for the current host does not work for you, then contact me for advice.
  ;;                                                         (17-dec-03; oe)
  ;;
  (let ((binary (format nil "~a/franz/~a/alisp" %logon% mk::%system-binaries%))
	(image 
	 (format nil "~a/franz/~a/base.dxl" %logon% mk::%system-binaries%))
        (xle 
	 (format nil "~a/franz/~a/xle.dxl" %logon% mk::%system-binaries%)))
    (setf *pvm-cpus*
      (list
       (make-cpu 
	:host (short-site-name)
	:spawn binary
	:options (list "-I" xle "-qq" "-locale" "iso.8859.1"
		       "-L" (format nil "~a/uib/client.lisp" %logon%))
	:class :norgram :grammar "NorGram (29-apr-05)" :name "xle" 
	:task '(:parse))
       (make-cpu 
        :host (short-site-name)
        :spawn binary
        :options (list "-I" image "-qq" "-locale" "no_NO.UTF-8"
                       "-L" (format nil "~a/lingo/noen.lisp" %logon%))
        :class :noen :name "noen" :grammar "NoEn (10-may-05)" 
        :task '(:transfer))
       (make-cpu 
        :host (short-site-name)
        :spawn binary
        :options (list "-I" image "-qq" "-locale" "no_NO.UTF-8"
                       "-L" (format nil "~a/lingo/erg.lisp" %logon%))
        :class :erg :grammar "LinGO (19-may-05)" :task '(:generate))
       (make-cpu 
        :host (short-site-name)
        :spawn binary
        :options (list "-I" image "-qq" "-locale" "japan.EUC" 
                       "-L" (format nil "~a/dfki/client.lisp" %logon%))
        :class :jacy :name "lkb" :grammar "JaCY (apr-04)"
        :task '(:parse))
       (make-cpu 
        :host (short-site-name)
        :spawn binary
        :options (list "-I" image "-qq"
                       "-L" (format nil "~a/lingo/jaen.lisp" %logon%))
        :class :jaen :name "lkb" :grammar "JaEn (2-aug-04)" 
        :task '(:transfer))
       (make-cpu 
        :host (short-site-name)
        :spawn binary
        :options (list "-I" image "-qq" "-locale" "no_NO.UTF-8"
                       "-L" (format nil "~a/lingo/logon.lisp" %logon%))
        :class :logon :name "logon" :task '(:translate))))))