summaryrefslogtreecommitdiff
path: root/net/dictd
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2001-01-25 15:55:46 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2001-01-25 15:55:46 +0000
commit3b0834c94505333064045ba1349c55a104ba928a (patch)
tree53a6bf30d6cf68e19978480ffad16b4e5681f741 /net/dictd
parentMASTER_SITE has moved to sunsite. (diff)
add dictd, dict protocol (RFC 2229) server
Notes
Notes: svn path=/head/; revision=37574
Diffstat (limited to 'net/dictd')
-rw-r--r--net/dictd/Makefile44
-rw-r--r--net/dictd/distinfo1
-rw-r--r--net/dictd/files/dictd.sh36
-rw-r--r--net/dictd/files/patch-Makefile_in79
-rw-r--r--net/dictd/files/patch-dictd_832
-rw-r--r--net/dictd/pkg-comment1
-rw-r--r--net/dictd/pkg-descr11
-rw-r--r--net/dictd/pkg-message7
-rw-r--r--net/dictd/pkg-plist8
9 files changed, 219 insertions, 0 deletions
diff --git a/net/dictd/Makefile b/net/dictd/Makefile
new file mode 100644
index 000000000000..b4df434eb0e2
--- /dev/null
+++ b/net/dictd/Makefile
@@ -0,0 +1,44 @@
+# ex:ts=8
+# New ports collection makefile for: dictd
+# Date created: Jan 23, 2001
+# Whom: Ying-Chieh Liao <ijliao@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dictd
+PORTVERSION= 1.5.5
+CATEGORIES= net textproc
+MASTER_SITES= ftp://ftp.dict.org/pub/dict/
+
+MAINTAINER= ijliao@FreeBSD.org
+
+MAN1= dictzip.1
+MAN8= dictd.8
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= "--prefix=${PREFIX} --with-cflags=${CFLAGS} --with-etcdir=${PREFIX}/etc"
+USE_GMAKE= yes
+
+ALL_TARGET= dictd dictzip
+INSTALL_TARGET= install.dictd install.dictzip
+
+post-patch:
+.for i in dict.1 dictd.8
+ @${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/$i
+.endfor
+ @${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" ${PKGMESSAGE}
+.for i in dictd.conf example.conf
+ @${PERL} -pi -e "s|/usr|${PREFIX}|g" ${WRKSRC}/$i
+.endfor
+
+post-install:
+ @${MKDIR} ${PREFIX}/share/${PORTNAME}
+.for i in example.conf example.dictrc example.site example2.conf example3.conf
+ ${INSTALL_DATA} ${WRKSRC}/$i ${PREFIX}/share/${PORTNAME}
+.endfor
+ @${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/dictd.sh > ${PREFIX}/etc/rc.d/dictd.sh
+ @${CHMOD} +x ${PREFIX}/etc/rc.d/dictd.sh
+ @${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/net/dictd/distinfo b/net/dictd/distinfo
new file mode 100644
index 000000000000..c7a1b68a4638
--- /dev/null
+++ b/net/dictd/distinfo
@@ -0,0 +1 @@
+MD5 (dictd-1.5.5.tar.gz) = 67307b6e5d0337f354b275c377506c63
diff --git a/net/dictd/files/dictd.sh b/net/dictd/files/dictd.sh
new file mode 100644
index 000000000000..3f0460b58963
--- /dev/null
+++ b/net/dictd/files/dictd.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+DICTD=%%PREFIX%%/sbin/dictd
+
+# DICTD_OPTIONS="-put -command_line -options -for -dictd -here"
+DICTD_OPTIONS=""
+
+DICTD_PID_FILE=/var/run/dictd.pid
+
+case "$1" in
+ start)
+ if [ -x $DICTD ]; then
+ echo "dictd starting."
+ $DICTD $DICTD_OPTIONS
+ else
+ echo "dictd.sh: cannot find $DICTD or it's not executable"
+ fi
+ ;;
+
+ stop)
+ if [ ! -f $DICTD_PID_FILE ]; then
+ exit 0
+ fi
+ dictdpid=`cat $DICTD_PID_FILE`
+ if [ "$dictdpid" -gt 0 ]; then
+ echo "Stopping the dictd server."
+ kill -15 $dictdpid 2>&1 > /dev/null
+ fi
+ rm -f $DICTD_PID_FILE
+ ;;
+ *)
+ echo "Usage: dictd.sh { start | stop }"
+ ;;
+esac
diff --git a/net/dictd/files/patch-Makefile_in b/net/dictd/files/patch-Makefile_in
new file mode 100644
index 000000000000..ff20a7e92740
--- /dev/null
+++ b/net/dictd/files/patch-Makefile_in
@@ -0,0 +1,79 @@
+--- Makefile.in.orig Fri Jan 12 17:24:29 2001
++++ Makefile.in Thu Jan 25 23:41:14 2001
+@@ -33,7 +33,7 @@
+ srcdir= @srcdir@
+ VPATH= @srcdir@
+ prefix= @prefix@
+-subdirs= @allsubdirs@ regex # doc -- use rfc2229 instead
++subdirs= @allsubdirs@ # regex # doc -- use rfc2229 instead
+ exec_prefix= @exec_prefix@
+ man1_prefix= @mandir@/man1
+ man8_prefix= @mandir@/man8
+@@ -57,9 +57,9 @@
+ -DDICT_CONFIG_PATH=\"$(conf)\"
+ SCFLAGS= @SCFLAGS@
+ LDFLAGS= @LDFLAGS@
+-XTRACFLAGS= @WCFLAGS@ @XTRACFLAGS@ @DEFS@ @CPPFLAGS@ -I. -Iregex
++XTRACFLAGS= @WCFLAGS@ @XTRACFLAGS@ @DEFS@ @CPPFLAGS@ -I. # -Iregex
+ XTRALDFLAGS= @WLDFLAGS@ @XTRALDFLAGS@
+-LDLIBS= @LIBS@ -Lregex -lregex
++LDLIBS= @LIBS@ -lgnuregex # -Lregex -lregex
+
+ EXES= dict dictd dictzip
+
+@@ -75,17 +75,7 @@
+ all $(EXES)::
+ @for subdir in `echo $(subdirs)`; do \
+ echo making in $$subdir; \
+- if [ "$$subdir" = "zlib" ]; then \
+- (cd $$subdir \
+- && $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" libz.a) \
+- || exit 1; \
+- elif [ "$$subdir" = "regex" ]; then \
+- (cd $$subdir \
+- && $(MAKE) CC="$(CC) $(CFLAGS)" lib) \
+- || exit 1; \
+- else \
+- (cd $$subdir && $(MAKE)) || exit 1; \
+- fi; \
++ (cd $$subdir && $(MAKE)) || exit 1; \
+ done
+
+ all:: $(EXES)
+@@ -116,11 +106,13 @@
+ servscan.o: servscan.c servparse.o servparse.h $(HEADERS)
+ $(CC) -c $(XTRACFLAGS) $(CFLAGS) $(SCFLAGS) $<
+
+-servparse.c: servparse.y
+- $(YACC) -tdv $<
+- cmp -s y.tab.h servparse.h || mv y.tab.h servparse.h
+- cmp -s y.tab.c servparse.c || mv y.tab.c servparse.c
+- -rm -f y.tab.h y.tab.c
++servparse.c: servparse.h
++
++servparse.h: servparse.y
++ $(YACC) -tdv -b serv $<
++ cmp -s serv.tab.h servparse.h || mv serv.tab.h servparse.h
++ cmp -s serv.tab.c servparse.c || mv serv.tab.c servparse.c
++ -rm -f serv.tab.h serv.tab.c
+
+ servparse.o: servparse.c $(HEADERS)
+ $(CC) -c $(XTRACFLAGS) $(CFLAGS) $(SCFLAGS) $<
+@@ -145,13 +137,13 @@
+ install -m 644 dict.1 $(man1_prefix)/dict.1
+
+ install.dictzip: dictzip
+- install dictzip $(bindir)
+- install -m 644 dictzip.1 $(man1_prefix)/dictzip.1
++ ${INSTALL_PROGRAM} dictzip $(bindir)
++ ${INSTALL_DATA} dictzip.1 $(man1_prefix)/dictzip.1
+
+ install.dictd: dictd
+- install dictd $(sbindir)
++ ${INSTALL_PROGRAM} dictd $(sbindir)
+ if test ! -d $(man8_prefix); then install -d 755 $(man8_prefix); fi
+- install -m 644 dictd.8 $(man8_prefix)/dictd.8
++ ${INSTALL_DATA} dictd.8 $(man8_prefix)/dictd.8
+
+ install: $(EXES) install.dict install.dictzip install.dictd
+
diff --git a/net/dictd/files/patch-dictd_8 b/net/dictd/files/patch-dictd_8
new file mode 100644
index 000000000000..d38157e16f4c
--- /dev/null
+++ b/net/dictd/files/patch-dictd_8
@@ -0,0 +1,32 @@
+--- dictd.8.orig Wed Jan 24 02:20:58 2001
++++ dictd.8 Wed Jan 24 02:21:44 2001
+@@ -96,7 +96,7 @@
+ .TP
+ .BI \-c " file\fR or " \-\-config " file"
+ Specify configuration file. The default is
+-.IR /etc/dictd.conf ,
++.IR %%PREFIX%%/etc/dictd.conf ,
+ but may be changed in the
+ .I dictd.h
+ file at compile time (DICT_CONFIG_FILE).
+@@ -282,7 +282,7 @@
+ .RE
+ .SH "CONFIGURATION FILE"
+ The configuration file defaults to
+-.IR /etc/dictd.conf ,
++.IR %%PREFIX%%/etc/dictd.conf ,
+ but can be specified on the command line with the
+ .B \-c
+ option (see above). The configuration file has four distinct sections.
+@@ -620,9 +620,9 @@
+ There is no way to get a running server to re-read the configuration file,
+ so databases cannot be added or deleted on the fly.
+ .SH "FILES"
+-.I /etc/dictd.conf
++.I %%PREFIX%%/etc/dictd.conf
+ .br
+-.I /usr/lib/dictd
++.I %%PREFIX%%/lib/dictd
+ .SH "SEE ALSO"
+ .BR dict (1),
+ .BR dictzip (1),
diff --git a/net/dictd/pkg-comment b/net/dictd/pkg-comment
new file mode 100644
index 000000000000..7fa46bfea75d
--- /dev/null
+++ b/net/dictd/pkg-comment
@@ -0,0 +1 @@
+Dict protocol (RFC 2229) client and server
diff --git a/net/dictd/pkg-descr b/net/dictd/pkg-descr
new file mode 100644
index 000000000000..2cc0f8dcfbe3
--- /dev/null
+++ b/net/dictd/pkg-descr
@@ -0,0 +1,11 @@
+The DICT Protocol, described in RFC 2229 is a TCP transaction based
+query/response protocol that allows a client to access dictionary
+definitions from a set of natural language dictionary databases. While
+RFC 2229 is a finished document, we plan to clarify and enhance the
+protocol definition as we gain more experience with large dictionary
+database servers. By default, the DICT protocol uses TCP port 2628.
+
+WWW: http://www.dict.org/
+
+-- Ying-Chieh Liao
+ ijliao@FreeBSD.org
diff --git a/net/dictd/pkg-message b/net/dictd/pkg-message
new file mode 100644
index 000000000000..d1ab01d4cc3e
--- /dev/null
+++ b/net/dictd/pkg-message
@@ -0,0 +1,7 @@
+==================================================================
+
+dictd database can be found at ftp://ftp.dict.org/pub/dict
+
+example config can be found at %%PREFIX%%/share/dictd
+
+==================================================================
diff --git a/net/dictd/pkg-plist b/net/dictd/pkg-plist
new file mode 100644
index 000000000000..f06af1539f0b
--- /dev/null
+++ b/net/dictd/pkg-plist
@@ -0,0 +1,8 @@
+bin/dictzip
+sbin/dictd
+share/dictd/example.conf
+share/dictd/example.dictrc
+share/dictd/example.site
+share/dictd/example2.conf
+share/dictd/example3.conf
+@dirrm share/dictd