--- dico-2.0.orig/debian/docs +++ dico-2.0/debian/docs @@ -0,0 +1,4 @@ +NEWS +README +TODO +ChangeLog.2008 --- dico-2.0.orig/debian/dico-dev.examples +++ dico-2.0/debian/dico-dev.examples @@ -0,0 +1 @@ +modules/template.c --- dico-2.0.orig/debian/dico.install +++ dico-2.0/debian/dico.install @@ -0,0 +1,2 @@ +usr/bin/dico +usr/share/locale/ --- dico-2.0.orig/debian/dicod.postrm +++ dico-2.0/debian/dicod.postrm @@ -0,0 +1,27 @@ +#!/bin/sh +# postrm script for dicod +# +# see: dh_installdeb(1) + +set -e + + +case "$1" in + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + purge) + rm -f /var/lib/dicod/dictorg-db.list + rmdir --ignore-fail-on-non-empty /var/lib/dicod/ || true + # remove user, group and home directory dicod + deluser --remove-home dicod >/dev/null 2>&1 || true + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- dico-2.0.orig/debian/dico-module-mediawiki.README.Debian +++ dico-2.0/debian/dico-module-mediawiki.README.Debian @@ -0,0 +1,39 @@ +dico-module-mediawiki for Debian +-------------------------------- + +* To use the mediawiki module, make sure that the python module is loaded in + /etc/dicod.conf, and add the following lines in /etc/dicod.conf: + +database { + name ""; + handler "python load-path=/usr/share/dico/python init-script=mediawiki "; + mime-headers <<- EOT + Content-Type: text/x-wiki + Content-Transfer-Encoding: quoted-printable + X-Wiki-Language: + EOT; + description ""; + info <<- EOT + +EOT; +} + +Here's an example: + +database { + name "en-wiktionary"; + handler "python load-path=/usr/share/dico init-script=mediawiki en.wiktionary.org"; + mime-headers <<- EOT + Content-Type: text/x-wiki + Content-Transfer-Encoding: quoted-printable + X-Wiki-Language: en + EOT; + description "en.wiktionary.org"; + info <<- EOT +English language Wiktionary, a collaborative project to produce a +free-content multilingual dictionary. +EOT; +} + + -- أحمد المحمودي (Ahmed El-Mahmoudy) Fri, 03 Apr 2009 06:28:25 +0200 --- dico-2.0.orig/debian/dicod.default +++ dico-2.0/debian/dicod.default @@ -0,0 +1,15 @@ +# Defaults for dicod initscript +# sourced by /etc/init.d/dicod +# installed at /etc/default/dicod by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# In case you want to stick with inetd mode (or if you just want to disable +# the init scripts for some other reason), you can disable the init script +# here. (Just set it to 1) +DICOD_DISABLED=0 + +# Additional options that are passed to the Daemon. ( See dicod(8) ) +DAEMON_OPTS="" --- dico-2.0.orig/debian/dicodconfig.8 +++ dico-2.0/debian/dicodconfig.8 @@ -0,0 +1,178 @@ +.\" This manpage is copyright (C) 2009 أحمد المحمودي (Ahmed El-Mahmoudy) +.\" Based on dictdconfig manpage which is copyright (C) 1999-2000 Kirk Hilliard +.\" . +.\" This is free software, published under version 2 or (at your option) +.\" any later version of the GNU General Public License. You should +.\" have received a copy of the GNU General Public License with your +.\" Debian GNU/Linux system as /usr/share/common-licenses/GPL. +.\" +.TH DICODCONFIG 8 "April 5, 2009" "DEBIAN" "Debian User's Manual" +.SH NAME +dicodconfig \- write dicod database configuration section +.SH SYNOPSIS +.B dicodconfig +[\-hlovw] +[\-\-help] +[\-\-list] +[\-\-order] +[\-\-version] +[\-\-write] +.SH DESCRIPTION +.B dicodconfig +generates a complete +.B dicod +database configuration section for +available dictionary databases found in +.I /usr/share/dictd/ +(or possibly elsewhere if an optional order override file is present). +If a dictionary database contains a .suffix and/or a +.word file, appropriate index_suffix and index_word entries +are created. +.PP +Its output file +.I /var/lib/dicod/dictorg-db.list +may then be included from the +.B dicod +configuration file +.I /etc/dicod.conf +with an +``#include /var/lib/dictd/dictorg-db.list'' +line. +See +.BR info dico +for an explanation of +.B dicod +configuration. +.PP +In Debian, +.B dicodconfig +is automatically invoked upon installation or removal of +dictionary database packages, +so most users will never need to invoke it by hand. +.SS DATABASE ORDER +The default order in which database entries are written is hard coded +into +.BR dicodconfig , +but it may be overridden via the optional order override file +.IR /etc/dicod/dicod.order . +This may be desired because +.B dicod +returns definitions from dictionary databases in the order in which +they are listed in its configuration file. +The order override file may also be used to include local dictionary +databases which may not necessarily reside in +.IR /usr/share/dictd/ . +.PP +.IR /etc/dicod/dicod.order , +if present, should be a whitespace separated list of basenames and +directories. It may also include comments starting with # and +extending to the end of the line. +.PP +Dictionary database entries will be generated only for those databases +found via basename and directory entries in the default order (or the +order override file, if present), and they will be generated in the +order in which these entries appear. No more than one dictionary +database entry of any given name will be generated. +.PP +Entries without a leading / are relative to +.IR /usr/share/dictd/ . +.PP +Entries without a trailing / are basenames. +A dictionary database entry is generated if +.I .index +and +.I .dict.dz +or +.I .dict +are present. +.PP +Entries with a trailing / are directories. +A dictionary database entry is generated for each where +.I /.index +and +.I /.dict.dz +or +.I /.dict +are present. +.PP +The default order includes the directories +.I /usr/share/dictd/ +, +.I /usr/share/dico/ +as its final entry so that if a previously unknown dictionary database +(one not explicitly mentioned in the default order) +is installed, its dictionary database entry will still be generated. +An order override file should also use this technique, both for +.I /usr/share/dictd/ +, +.I /usr/share/dico/ +and for any other directory where local dictionary database might be +installed. +.PP +The \-o option may be used to make +.B dicodconfig +display the default order information along with the order override +information if +.I /etc/dicod/dicod.order +is present. +.SS DUMMY ENTRY +If no dictionary databases are found (via basename or directory +entries in the default order or the order override file), a dummy +dictionary database entry will be generated with +.I /dev/null +for both data and index. This allows dicod to start without error. +.SS DATABASE ALIASES +If an executable script named +.I /etc/dicod/dicodconfig.alias +exists, dicodconfig will filter database names through it. The script +can be bash, sed, perl, or whatever. Although +.I dico \-D +will display database names of any length, names longer than 16 +characters are displayed in a ragged format. Appropriate entries in +this alias file can be used to cause +.I dico \-D +to display the database names in a reasonable format. +.SH OPTIONS +.TP +.I \-w, \-\-write +Write database section to +.IR /var/lib/dicod/dictorg-db.list . +.TP +.I \-l, \-\-list +List database section to standard out. +.TP +.I \-o, \-\-order +Display database order information. +.TP +.I \-h, \-\-help +Display a usage message and exit. +.TP +.I \-v, \-\-version +Display version information and exit. +.SH FILES +.TP +.I /var/lib/dicod/dictorg-db.list +Output of +.BR dicodconfig . +.TP +.I /etc/dicod.conf +.B dicod +configuration file which "includes" +.IR /var/lib/dicod/dictorg-db.list . +.TP +.I /etc/dicod/dicod.order +Optional +.B dicodconfig +order override file. +.SH SEE ALSO +dicod(8) +.SH BUGS +Older dictionary database packages did not automatically invoke +.B dicodconfig +upon installation and removal, so you may need to do so +manually (after which, you should restart dicod). +.SH AUTHOR +أحمد المحمودي (Ahmed El-Mahmoudy) +Based on +dictdconfig(8) +By Kirk Hilliard . --- dico-2.0.orig/debian/dicod.links +++ dico-2.0/debian/dicod.links @@ -0,0 +1,3 @@ +usr/bin/dicodconfig usr/sbin/dictdconfig +usr/share/man/man8/dicodconfig.8.gz usr/share/man/man8/dictdconfig.8.gz +etc/init.d/dicod etc/init.d/dictd --- dico-2.0.orig/debian/dicod.8 +++ dico-2.0/debian/dicod.8 @@ -0,0 +1,115 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. +.TH DICOD "8" "April 2009" "dicod (GNU dico 2.0)" "System Administration Utilities" +.SH NAME +dicod \- a DICT daemon +.SH SYNOPSIS +.B dicod +[\fI-fEsiTth\fR] [\fI-I DIR\fR] [\fI-x LEVEL-SPEC\fR] [\fI--config=FILE\fR] [\fI--foreground\fR] +[\fI--stderr\fR] [\fI--syslog\fR] [\fI--preprocessor=PROG\fR] [\fI--no-preprocessor\fR] +[\fI--include-dir=DIR\fR] [\fI--single-process\fR] [\fI--inetd\fR] [\fI--transcript\fR] +[\fI--no-transcript\fR] [\fI--debug=LEVEL-SPEC\fR] [\fI--source-info\fR] +[\fI--trace-grammar\fR] [\fI--trace-lex\fR] [\fI--config-help\fR] [\fI--lint\fR] [\fI--help\fR] +[\fI--usage\fR] [\fI--version\fR] +.SH DESCRIPTION +\fBdicod\fP is an implementation of DICT server (RFC 2229). It is fully +modular: the daemon itself (dicod) provides only the server functionality, but +it knows nothing about database formats. Actual searches are performed by +functions supplied in loadable modules. A single module can serve one or more +databases. + +.SH OPTIONS +.TP +\fB\-\-config\fR=\fIFILE\fR +Read this configuration file. +.TP +\fB\-f\fR, \fB\-\-foreground\fR +Operate in foreground. +.TP +\fB\-\-stderr\fR +Output diagnostic to stderr. +.TP +\fB\-\-syslog\fR +Output diagnostic to syslog (default). +.TP +\fB\-E\fR +Preprocess configuration file and exit +.TP +\fB\-\-preprocessor\fR=\fIPROG\fR +Use PROG as a preprocessor for config file. +.TP +\fB\-\-no\-preprocessor\fR +Do not use external preprocessor. +.TP +\fB\-I\fR, \fB\-\-include\-dir\fR=\fIDIR\fR +Add the directory DIR to the list of directories +to be searched for preprocessor include files +.TP +\fB\-s\fR, \fB\-\-single\-process\fR +Single\-process mode. +.TP +\fB\-i\fR, \fB\-\-inetd\fR +Inetd mode. +.TP +\fB\-T\fR, \fB\-\-transcript\fR +Enable session transcript. +.TP +\fB\-\-no\-transcript\fR +Disable session transcript. +.TP +\fB\-x\fR, \fB\-\-debug\fR=\fILEVEL\-SPEC\fR +Set debug verbosity level. +.TP +\fB\-\-source\-info\fR +Include source line information in the debugging +output. +.TP +\fB\-\-trace\-grammar\fR +Trace parsing of configuration file. +.TP +\fB\-\-trace\-lex\fR +Trace config file lexer. +.TP +\fB\-\-config\-help\fR +Show configuration file summary. +.TP +\fB\-t\fR, \fB\-\-lint\fR +Check configuration file syntax and exit. +.TP +\fB\-h\fR, \fB\-\-help\fR +Give this help list +.TP +\fB\-\-usage\fR +Give a short usage message +.TP +\fB\-\-version\fR +Print program version +.PP +Mandatory or optional arguments to long options are also mandatory or optional +for any corresponding short options. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2005, 2006, 2007, 2008 Sergey Poznyakoff. +License GPLv3+: GNU GPL version 3 or later +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.SH "SEE ALSO" +.BR dico (1), +.br +The full documentation for +.B dicod +is maintained as a Texinfo manual. If the +.B info +and +.B dico-doc +programs are properly installed at your site, the command +.IP +.B info dicod +.PP +should give you access to the complete manual. +.SH AUTHOR +dico was written by Sergey Poznyakoff . +.PP +This manual page was written by أحمد المحمودي (Ahmed El-Mahmoudy) , +for the Debian project (and may be used by others). --- dico-2.0.orig/debian/dicod.preinst +++ dico-2.0/debian/dicod.preinst @@ -0,0 +1,25 @@ +#!/bin/sh +# preinst script for dicod +# +# see: dh_installdeb(1) + +set -e + +case "$1" in + install|upgrade) + adduser --quiet --system --home /var/lib/dicod --no-create-home \ + --group dicod || true + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- dico-2.0.orig/debian/dicoweb.docs +++ dico-2.0/debian/dicoweb.docs @@ -0,0 +1 @@ +dicoweb/INSTALL --- dico-2.0.orig/debian/copyright +++ dico-2.0/debian/copyright @@ -0,0 +1,56 @@ +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat +Upstream-Name: dico +Upstream-Maintainer: Sergey Poznyakoff +Upstream-Source: http://puszcza.gnu.org.ua/software/dico/ + + +Files: debian/* +Author: أحمد المحمودي (Ahmed El-Mahmoudy) +Copyright: Copyright © 2009, أحمد المحمودي (Ahmed El-Mahmoudy) +License: GPL-3+ + +Files: gnu/*, + libltdl/* +Copyright: Copyright © 1987-2009 Free Software Foundation +License: GPL-3+ + +Files: doc/*, +Copyright: Copyright © 1987-2009 Free Software Foundation +License: GFDL-1.3+ + Permission is granted to copy, distribute and/or modify this document under + the terms of the GNU Free Documentation License, Version 1.3 or any later + version published by the Free Software Foundation; with no Invariant + Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled ``GNU Free Documentation + License''. + +On Debian systems, the complete text of the GNU GFDL 1.3 licenses can be found +at `/usr/share/common-licenses/GFDL-1.3'. + +Files: dicoweb/*, + modules/python/* +Author: Wojciech Polak +Copyright: Copyright © 2008, 2009 Wojciech Polak +License: GPL-3+ + +Files: * +Author: Sergey Poznyakoff +Copyright: Copyright © 1998-2000, 2003, 2004, 2006-2009 Sergey Poznyakoff +License: GPL-3+ + +License: GPL-3+ + This program 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 3 of the License, or + (at your option) any later version. + + This program 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 this program. If not, see . + +On Debian systems, the complete text of the GNU GPL3 licenses can be found at +`/usr/share/common-licenses/GPL-3'. --- dico-2.0.orig/debian/dicodconfig +++ dico-2.0/debian/dicodconfig @@ -0,0 +1,228 @@ +#!/usr/bin/perl + +# dicodconfig -- generate dicod configuration database section +# Copyright (C) 2009 أحمد المحمودي (Ahmed El-Mahmoudy) +# Based on dictdconfig Copyright (C) 1999-2000 Kirk Hilliard +# +# This is free software, published under version 2 or (at your option) +# any later version of the GNU General Public License. You should +# have received a copy of the GNU General Public License with your +# Debian GNU/Linux system as /usr/share/common-licenses/GPL. + +my @db_order = qw( web1913 gcide wn foldoc jargon vera devil elements easton hitchcock gazetteer ); +my $db_dir = "/usr/share/dictd"; +push @db_order, "$db_dir/"; +push @db_order, "/usr/share/dico/"; +my %token; +$token{'database_exit'} = "database_exit\n"; +my $dblist_file = "/var/lib/dicod/dictorg-db.list"; +my $prog_dir = "/usr/sbin"; +my $prog_name = "dicodconfig"; +my $conf_file = "/etc/dicod.conf"; +my $order_file = "/etc/dicod/dicod.order"; +my $alias_script = "/etc/dicod/dicodconfig.alias"; +my %db_entered; +my ( $opt_write, $opt_list, $opt_order, $opt_help, $opt_version); +my %opt_matrix = ( '-w' => \$opt_write, '--write' => \$opt_write, + '-l' => \$opt_list, '--list' => \$opt_list, + '-o' => \$opt_order, '--order' => \$opt_order, + '-h' => \$opt_help, '--help' => \$opt_help, + '-v' => \$opt_version, '--version' => \$opt_version ); +my $help = <.index + and .dict.dz or .dict are present. + Entries with a trailing / are directories. + A dictionary database entry is generated for each where + /.index and /.dict.dz or + /.dict are present. + +Default Order: +EOT +my $order_file_found = <) { + chomp; + s/#.*//; + push @db_order, split; + } + if ( $opt_order ) { + for (@db_order) { print " $_\n"; } + print "\n"; + } +} else { + $output .= $order_file_not_found_comment; + if ( $opt_order) { print $order_file_not_found } +} + +for (@db_order) { + if ( $token{$_} ) { $output .= $token{$_} } + elsif ( m#/$# ) { CheckDirectory( $_ ) } + else { CheckDatabase( $_ ) } +} + +if ( ! keys %db_entered ) { + $output .= $none_found; + AddEntry( "dummy", "/dev/null", "/dev/null" ); +} + +if ( $opt_list ) { print $output } + +if ( $opt_write ) { + open DBLIST, ">$dblist_file" + or die "Can't write to file $dblist_file: $!\n"; + print DBLIST $output; + close DBLIST; +} + +exit 0; + +sub AddEntry { + my ( $name, $base_name, $indexfile, $suffixfile, $wordfile ) = @_; + $output .= "database {\n" . + " name \"$name\";\n" . + " handler \"dictorg database=$base_name\"\;\n" . + "}\n"; + ++$db_entered{ $name }; +} + +sub AliasName { + my ( $name ) = @_; + if ( -x $alias_script ) { $name = `echo $name | $alias_script` } + return $name; +} + +sub CheckDatabase { + my ( $base_name ) = @_; + my $name; + my $datafile; + my $indexfile; + my $suffixfile; + my $wordfile; + if ( $base_name =~ m#.*/(.*)# ) { $name = $1 } + else { $name = $base_name } + $name = AliasName( $name ); + $base_name = "$db_dir/$base_name" unless $base_name =~ m#^/#; + $datafile = "$base_name.dict.dz"; + $datafile =~ s/\.dz$// unless -f $datafile; + $indexfile = "$base_name.index"; + $suffixfile = "$base_name.suffix"; + $wordfile = "$base_name.word"; + $name =~ s/\n//; + if ( ! $db_entered{ $name } && -f $datafile && -f $indexfile ) { + undef $suffixfile unless -f $suffixfile; + undef $wordfile unless -f $wordfile; + AddEntry( $name, $base_name, $indexfile, $suffixfile, $wordfile ); + } +} + +sub CheckDirectory { + my ( $dir ) = @_; + $dir = "$db_dir/$dir" unless $dir =~ m#^/#; + opendir DIR, $dir; + for (readdir DIR) { + if ( /(^.*)\.index$/ ) { CheckDatabase( "$dir$1" ) } + } + closedir DIR; +} + +sub ParseCommandLine { + my $ref; + for (@_) { + if ( $ref = $opt_matrix{$_} ) { ++$$ref; } + elsif ( /^-([^-].*)/ ) { + for ( split //, $1 ) { + if ( $ref = $opt_matrix{"-$_"} ) { ++$$ref; } + else { die "$prog_name: unrecognized option `-$_'.\n" . + "Try `$0 --help' for more information.\n"; } + } + } + else { die "$prog_name: unrecognized option `$_'.\n" . + "Try `$0 --help' for more information.\n"; } + } +} --- dico-2.0.orig/debian/dicod.init +++ dico-2.0/debian/dicod.init @@ -0,0 +1,273 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: dicod +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 1 +# Short-Description: Start and stop dictionary server daemon +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/bin/dicod +NAME=dicod +DESC="dictionary server" + +PIDDIR=/var/run/$NAME +PIDFILE=$PIDDIR/$NAME.pid + +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +# Default options, these can be overriden by the information +# at /etc/default/$NAME +DAEMON_OPTS="" # Additional options given to the server + +DIETIME=10 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +#STARTTIME=2 # Time to wait for the server to start, in seconds + # If this value is set each time the server is + # started (on start or restart) the script will + # stall to try to determine if it is running + # If it is not set and the server takes time + # to setup a pid file the log message might + # be a false positive (says it did not start + # when it actually did) + +DAEMONUSER=dicod # Users to run the daemons as. If this value + # is set start-stop-daemon will chuid the server + +# Include defaults if available +if [ -f /etc/default/$NAME ] ; then + . /etc/default/$NAME +fi + +# Use this if you want the user to explicitly set 'RUN' in +# /etc/default/ +#if [ "x$RUN" != "xyes" ] ; then +# log_failure_msg "$NAME disabled, please adjust the configuration to your needs " +# log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it." +# exit 1 +#fi + +# Check that the user exists (if we set a user) +# Does the user exist? +if [ -n "$DAEMONUSER" ] ; then + if getent passwd | grep -q "^$DAEMONUSER:"; then + # Obtain the uid and gid + DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` + DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` + else + log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." + exit 1 + fi +fi + + +set -e + +running_pid() { +# Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected server + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() { +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +start_server() { +# Start the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + start_daemon -p $PIDFILE $DAEMON $DAEMON_OPTS + errcode=$? + else +# if we are using a daemonuser then change the user id + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $DAEMONUSER \ + --exec $DAEMON -- $DAEMON_OPTS + errcode=$? + fi + return $errcode +} + +stop_server() { +# Stop the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + killproc -p $PIDFILE $DAEMON + errcode=$? + else +# if we are using a daemonuser then look for process that match + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --user $DAEMONUSER \ + --exec $DAEMON + errcode=$? + fi + + return $errcode +} + +reload_server() { + [ ! -f "$PIDFILE" ] && return 1 + pid=pidofproc $PIDFILE # This is the daemon's pid + # Send a SIGHUP + kill -1 $pid + return $? +} + +force_stop() { +# Force the process to die killing it manually + [ ! -e "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + sleep "$DIETIME"s + if running ; then + kill -9 $pid + sleep "$DIETIME"s + if running ; then + echo "Cannot kill $NAME (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE +} + + +case "$1" in + start) + [ "$DICOD_DISABLED" = "1" ] && exit 0 + + mkdir -p $PIDDIR + chown $DAEMONUSER $PIDDIR + + log_daemon_msg "Starting $DESC " "$NAME" + # Check if it's running first + if running ; then + log_progress_msg "apparently already running" + log_end_msg 0 + exit 0 + fi + if start_server ; then + # NOTE: Some servers might die some time after they start, + # this code will detect this issue if STARTTIME is set + # to a reasonable value + [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time + if running ; then + # It's ok, the server started and is running + log_end_msg 0 + else + # It is not running after we did start + log_end_msg 1 + fi + else + # Either we could not start it + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + if running ; then + # Only stop the server if we see it running + errcode=0 + stop_server || errcode=$? + log_end_msg $errcode + else + # If it's not running don't do anything + log_progress_msg "apparently not running" + log_end_msg 0 + exit 0 + fi + ;; + force-stop) + # First try to stop gracefully the program + $0 stop + if running; then + # If it's still running try to kill it more forcefully + log_daemon_msg "Stopping (force) $DESC" "$NAME" + errcode=0 + force_stop || errcode=$? + log_end_msg $errcode + fi + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + errcode=0 + stop_server || errcode=$? + # Wait some sensible amount, some server need this + [ -n "$DIETIME" ] && sleep $DIETIME + start_server || errcode=$? + [ -n "$STARTTIME" ] && sleep $STARTTIME + running || errcode=$? + log_end_msg $errcode + ;; + status) + + log_daemon_msg "Checking status of $DESC" "$NAME" + if running ; then + log_progress_msg "running" + log_end_msg 0 + else + log_progress_msg "apparently not running" + log_end_msg 1 + exit 1 + fi + ;; + # Use this if the daemon cannot reload + reload) + log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" + log_warning_msg "cannot re-read the config file (use restart)." + ;; + # And this if it cann + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # log_daemon_msg "Reloading $DESC configuration files" "$NAME" + # if running ; then + # reload_server + # if ! running ; then + # Process died after we tried to reload + # log_progress_msg "died on reload" + # log_end_msg 1 + # exit 1 + # fi + # else + # log_progress_msg "server is not running" + # log_end_msg 1 + # exit 1 + # fi + #;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 --- dico-2.0.orig/debian/dico-doc.info +++ dico-2.0/debian/dico-doc.info @@ -0,0 +1 @@ +doc/dico.info --- dico-2.0.orig/debian/dicoweb.lintian-overrides +++ dico-2.0/debian/dicoweb.lintian-overrides @@ -0,0 +1,3 @@ +# This documentation contains instructions on how to configure Apache in order +# to use dicoweb +dicoweb: package-contains-upstream-install-documentation usr/share/doc/dicoweb/INSTALL --- dico-2.0.orig/debian/dico.manpages +++ dico-2.0/debian/dico.manpages @@ -0,0 +1 @@ +debian/dico.1 --- dico-2.0.orig/debian/libdico0.install +++ dico-2.0/debian/libdico0.install @@ -0,0 +1 @@ +usr/lib/lib*.so.* --- dico-2.0.orig/debian/dicodconfig.alias +++ dico-2.0/debian/dicodconfig.alias @@ -0,0 +1,16 @@ +#!/usr/bin/perl -lp + +# By default, dicodconfig uses the basename of the file in +# /usr/share/dictd as the name of the database. This file is an +# executable filter that substitutes a preferred name for a dictionary +# in /var/lib/dicod/dictorg-db.list. This name is displayed by the dico -D +# command and is used with the -d option of dico to request +# definitions from a specific dictionary instead of the default of all +# installed dictionaries. + +# The format of each line is: +# s/^//; +# Lines preceded by a hash character (#) are ignored. + +s/^freedict/fd/; +s/^gazetteer/gaz/; --- dico-2.0.orig/debian/changelog +++ dico-2.0/debian/changelog @@ -0,0 +1,54 @@ +dico (2.0-4) unstable; urgency=low + + * debian/rules: + + use dh_auto_* --sourcedirectory for the python modules + + No need to explicitly remove *.pyc files dh_auto_clean override, + dh_auto_clean does that. + * debian/control: Build-Depend on debhelper >= 7.3.5~ to support + dh_auto_* --sourcedirectory + * debian/pyversions: Set minimum python version to 2.5 (Closes: #540501) + + -- أحمد المحمودي (Ahmed El-Mahmoudy) Sat, 08 Aug 2009 17:27:15 +0300 + +dico (2.0-3) unstable; urgency=low + + * debian/control: + + Changed section of dicoweb to web + + Added le-dico-de-rene-cougnenc to dico's conflicts as they share a + couple of files (Closes: #538175) + * debian/rules: + + override dh_auto_clean target to clean up python modules' subdirs + + in dh_auto_{build|install} overrides, replace $(MAKE) ... with + dh_auto_{build|install} + + Replace long configure line with a shorter: + dh_auto_configure -- + + Add -Wl,--as-needed to LDFLAGS to avoid linking with un-necessary + libraries. + * debian/dicod.install: fix install path for dicod.conf (Closes: #538275) + + -- أحمد المحمودي (Ahmed El-Mahmoudy) Fri, 24 Jul 2009 16:03:36 +0300 + +dico (2.0-2) unstable; urgency=low + + * debian/control: + + Fix dicoweb's Depends (dicoclient-python should be python-dicoclient) + which made it un-installable. + + Added Vcs-* fields + + Bump Standards-Version to 3.8.2, no changes needed + + Build-Depend on debhelper >= 7.0.50~ to support override targets. + + Added ${misc:Depends} to Depends fields of dico-dev, dico-doc, + python-wit, python-dicoclient and dico-module-mediawiki packages. + * debian/rules: + + Simplify rules file. + + Make debian/dicodconfig* files executable during dh_auto_build before + they get installed by dh_install. + * Added debian/dico-module-mediawiki.install + * Removed debian/dicoweb.dirs + + -- أحمد المحمودي (Ahmed El-Mahmoudy) Sat, 11 Jul 2009 05:47:05 +0300 + +dico (2.0-1) unstable; urgency=low + + * Initial release (Closes: #522368). + + -- أحمد المحمودي (Ahmed El-Mahmoudy) Fri, 03 Apr 2009 06:28:25 +0200 --- dico-2.0.orig/debian/dico-dev.install +++ dico-2.0/debian/dico-dev.install @@ -0,0 +1,4 @@ +usr/include/* +usr/lib/lib*.a +usr/lib/lib*.so +usr/lib/*.la --- dico-2.0.orig/debian/compat +++ dico-2.0/debian/compat @@ -0,0 +1 @@ +7 --- dico-2.0.orig/debian/pyversions +++ dico-2.0/debian/pyversions @@ -0,0 +1 @@ +2.5- --- dico-2.0.orig/debian/dico-module-guile.install +++ dico-2.0/debian/dico-module-guile.install @@ -0,0 +1 @@ +usr/lib/dico/guile.* --- dico-2.0.orig/debian/watch +++ dico-2.0/debian/watch @@ -0,0 +1,3 @@ +version=3 + +ftp://ftp.gnu.org/gnu/dico/dico-(.*)\.tar\.gz --- dico-2.0.orig/debian/dicod.order +++ dico-2.0/debian/dicod.order @@ -0,0 +1,10 @@ +# This file defines the order in which dicodconfig lists dictionaries +# in /var/lib/dicod/dictorg-db.list. The entries "/usr/share/dictd/" and +# "/usr/share/dico/" brings in any dictionaries in that directory that aren't +# specifically listed in this file. You should enter the names of the +# dictionaries you have installed, in the order you would prefer to have them +# searched. + +web1913 gcide wn foldoc jargon vera devil elements easton hitchcock gazetteer +/usr/share/dictd/ +/usr/share/dico/ --- dico-2.0.orig/debian/dicod.postinst +++ dico-2.0/debian/dicod.postinst @@ -0,0 +1,28 @@ +#!/bin/sh +# postinst script for dicod +# +# see: dh_installdeb(1) + +set -e + +case "$1" in + configure) + chown dicod /var/lib/dicod + dicodconfig -w + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- dico-2.0.orig/debian/rules +++ dico-2.0/debian/rules @@ -0,0 +1,42 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure -- --without-included-ltdl LDFLAGS="$(LDFLAGS) -Wl,--as-needed" + +override_dh_auto_build: + dh_auto_build + + # Build python-wit: + dh_auto_build --sourcedirectory app/python/wit + + # Build dicoclient python modules: + dh_auto_build --sourcedirectory dicoweb/dicoclient + + # Make those files executable before installing them: + chmod +x debian/dicodconfig debian/dicodconfig.alias + +override_dh_auto_install: + dh_auto_install + + # Install python-wit: + dh_auto_install --sourcedirectory app/python/wit -- --root=$(CURDIR)/debian/python-wit + + # Install dicoclient python modules: + dh_auto_install --sourcedirectory dicoweb/dicoclient -- --root=$(CURDIR)/debian/python-dicoclient + + # Install dicoweb: + dh_install -pdicoweb dicoweb usr/share -Xdicoclient -XINSTALL + + dh_install -s + +override_dh_auto_clean: + dh_auto_clean + + # Clean python-wit: + dh_auto_clean --sourcedirectory app/python/wit + + # Clean dicoclient python modules: + dh_auto_clean --sourcedirectory dicoweb/dicoclient --- dico-2.0.orig/debian/dicod.manpages +++ dico-2.0/debian/dicod.manpages @@ -0,0 +1,2 @@ +debian/dicod.8 +debian/dicodconfig.8 --- dico-2.0.orig/debian/control +++ dico-2.0/debian/control @@ -0,0 +1,190 @@ +Source: dico +Section: text +Priority: optional +Maintainer: أحمد المحمودي (Ahmed El-Mahmoudy) +Build-Depends: debhelper (>= 7.3.5~), autotools-dev, guile-1.8-dev, python-dev, + libgsasl7-dev, zlib1g-dev, libltdl7-dev, python-support (>= 0.5.3), + python-all-dev (>= 2.3.5-11), m4 +Standards-Version: 3.8.2 +Homepage: http://puszcza.gnu.org.ua/software/dico/ +Vcs-Git: git://git.debian.org/git/collab-maint/dico.git +Vcs-Browser: http://git.debian.org/?p=collab-maint/dico.git + +Package: dicod +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libdico0 (= ${binary:Version}), m4 +Pre-Depends: adduser +Recommends: dico-module-dictorg +Suggests: dico-doc +Provides: dict-server +Conflicts: dictd +Replaces: dictd +Description: RFC 2229 compliant modular dictionary server + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package contains the dicod server. + +Package: dico +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libdico0 (= ${binary:Version}) +Suggests: dico-doc +Conflicts: le-dico-de-rene-cougnenc +Provides: dict-client +Description: RFC 2229 compliant dictionary client + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package contains the dico console client. + +Package: libdico0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: RFC 2229 compliant modular dictionary server (shared library) + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package contains the shared library. + +Package: dico-dev +Section: libdevel +Architecture: any +Depends: libdico0 (= ${binary:Version}), ${misc:Depends} +Suggests: dico-doc +Description: RFC 2229 compliant modular dictionary server (development files) + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package contains the header files, static libraries, and symbolic links + needed for development. + +Package: dico-doc +Section: doc +Architecture: all +Depends: ${misc:Depends} +Description: RFC 2229 compliant modular dictionary server (documentation) + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package contains the complete documentation for GNU Dico. + +Package: dico-module-outline +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, dicod +Description: RFC 2229 compliant modular dictionary server (Emacs module) + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package contains the module that handles databases in Emacs outline + format. This module is designed mostly as an example and for testing + purposes. + +Package: dico-module-dictorg +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, dicod +Suggests: dict-gcide | dictd-dictionary, dict-wn, dict-jargon, dict-foldoc +Description: RFC 2229 compliant modular dictionary server (dict.org module) + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package contains the module that handles databases in dict.org format. + +Package: dico-module-guile +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, dicod +Description: RFC 2229 compliant modular dictionary server (Guile module) + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package provides an abstract layer for interfacing with database modules + written in Guile. + +Package: dico-module-python +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, dicod +Description: RFC 2229 compliant modular dictionary server (Python module) + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package provides an abstract layer for interfacing with database modules + written in Python. + +Package: dico-module-mediawiki +Architecture: all +Depends: dico-module-python, python-wit, python-simplejson, python-xml, ${misc:Depends} +Description: RFC 2229 compliant modular dictionary server (mediawiki module) + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package contains the module that handles the use of Wiktionary or + Wikipedia as a dictionary database. + +Package: python-wit +Section: python +XB-Python-Version: ${python:Versions} +Architecture: all +Depends: ${python:Depends}, ${misc:Depends} +Provides: ${python:Provides} +Description: wikitext translation library + This package provides Wit, a Python library for converting wiki markup + into another kind of markup. Currently it supports HTML and plain text. + +Package: python-dicoclient +Section: python +XB-Python-Version: ${python:Versions} +Architecture: all +Depends: ${python:Depends}, ${misc:Depends} +Provides: ${python:Provides} +Description: RFC 2229 compliant dictionary client module and shell + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package contains a Python module that provides a Dico client and a simple + interactive shell. + +Package: dicoweb +Architecture: all +Section: web +Depends: ${misc:Depends}, python-dicoclient, python-django, python-memcache, python-wit, libapache2-mod-python | libapache2-mod-wsgi +Description: RFC 2229 compliant modular dictionary server (web interface) + GNU Dico is an implementation of the DICT protocol as defined in RFC 2229. + It is fully modular: the daemon itself (dicod) provides only the server + functionality, and knows nothing about database formats. Actual searches + are performed by functions supplied in loadable modules. A single module + can serve one or more databases. + . + This package provides a web interface for database searches. --- dico-2.0.orig/debian/dico-module-python.examples +++ dico-2.0/debian/dico-module-python.examples @@ -0,0 +1 @@ +modules/template.py --- dico-2.0.orig/debian/dico-module-guile.examples +++ dico-2.0/debian/dico-module-guile.examples @@ -0,0 +1 @@ +modules/template.scm --- dico-2.0.orig/debian/dico-module-dictorg.README.Debian +++ dico-2.0/debian/dico-module-dictorg.README.Debian @@ -0,0 +1,9 @@ +dico-module-dictorg for Debian +------------------------------ + +* dicodconfig automatically generates the database sections for dictorg + formatted dictionaries, to use this facility add this line in /etc/dicod.conf: + +#include /var/lib/dicod/dictorg-db.list + + -- أحمد المحمودي (Ahmed El-Mahmoudy) Fri, 03 Apr 2009 06:28:25 +0200 --- dico-2.0.orig/debian/dico.1 +++ dico-2.0/debian/dico.1 @@ -0,0 +1,136 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. +.TH DICO "1" "April 2009" "dico (GNU dico 2.0)" "User Commands" +.SH NAME +dico \- a DICT client +.SH SYNOPSIS +.B dico +[\fI-mDSHIqatvh\fR] [\fI-p SERVICE\fR] [\fI-d NAME\fR] [\fI-s NAME\fR] [\fI-i DBNAME\fR] +[\fI-u NAME\fR] [\fI-k STRING\fR] [\fI-c STRING\fR] [\fI--host=SERVER\fR] +[\fI--port=SERVICE\fR] [\fI--database=NAME\fR] [\fI--source=ADDR\fR] [\fI--match\fR] +[\fI--strategy=NAME\fR] [\fI--levdist, \fB--levenshtein-distance\fR=\fIN\fR]fR [\fI--dbs\fR] +[\fI--strategies\fR] [\fI--serverhelp\fR] [\fI--info=DBNAME\fR] [\fI--serverinfo\fR] +[\fI--quiet\fR] [\fI--noauth\fR] [\fI--sasl\fR] [\fI--nosasl\fR] [\fI--user=NAME\fR] +[\fI--key, \fB--passwordfR=\fISTRING\fR]fR [\fI--autologin=NAME\fR] [\fI--client=STRING\fR] +[\fI--transcript\fR] [\fI--verbose\fR] [\fI--time-stamp\fR] [\fI--source-info\fR] +[\fI--help\fR] [\fI--usage\fR] [\fI--version\fR] +.SH DESCRIPTION +\fBdico\fP is an RFC 2229 compliant dictionary client. + +.SH OPTIONS +.SS Server selection +.TP +\fB\-\-host\fR=\fISERVER\fR +Connect to this server. +.TP +\fB\-p\fR, \fB\-\-port\fR=\fISERVICE\fR +Specify port to connect to. +.TP +\fB\-d\fR, \fB\-\-database\fR=\fINAME\fR +Select a database to search. +.TP +\fB\-\-source\fR=\fIADDR\fR +Set a source address for TCP connections. +.SS Operation modes +.TP +\fB\-m\fR, \fB\-\-match\fR +Match instead of define. +.TP +\fB\-s\fR, \fB\-\-strategy\fR=\fINAME\fR +Select a strategy for matching. Implies \fB\-\-match\fR. +.TP +\fB\-\-levdist\fR, \fB\-\-levenshtein\-distance\fR=\fIN\fR +Set maximum Levenshtein distance to N. +.TP +\fB\-D\fR, \fB\-\-dbs\fR +Show available databases. +.TP +\fB\-S\fR, \fB\-\-strategies\fR +Show available search strategies. +.TP +\fB\-H\fR, \fB\-\-serverhelp\fR +show server help. +.TP +\fB\-i\fR, \fB\-\-info\fR=\fIDBNAME\fR +Show information about database DBNAME. +.TP +\fB\-I\fR, \fB\-\-serverinfo\fR +Show information about the server. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Do not print the normal dico welcome. +.SS Authentication +.TP +\fB\-a\fR, \fB\-\-noauth\fR +Disable authentication. +.TP +\fB\-\-sasl\fR +Enable SASL authentication (default). +.TP +\fB\-\-nosasl\fR +Disable SASL authentication. +.TP +\fB\-u\fR, \fB\-\-user\fR=\fINAME\fR +Set user name for authentication. +.TP +\fB\-k\fR, \fB\-\-key\fR, \fB\-\-password\fR=\fISTRING\fR +Set shared secret for authentication. +.TP +\fB\-\-autologin\fR=\fINAME\fR +Set the name of autologin file to use. +.TP +\fB\-c\fR, \fB\-\-client\fR=\fISTRING\fR +Additional text for client command. +.SS Debugging +.TP +\fB\-t\fR, \fB\-\-transcript\fR +Enable session transcript. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Increase debugging verbosity level. +.TP +\fB\-\-time\-stamp\fR +Include time stamp in the debugging output. +.TP +\fB\-\-source\-info\fR +Include source line information in the debugging +output. +.SS Other options +.TP +\fB\-h\fR, \fB\-\-help\fR +Give this help list +.TP +\fB\-\-usage\fR +Give a short usage message +.TP +\fB\-\-version\fR +Print program version +.PP +Mandatory or optional arguments to long options are also mandatory or optional +for any corresponding short options. +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright \(co 2005, 2006, 2007, 2008 Sergey Poznyakoff +License GPLv3+: GNU GPL version 3 or later +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.SH "SEE ALSO" +.BR dicod (8), +.br +The full documentation for +.B dico +is maintained as a Texinfo manual. If the +.B info +and +.B dico-doc +programs are properly installed at your site, the command +.IP +.B info dico +.PP +should give you access to the complete manual. +.SH AUTHOR +dico was written by Sergey Poznyakoff . +.PP +This manual page was written by أحمد المحمودي (Ahmed El-Mahmoudy) , +for the Debian project (and may be used by others). --- dico-2.0.orig/debian/libdico0.symbols +++ dico-2.0/debian/libdico0.symbols @@ -0,0 +1,176 @@ +libdico.so.0 libdico0 #MINVER# + _dico_assoc_find_n@Base 2.0 + _dico_libi18n_init@Base 2.0 + _dico_list_insert_sorted@Base 2.0 + _dico_list_locate@Base 2.0 + _dico_list_remove@Base 2.0 + _dico_stderr_log_printer@Base 2.0 + _mapfile_destroy@Base 2.0 + _mapfile_open@Base 2.0 + b64_table@Base 2.0 + dico_argcv_free@Base 2.0 + dico_argcv_get@Base 2.0 + dico_argcv_get_n@Base 2.0 + dico_argcv_get_np@Base 2.0 + dico_argcv_quote_char@Base 2.0 + dico_argcv_quote_copy@Base 2.0 + dico_argcv_quoted_length@Base 2.0 + dico_argcv_quoting_style@Base 2.0 + dico_argcv_remove@Base 2.0 + dico_argcv_string@Base 2.0 + dico_argcv_unquote_char@Base 2.0 + dico_argcv_unquote_copy@Base 2.0 + dico_argv_free@Base 2.0 + dico_assoc_add@Base 2.0 + dico_assoc_append@Base 2.0 + dico_assoc_clear@Base 2.0 + dico_assoc_create@Base 2.0 + dico_assoc_destroy@Base 2.0 + dico_assoc_dup@Base 2.0 + dico_assoc_find@Base 2.0 + dico_assoc_find_n@Base 2.0 + dico_assoc_iterator@Base 2.0 + dico_assoc_remove@Base 2.0 + dico_assoc_remove_n@Base 2.0 + dico_base64_decode@Base 2.0 + dico_base64_encode@Base 2.0 + dico_base64_input@Base 2.0 + dico_base64_stream_create@Base 2.0 + dico_codec_stream_create@Base 2.0 + dico_dbg_stream_create@Base 2.0 + dico_die@Base 2.0 + dico_fd_io_stream_create@Base 2.0 + dico_fd_stream_create@Base 2.0 + dico_full_file_name@Base 2.0 + dico_get_default_strategy@Base 2.0 + dico_header_parse@Base 2.0 + dico_invocation_name@Base 2.0 + dico_io_stream@Base 2.0 + dico_iterator_current@Base 2.0 + dico_iterator_destroy@Base 2.0 + dico_iterator_first@Base 2.0 + dico_iterator_next@Base 2.0 + dico_iterator_remove_current@Base 2.0 + dico_iterator_set_data@Base 2.0 + dico_levenshtein_distance@Base 2.0 + dico_list_append@Base 2.0 + dico_list_clear@Base 2.0 + dico_list_count@Base 2.0 + dico_list_create@Base 2.0 + dico_list_destroy@Base 2.0 + dico_list_free_item@Base 2.0 + dico_list_get_comparator@Base 2.0 + dico_list_insert_sorted@Base 2.0 + dico_list_intersect@Base 2.0 + dico_list_intersect_p@Base 2.0 + dico_list_item@Base 2.0 + dico_list_iterate@Base 2.0 + dico_list_iterator@Base 2.0 + dico_list_locate@Base 2.0 + dico_list_pop@Base 2.0 + dico_list_prepend@Base 2.0 + dico_list_remove@Base 2.0 + dico_list_set_comparator@Base 2.0 + dico_list_set_free_item@Base 2.0 + dico_log@Base 2.0 + dico_log_stream_create@Base 2.0 + dico_mapfile_stream_create@Base 2.0 + dico_markup_list@Base 2.0 + dico_markup_lookup@Base 2.0 + dico_markup_register@Base 2.0 + dico_markup_type@Base 2.0 + dico_markup_valid_name_p@Base 2.0 + dico_parseopt@Base 2.0 + dico_program_name@Base 2.0 + dico_qp_decode@Base 2.0 + dico_qp_encode@Base 2.0 + dico_qp_stream_create@Base 2.0 + dico_set_default_strategy@Base 2.0 + dico_set_log_printer@Base 2.0 + dico_set_program_name@Base 2.0 + dico_soundex@Base 2.0 + dico_str_to_diag_level@Base 2.0 + dico_strat_free@Base 2.0 + dico_strat_name_cmp@Base 2.0 + dico_strategy_add@Base 2.0 + dico_strategy_count@Base 2.0 + dico_strategy_create@Base 2.0 + dico_strategy_dup@Base 2.0 + dico_strategy_find@Base 2.0 + dico_strategy_iterate@Base 2.0 + dico_strategy_iterator@Base 2.0 + dico_stream_bytes_in@Base 2.0 + dico_stream_bytes_out@Base 2.0 + dico_stream_clearerr@Base 2.0 + dico_stream_close@Base 2.0 + dico_stream_create@Base 2.0 + dico_stream_destroy@Base 2.0 + dico_stream_eof@Base 2.0 + dico_stream_flush@Base 2.0 + dico_stream_getdelim@Base 2.0 + dico_stream_getline@Base 2.0 + dico_stream_ioctl@Base 2.0 + dico_stream_last_error@Base 2.0 + dico_stream_open@Base 2.0 + dico_stream_read@Base 2.0 + dico_stream_read_unbuffered@Base 2.0 + dico_stream_readln@Base 2.0 + dico_stream_seek@Base 2.0 + dico_stream_set_buffer@Base 2.0 + dico_stream_set_close@Base 2.0 + dico_stream_set_destroy@Base 2.0 + dico_stream_set_error_string@Base 2.0 + dico_stream_set_flush@Base 2.0 + dico_stream_set_ioctl@Base 2.0 + dico_stream_set_open@Base 2.0 + dico_stream_set_read@Base 2.0 + dico_stream_set_seek@Base 2.0 + dico_stream_set_size@Base 2.0 + dico_stream_set_write@Base 2.0 + dico_stream_size@Base 2.0 + dico_stream_strerror@Base 2.0 + dico_stream_write@Base 2.0 + dico_stream_write_unbuffered@Base 2.0 + dico_stream_writeln@Base 2.0 + dico_string_trim@Base 2.0 + dico_trim_nl@Base 2.0 + dico_trim_ws@Base 2.0 + dico_url_destroy@Base 2.0 + dico_url_full_path@Base 2.0 + dico_url_get_arg@Base 2.0 + dico_url_parse@Base 2.0 + dico_vlog@Base 2.0 + fd_destroy@Base 2.0 + fd_seek@Base 2.0 + fd_size@Base 2.0 + filter_stream_create@Base 2.0 + find_value@Base 2.0 + uni_plane@Base 2.0 + urf8_symcasecmp@Base 2.0 + utf8_char_width@Base 2.0 + utf8_iter_end_p@Base 2.0 + utf8_iter_first@Base 2.0 + utf8_iter_next@Base 2.0 + utf8_mbstr_to_norm_wc@Base 2.0 + utf8_mbstr_to_wc@Base 2.0 + utf8_mbtowc@Base 2.0 + utf8_mbtowc_internal@Base 2.0 + utf8_quote@Base 2.0 + utf8_strcasecmp@Base 2.0 + utf8_strlen@Base 2.0 + utf8_strncasecmp@Base 2.0 + utf8_symcmp@Base 2.0 + utf8_tolower@Base 2.0 + utf8_toupper@Base 2.0 + utf8_wc_hash_string@Base 2.0 + utf8_wc_quote@Base 2.0 + utf8_wc_strcasecmp@Base 2.0 + utf8_wc_strcmp@Base 2.0 + utf8_wc_strdup@Base 2.0 + utf8_wc_strlen@Base 2.0 + utf8_wc_to_mbstr@Base 2.0 + utf8_wc_tolower@Base 2.0 + utf8_wc_toupper@Base 2.0 + utf8_wctomb@Base 2.0 + xlat_c_string@Base 2.0 + xlat_string@Base 2.0 --- dico-2.0.orig/debian/dico-module-dictorg.install +++ dico-2.0/debian/dico-module-dictorg.install @@ -0,0 +1 @@ +usr/lib/dico/dictorg.* --- dico-2.0.orig/debian/dicod.dirs +++ dico-2.0/debian/dicod.dirs @@ -0,0 +1 @@ +/var/lib/dicod --- dico-2.0.orig/debian/dico-module-mediawiki.install +++ dico-2.0/debian/dico-module-mediawiki.install @@ -0,0 +1 @@ +app/python/mediawiki.py usr/share/dico/python/ --- dico-2.0.orig/debian/dico-module-python.install +++ dico-2.0/debian/dico-module-python.install @@ -0,0 +1 @@ +usr/lib/dico/python.* --- dico-2.0.orig/debian/dico-module-outline.install +++ dico-2.0/debian/dico-module-outline.install @@ -0,0 +1 @@ +usr/lib/dico/outline.* --- dico-2.0.orig/debian/dicod.install +++ dico-2.0/debian/dicod.install @@ -0,0 +1,6 @@ +debian/dicodconfig usr/bin/ +debian/dicod.conf etc/ +debian/dicod.order etc/dicod/ +debian/dicodconfig.alias etc/dicod/ +usr/bin/dicod +usr/share/dico --- dico-2.0.orig/debian/dicod.conf +++ dico-2.0/debian/dicod.conf @@ -0,0 +1,132 @@ + +capability (mime,xversion); +timing yes; + +pidfile /var/run/dicod/dicod.pid; + +module-load-path ("/usr/lib/dico"); + +// Uncomment the following to enable handling of databases in dict.org format: +/* load-module dictorg { + command "dictorg sort trim-ws dbdir=/usr/share/dictd"; +} + +#include /var/lib/dicod/dictorg-db.list +*/ + +// Uncomment the following to enable handling of databases in Emacs outline +// format: +/* load-module outline { + command "outline"; +} +*/ + +// Uncomment the following to enable Guile interface: +/* load-module guile { + command "guile"; +} +*/ + +// Uncomment the following to enable Guile interface: +/* load-module python { + command "python"; +} +*/ + +// Emacs outline database example: +/* database { + name "devdict"; + handler "outline /usr/share/dico/outline/devils.out"; +} +*/ + +#database { +# name "plnum"; +# handler "guile" +# " init-script=/tmp/dico-2.0/tests/example.scm " +# " init-fun=example-init" +# " example.db"; +#} + +#m4_define(`wikipedia',` +#database { +# name "$1-`wikipedia'"; +# handler "python load-path=/usr/share/dico/python init-script=mediawiki $1.`wikipedia'.org"; +# mime-headers <<- EOT +# Content-Type: text/x-wiki +# Content-Transfer-Encoding: quoted-printable +# X-Wiki-Language: $1 +# EOT; +#m4_ifelse(`$2',,,` +# description "`$2'";') +#m4_ifelse(`$3',,,` +# info <<- EOT +#`$3' +#EOT;') +#}') + +#m4_define(`wiktionary',` +#database { +# name "$1-`wiktionary'"; +# handler "python load-path=/usr/share/dico/python init-script=mediawiki $1.`wiktionary'.org"; +# mime-headers <<- EOT +# Content-Type: text/x-wiki +# Content-Transfer-Encoding: quoted-printable +# X-Wiki-Language: $1 +# EOT; +#m4_ifelse(`$2',,,` +# description "`$2'";') +#m4_ifelse(`$3',,,` +# info <<- EOT +#`$3' +#EOT;') +#}') + +/* wikipedia(`en', + `en.wikipedia.org') */ + +/* wiktionary(en, + `en.wiktionary.org', + `English language Wiktionary, a collaborative project to produce a + free-content multilingual dictionary.') */ + +alias d DEFINE; +alias da d "*"; +alias df d "!"; +alias m MATCH; +alias mas m "*"; +alias mfs m "!"; +alias ma mas "."; +alias mf mfs "."; +alias s STATUS; +alias h HELP; +alias q QUIT; + +help-text <<- EOT + + + The following commands are abbreviations that Gray likes to use when + debugging the daemon. You may or may not find them useful. However + it is, do not write your client software to relay on them. They may + disappear or change any time Gray pleases, without notice. + + d database word -- DEFINE database word + da word -- DEFINE * word + df word -- DEFINE ! word + ma word -- MATCH * . word + mf word -- MATCH ! . word + mas strategy word -- MATCH * strategy word + mfs strategy word -- MATCH ! strategy word + m database strategy word -- MATCH database strategy word + s -- STATUS + h -- HELP + q -- QUIT +EOT; + +user dicod; +max-children 18; +#inactivity-timeout 5; + +server-info < +Abstract: This manual describes the dicod server, the dico client and the + configuration files syntax. +Section: Text + +Format: Info +Index: /usr/share/info/dico.info.gz +Files: /usr/share/info/dico.info.gz + --- dico-2.0.orig/debian/dicod.lintian-overrides +++ dico-2.0/debian/dicod.lintian-overrides @@ -0,0 +1,4 @@ +# /etc/init.d/dictd is just a symlink to /etc/init.d/dicod init script, and +# that is to make the dict-* database packages work with dicod, so I don't want +# to register /etc/init.d/dictd +dicod: script-in-etc-init.d-not-registered-via-update-rc.d /etc/init.d/dictd