diff options
author | Michael Conrad Tilstra <tadpol@gentoo.org> | 2001-06-04 00:39:52 +0000 |
---|---|---|
committer | Michael Conrad Tilstra <tadpol@gentoo.org> | 2001-06-04 00:39:52 +0000 |
commit | e9c92fa6f94179d962efc66ffc85de808ddc4cf5 (patch) | |
tree | 83f4604b5580bafb71745091282b96fbb7475f6e /app-text/dictd | |
parent | dependencie fixes and updates (diff) | |
download | historical-e9c92fa6f94179d962efc66ffc85de808ddc4cf5.tar.gz historical-e9c92fa6f94179d962efc66ffc85de808ddc4cf5.tar.bz2 historical-e9c92fa6f94179d962efc66ffc85de808ddc4cf5.zip |
- I was putting the man pages in the wrong place. Fixed.
- Now have the initrc script for dictd scanning for dictionaries. I'll go
through and clean up the dictionary ebuilds later, but the idea here is
to be more friendly to ppl that tweek thier conf files.
Diffstat (limited to 'app-text/dictd')
-rw-r--r-- | app-text/dictd/dictd-1.5.5-r1.ebuild | 60 | ||||
-rw-r--r-- | app-text/dictd/dictd-1.5.5.ebuild | 12 | ||||
-rw-r--r-- | app-text/dictd/files/1.5.5-r1/dict.conf (renamed from app-text/dictd/files/dict.conf) | 0 | ||||
-rwxr-xr-x | app-text/dictd/files/1.5.5-r1/dictd-run (renamed from app-text/dictd/files/dictd-run) | 0 | ||||
-rw-r--r-- | app-text/dictd/files/1.5.5-r1/dictd.conf | 22 | ||||
-rw-r--r-- | app-text/dictd/files/1.5.5-r1/site.info (renamed from app-text/dictd/files/site.info) | 0 | ||||
-rwxr-xr-x | app-text/dictd/files/1.5.5-r1/svc-dictd | 81 | ||||
-rw-r--r-- | app-text/dictd/files/1.5.5/dict.conf | 6 | ||||
-rwxr-xr-x | app-text/dictd/files/1.5.5/dictd-run | 3 | ||||
-rw-r--r-- | app-text/dictd/files/1.5.5/dictd.conf (renamed from app-text/dictd/files/dictd.conf) | 0 | ||||
-rw-r--r-- | app-text/dictd/files/1.5.5/site.info | 6 | ||||
-rwxr-xr-x | app-text/dictd/files/1.5.5/svc-dictd (renamed from app-text/dictd/files/svc-dictd) | 0 | ||||
-rw-r--r-- | app-text/dictd/files/digest-dictd-1.5.5-r1 | 1 |
13 files changed, 185 insertions, 6 deletions
diff --git a/app-text/dictd/dictd-1.5.5-r1.ebuild b/app-text/dictd/dictd-1.5.5-r1.ebuild new file mode 100644 index 000000000000..f62462ff51cf --- /dev/null +++ b/app-text/dictd/dictd-1.5.5-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2001 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Michael Conrad Tilstra <michael@gentoo.org> <tadpol@tadpol.org> +# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/dictd-1.5.5-r1.ebuild,v 1.1 2001/06/04 00:39:52 michael Exp $ + +#P= +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="Dictionary Client/Server for the DICT protocol" +SRC_URI="ftp://ftp.dict.org/pub/dict/${A}" +HOMEPAGE="http://www.dict.org" + +DEPEND="virtual/glibc" + + +src_compile() { + + try ./configure --prefix=/usr --mandir=/usr/share/man \ + --with-etcdir=/etc/dict --host=${CHOST} + try make +} + +src_install () { + # gotta set up the dirs for it.... + dodir /usr/bin + dodir /usr/sbin + dodir /usr/share/man/man1 + dodir /usr/share/man/man8 + + #Now install it. + try make prefix=${D}/usr man1_prefix=${D}/usr/share/man/man1 \ + man8_prefix=${D}/usr/share/man/man8 conf=${D}/etc/dict install + + #Install docs + dodoc README TODO COPYING ChangeLog ANNOUNCE + dodoc doc/dicf.ms doc/rfc.ms doc/rfc.sh doc/rfc2229.txt + dodoc doc/security.doc doc/toc.ms + + #conf files. + dodir /etc/dict + insinto /etc/dict + doins ${FILESDIR}/${PVR}/dict.conf + doins ${FILESDIR}/${PVR}/dictd.conf + doins ${FILESDIR}/${PVR}/site.info + + #startups for dictd + exeinto /etc/rc.d/init.d + newexe ${FILESDIR}/${PVR}/svc-dictd svc-dictd + exeinto /var/lib/supervise/services/dictd + newexe ${FILESDIR}/${PVR}/dictd-run run +} + +pkg_postinst() { + # gotta start it at boot. + . ${ROOT}/etc/rc.d/config/functions + einfo ">>> Generating symlinks" + ${ROOT}/usr/sbin/rc-update add svc-dictd +} + +# vim: ai et sw=4 ts=4 diff --git a/app-text/dictd/dictd-1.5.5.ebuild b/app-text/dictd/dictd-1.5.5.ebuild index c5fd1606df7a..108de91b44fc 100644 --- a/app-text/dictd/dictd-1.5.5.ebuild +++ b/app-text/dictd/dictd-1.5.5.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2001 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Michael Conrad Tilstra <michael@gentoo.org> <tadpol@tadpol.org> -# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/dictd-1.5.5.ebuild,v 1.3 2001/05/28 05:24:13 achim Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/dictd-1.5.5.ebuild,v 1.4 2001/06/04 00:39:52 michael Exp $ #P= A=${P}.tar.gz @@ -39,15 +39,15 @@ src_install () { #conf files. dodir /etc/dict insinto /etc/dict - doins ${FILESDIR}/dict.conf - doins ${FILESDIR}/dictd.conf - doins ${FILESDIR}/site.info + doins ${FILESDIR}/${PVR}/dict.conf + doins ${FILESDIR}/${PVR}/dictd.conf + doins ${FILESDIR}/${PVR}/site.info #startups for dictd exeinto /etc/rc.d/init.d - newexe ${FILESDIR}/svc-dictd svc-dictd + newexe ${FILESDIR}/${PVR}/svc-dictd svc-dictd exeinto /var/lib/supervise/services/dictd - newexe ${FILESDIR}/dictd-run run + newexe ${FILESDIR}/${PVR}/dictd-run run } pkg_postinst() { diff --git a/app-text/dictd/files/dict.conf b/app-text/dictd/files/1.5.5-r1/dict.conf index e06c3d296ec3..e06c3d296ec3 100644 --- a/app-text/dictd/files/dict.conf +++ b/app-text/dictd/files/1.5.5-r1/dict.conf diff --git a/app-text/dictd/files/dictd-run b/app-text/dictd/files/1.5.5-r1/dictd-run index 949d9712994c..949d9712994c 100755 --- a/app-text/dictd/files/dictd-run +++ b/app-text/dictd/files/1.5.5-r1/dictd-run diff --git a/app-text/dictd/files/1.5.5-r1/dictd.conf b/app-text/dictd/files/1.5.5-r1/dictd.conf new file mode 100644 index 000000000000..4cded974f973 --- /dev/null +++ b/app-text/dictd/files/1.5.5-r1/dictd.conf @@ -0,0 +1,22 @@ +# dictd configuration file. +# whipped up by michael conrad tilstra <michael@gentoo.org> + +# Informational message +site site.info + +# who's allowed. You might want to change this. +access { + allow * +} + +# Dictionaries are listed below. +# The initrc script scans /usr/lib/dict and adds all of the dictionaries +# it finds here. +# +# The initrc script will delete everything after the the last line and +# replace it with what it finds. So add all of your things above. +# +# If this is a problem for people, contact me and +# we can work out a different method. +# +#LASTLINE diff --git a/app-text/dictd/files/site.info b/app-text/dictd/files/1.5.5-r1/site.info index 23bfdeb61102..23bfdeb61102 100644 --- a/app-text/dictd/files/site.info +++ b/app-text/dictd/files/1.5.5-r1/site.info diff --git a/app-text/dictd/files/1.5.5-r1/svc-dictd b/app-text/dictd/files/1.5.5-r1/svc-dictd new file mode 100755 index 000000000000..731e738de49f --- /dev/null +++ b/app-text/dictd/files/1.5.5-r1/svc-dictd @@ -0,0 +1,81 @@ +#!/bin/sh +#RCUPDATE:3 4:75:This line is required for script management + +. /etc/rc.d/config/functions + +SERVICE=dictd +opts="start stop" + + +DICTDCONF=/etc/dict/dictd.conf +TMPCONF=/etc/dict/dictd.conf.$$ +prepconfig() { + if [ ! -e ${DICTDCONF} ] + then + eerror "dictd not started. Config file not found." + exit 1 + fi + # if no dictionaries, skip startup. + +# The new way of doing this is to scan /usr/lib/dict and tweek the conf + DLIBDIR=/usr/lib/dict + + einfo "Scanning for dictionaries..." + if [ ! -d "${DLIBDIR}" ]; then + eerror "${DLIBDIR} doesn't exist, no dictionaries found." + exit 1 + fi + pushd ${DLIBDIR} >/dev/null + INDEXFILES=`ls *.index` + if [ -z "$INDEXFILES" ]; then + eerror "No dictionaries installed." + exit 1 + fi + + cat $DICTDCONF | sed -e '/^#LASTLINE/,$d' > $TMPCONF + echo "#LASTLINE" >> $TMPCONF + + CNT=0 + for i in $INDEXFILES + do + DNAME=`echo $i | awk -F . '{print $1;}'` + #two possible names for a matching dictionary, check which is there. + if [ -f ${DNAME}.dict.dz ]; then + DICT=${DNAME}.dict.dz + elif [ -f ${DNAME}.dict ];then + DICT=${DNAME}.dict + else + einfo "Index $i has no matching dictionaray..." + fi + + #ok, go an index, and a dixtionary, append. + echo "database $DNAME { \"${DLIBDIR}/${DICT}\"" >> $TMPCONF + echo " index \"${DLIBDIR}/$i\" }" >> $TMPCONF + + CNT=`expr $CNT + 1` + done + popd >/dev/null + mv ${TMPCONF} ${DICTDCONF} + einfo "Done, $CNT dictionary indexes found." +} + +start() { + ebegin "Starting supervised ${SERVICE}" + prepconfig + ln -sf ../services/${SERVICE} ${SVCDIR}/control/${SERVICE} + eend $? +} + +stop() { + ebegin "Stopping supervised ${SERVICE}" + if [ -e ${SVCDIR}/control/${SERVICE} ] + then + /usr/bin/svc -dx ${SVCDIR}/control/${SERVICE} + rm ${SVCDIR}/control/${SERVICE} + fi + eend $? +} + +doservice ${@} + +#vim:sw=4:ts=4:ai diff --git a/app-text/dictd/files/1.5.5/dict.conf b/app-text/dictd/files/1.5.5/dict.conf new file mode 100644 index 000000000000..e06c3d296ec3 --- /dev/null +++ b/app-text/dictd/files/1.5.5/dict.conf @@ -0,0 +1,6 @@ +# This is the configuration file for dict. +# Usually all you will ever need here is the server keywords. +# Refer to the dict manpage for other options. +# It will only check the second server if the first fails +server localhost +server dict.org diff --git a/app-text/dictd/files/1.5.5/dictd-run b/app-text/dictd/files/1.5.5/dictd-run new file mode 100755 index 000000000000..949d9712994c --- /dev/null +++ b/app-text/dictd/files/1.5.5/dictd-run @@ -0,0 +1,3 @@ +#!/bin/sh +# We abuse some debugging features here to get the desired behavior +exec dictd -d nodetach < /dev/null > /dev/null 2>&1 diff --git a/app-text/dictd/files/dictd.conf b/app-text/dictd/files/1.5.5/dictd.conf index 50a05c311f3d..50a05c311f3d 100644 --- a/app-text/dictd/files/dictd.conf +++ b/app-text/dictd/files/1.5.5/dictd.conf diff --git a/app-text/dictd/files/1.5.5/site.info b/app-text/dictd/files/1.5.5/site.info new file mode 100644 index 000000000000..23bfdeb61102 --- /dev/null +++ b/app-text/dictd/files/1.5.5/site.info @@ -0,0 +1,6 @@ +Welcome to your dictionary server dictd! + +This is an example site information file. It should contain information +about any restricted databases and how users can obtain access. If may +also contain other random data as you see fit. + diff --git a/app-text/dictd/files/svc-dictd b/app-text/dictd/files/1.5.5/svc-dictd index 9fd50862e381..9fd50862e381 100755 --- a/app-text/dictd/files/svc-dictd +++ b/app-text/dictd/files/1.5.5/svc-dictd diff --git a/app-text/dictd/files/digest-dictd-1.5.5-r1 b/app-text/dictd/files/digest-dictd-1.5.5-r1 new file mode 100644 index 000000000000..875329fc7519 --- /dev/null +++ b/app-text/dictd/files/digest-dictd-1.5.5-r1 @@ -0,0 +1 @@ +MD5 67307b6e5d0337f354b275c377506c63 dictd-1.5.5.tar.gz |