From e3b5d99978daf6cc5f5d2eadb43e719e37ef7731 Mon Sep 17 00:00:00 2001 From: "Philip M. Gollucci" Date: Thu, 23 Sep 2010 02:36:19 +0000 Subject: Dico 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. The package includes the following database modules: dictorg, guile, python, and outline. WWW: http://www.gnu.org/software/dico/ PR: ports/142504 Submitted by: Goran Tal --- net/Makefile | 1 + net/gnu-dico/Makefile | 80 +++++++++++++++++++++++++++++++++++++++ net/gnu-dico/distinfo | 3 ++ net/gnu-dico/files/dicod.conf | 49 ++++++++++++++++++++++++ net/gnu-dico/files/dicod.sh.in | 20 ++++++++++ net/gnu-dico/files/pkg-message.in | 16 ++++++++ net/gnu-dico/pkg-descr | 8 ++++ net/gnu-dico/pkg-plist | 43 +++++++++++++++++++++ 8 files changed, 220 insertions(+) create mode 100644 net/gnu-dico/Makefile create mode 100644 net/gnu-dico/distinfo create mode 100644 net/gnu-dico/files/dicod.conf create mode 100644 net/gnu-dico/files/dicod.sh.in create mode 100644 net/gnu-dico/files/pkg-message.in create mode 100644 net/gnu-dico/pkg-descr create mode 100644 net/gnu-dico/pkg-plist (limited to 'net') diff --git a/net/Makefile b/net/Makefile index 6f1820684824..c56a33529946 100644 --- a/net/Makefile +++ b/net/Makefile @@ -194,6 +194,7 @@ SUBDIR += gnome-nettool SUBDIR += gnome-vnc SUBDIR += gnosamba + SUBDIR += gnu-dico SUBDIR += gnu-radius SUBDIR += gofish SUBDIR += googlecl diff --git a/net/gnu-dico/Makefile b/net/gnu-dico/Makefile new file mode 100644 index 000000000000..c3e2eef661c1 --- /dev/null +++ b/net/gnu-dico/Makefile @@ -0,0 +1,80 @@ +# New ports collection makefile for: gnu dico +# Date created: 27-12-2009 +# Whom: Goran Tal +# +# $FreeBSD$ +# + +PORTNAME= dico +PORTVERSION= 2.0 +CATEGORIES= net textproc +MASTER_SITES= ${MASTER_SITE_GNU} +MASTER_SITE_SUBDIR= ${PORTNAME} +PKGNAMEPREFIX= gnu- + +MAINTAINER= goran.tal@gmail.com +COMMENT= Flexible modular implementation of DICT server + +USE_LDCONFIG= yes +USE_GMAKE= yes +USE_AUTOTOOLS= libltdl:22 libtool:22 + +GNU_CONFIGURE= yes +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" +CONFIGURE_ARGS= --localstatedir=/var + +OPTIONS= PYTHON "With PYTHON support" on \ + GUILE "With GUILE support" on \ + GSASL "With GSASL support" off + +.include + +.if defined(WITH_PYTHON) +USE_PYTHON= yes +PLIST_SUB+= PYTHON="" +.else +CONFIGURE_ARGS+=--without-python +PLIST_SUB+= PYTHON="@comment " +.endif + +.if defined(WITH_GUILE) +LIB_DEPENDS+= guile.20:${PORTSDIR}/lang/guile +PLIST_SUB+= GUILE="" +.else +CONFIGURE_ARGS+=--without-guile +PLIST_SUB+= GUILE="@comment " +.endif + +.if defined(WITH_GSASL) +LIB_DEPENDS+= gsasl.13:${PORTSDIR}/security/gsasl +CONFIGURE_ARGS+=--with-gsasl +.else +CONFIGURE_ARGS+=--without-gsasl +.endif + +.if !defined(WITHOUT_NLS) +USE_GETTEXT= yes +PLIST_SUB+= NLS="" +.else +CONFIGURE_ARGS+=--disable-nls +PLIST_SUB+= NLS="@comment " +.endif + +INFO= dico + +PLIST_SUB+= PORTVERSION=${PORTVERSION} +SUB_FILES+= pkg-message +USE_RC_SUBR= dicod.sh + +post-patch: + @${REINPLACE_CMD} 's/ENODATA/EIO/' ${WRKSRC}/lib/utf8.c + @${REINPLACE_CMD} 's/@bindir@/@sbindir@/' ${WRKSRC}/dicod/Makefile.in + @${REINPLACE_CMD} 's/(bindir)\//(bindir)\/g/' ${WRKSRC}/dico/Makefile.in + @${REINPLACE_CMD} '/INSTALL.*charset/d' ${WRKSRC}/gnu/Makefile.in + +post-install: + @${INSTALL_DATA} ${FILESDIR}/dicod.conf ${PREFIX}/etc/dicod.conf.sample + @${CAT} ${PKGMESSAGE} + +.include diff --git a/net/gnu-dico/distinfo b/net/gnu-dico/distinfo new file mode 100644 index 000000000000..0b04f43dd3c6 --- /dev/null +++ b/net/gnu-dico/distinfo @@ -0,0 +1,3 @@ +MD5 (dico-2.0.tar.gz) = 0dffe580c6fb687568be87e0ca117a08 +SHA256 (dico-2.0.tar.gz) = 7b26a51ce26502cf60963e28528640ebb6bb7d3d52fa5d13ec65eb254d78970d +SIZE (dico-2.0.tar.gz) = 1717078 diff --git a/net/gnu-dico/files/dicod.conf b/net/gnu-dico/files/dicod.conf new file mode 100644 index 000000000000..ffa2962941af --- /dev/null +++ b/net/gnu-dico/files/dicod.conf @@ -0,0 +1,49 @@ +/* A sample configuration for GNU dicod */ + +capability (mime,xversion); +timing yes; +access-log-file "/var/log/dictd-access_log"; +access-log-format "%h %l %u %t \"%r\" %>s %b \"\" \"%C\""; + +load-module dict { + command "dictorg dbdir=/usr/local/share/dict"; +} + +load-module guile { + command "guile debug"; +} + +load-module python { + command "python"; +} + +database { + name "devdict"; + handler "dict database=devils"; +} + +database { + name "plnum"; + handler "guile" + " init-script=/usr/local/share/dict/example.scm" + " init-fun=example-init" + " example.db"; +} + +database { + name "cznum"; + handler "python " + "load-path=/usr/local/share/dict " + "init-script=example " + "/usr/local/share/dict/example.text"; +} + +listen (localhost:dict, "/var/tmp/dict.sock"); +max-children 10; +inactivity-timeout 5; + +log-tag "Dico dictd"; + +server-info <