diff options
author | ijliao <ijliao@FreeBSD.org> | 2001-01-25 23:55:46 +0800 |
---|---|---|
committer | ijliao <ijliao@FreeBSD.org> | 2001-01-25 23:55:46 +0800 |
commit | 40684706f879301962e696dbb4373c3641a40eb0 (patch) | |
tree | 21fc0c8217605046dc1f729db8807c6b4c6f3591 /net/dictd/files | |
parent | 541a7f5b9349ef66092d8752788d0a2ed3610b27 (diff) | |
download | freebsd-ports-gnome-40684706f879301962e696dbb4373c3641a40eb0.tar.gz freebsd-ports-gnome-40684706f879301962e696dbb4373c3641a40eb0.tar.zst freebsd-ports-gnome-40684706f879301962e696dbb4373c3641a40eb0.zip |
add dictd, dict protocol (RFC 2229) server
Diffstat (limited to 'net/dictd/files')
-rw-r--r-- | net/dictd/files/dictd.sh | 36 | ||||
-rw-r--r-- | net/dictd/files/patch-Makefile_in | 79 | ||||
-rw-r--r-- | net/dictd/files/patch-dictd_8 | 32 |
3 files changed, 147 insertions, 0 deletions
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), |