diff options
author | pav <pav@FreeBSD.org> | 2004-11-01 05:56:08 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-11-01 05:56:08 +0800 |
commit | eff75b80092a3061d317570c6b1fd2ff7bc261c2 (patch) | |
tree | 19c4e6749325568eaa6895c68e81039e7c9b49c5 /japanese/ebnetd | |
parent | 6202c78663702a4ec946c4a3a38e6b624c3f951c (diff) | |
download | freebsd-ports-graphics-eff75b80092a3061d317570c6b1fd2ff7bc261c2.tar.gz freebsd-ports-graphics-eff75b80092a3061d317570c6b1fd2ff7bc261c2.tar.zst freebsd-ports-graphics-eff75b80092a3061d317570c6b1fd2ff7bc261c2.zip |
- After repocopy from japanese/ndtpd, rename to japanese/ebnetd and update
to version 1.0
PR: ports/73131
Submitted by: KIMURA Yasuhiro <yasu@utahime.org>
Diffstat (limited to 'japanese/ebnetd')
-rw-r--r-- | japanese/ebnetd/Makefile | 31 | ||||
-rw-r--r-- | japanese/ebnetd/distinfo | 4 | ||||
-rw-r--r-- | japanese/ebnetd/files/ebnetd.sh | 77 | ||||
-rw-r--r-- | japanese/ebnetd/files/ndtpd.sh.sample | 57 | ||||
-rw-r--r-- | japanese/ebnetd/files/patch-doc-ja::ebnetd-ja.texi | 13 | ||||
-rw-r--r-- | japanese/ebnetd/files/patch-doc::ebnetd.texi | 13 | ||||
-rw-r--r-- | japanese/ebnetd/pkg-descr | 35 | ||||
-rw-r--r-- | japanese/ebnetd/pkg-install | 90 | ||||
-rw-r--r-- | japanese/ebnetd/pkg-message | 43 | ||||
-rw-r--r-- | japanese/ebnetd/pkg-plist | 29 |
10 files changed, 257 insertions, 135 deletions
diff --git a/japanese/ebnetd/Makefile b/japanese/ebnetd/Makefile index b90592eb79d..ac4ad88a00b 100644 --- a/japanese/ebnetd/Makefile +++ b/japanese/ebnetd/Makefile @@ -1,22 +1,18 @@ -# New ports collection makefile for: ndtpd +# New ports collection makefile for: ebnetd # Date created: 4 Aug 1998 # Whom: Motoyuki Kasahara <m-kasahr@sra.co.jp> # # $FreeBSD$ # -PORTNAME= ndtpd -PORTVERSION= 3.1.5 -PORTREVISION= 1 +PORTNAME= ebnetd +PORTVERSION= 1.0 CATEGORIES= japanese ipv6 -MASTER_SITES= ftp://ftp.sra.co.jp/pub/net/ndtp/ndtpd/ \ - ftp://ftp.eos.hokudai.ac.jp/pub/net/ndtp/ndtpd/ - -PATCH_SITES= ${MASTER_SITES} -#PATCHFILES= ${DISTNAME}+.diff +MASTER_SITES= ftp://ftp.sra.co.jp/pub/misc/eb/ \ + ftp://ftp.eos.hokudai.ac.jp/pub/net/ndtp/eb/ MAINTAINER= takamune2004@yahoo.co.jp -COMMENT= Server for accessing CD-ROM books with NDTP +COMMENT= Servers for accessing CD-ROM books via TCP/IP LIB_DEPENDS= eb.7:${PORTSDIR}/japanese/eb @@ -24,18 +20,19 @@ GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --localstatedir=${RUNDIR} --with-logdir=${LOGDIR} -.if !defined(PACKAGE_BUILDING) -IS_INTERACTIVE= Maybe_interactive_at_install_stage -.endif - # Local variables LOGDIR= /var/log RUNDIR= /var/run -STARTUP_SCRIPT= ${PORTNAME}.sh.sample +STARTUP_SCRIPT= ${PORTNAME}.sh + +USE_RC_SUBR= yes +RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} + +INFO= ebnetd ebnetd-ja post-build: - ${SED} "s,@prefix@,${PREFIX},; s,@rundir@,${RUNDIR},"\ - ${FILESDIR}/${STARTUP_SCRIPT} > ${WRKDIR}/${STARTUP_SCRIPT} + ${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/${STARTUP_SCRIPT} > ${WRKDIR}/${STARTUP_SCRIPT} post-install: ${INSTALL_SCRIPT} ${WRKDIR}/${STARTUP_SCRIPT} ${PREFIX}/etc/rc.d diff --git a/japanese/ebnetd/distinfo b/japanese/ebnetd/distinfo index b47621f368c..e1fa555be4a 100644 --- a/japanese/ebnetd/distinfo +++ b/japanese/ebnetd/distinfo @@ -1,2 +1,2 @@ -MD5 (ndtpd-3.1.5.tar.gz) = ccfd4f2f539802b1abe6d922e7cfa374 -SIZE (ndtpd-3.1.5.tar.gz) = 558367 +MD5 (ebnetd-1.0.tar.gz) = 854237acd834060bbbd021af353ef253 +SIZE (ebnetd-1.0.tar.gz) = 686413 diff --git a/japanese/ebnetd/files/ebnetd.sh b/japanese/ebnetd/files/ebnetd.sh new file mode 100644 index 00000000000..e3e388e3ec4 --- /dev/null +++ b/japanese/ebnetd/files/ebnetd.sh @@ -0,0 +1,77 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ebnetd ndtpd ebhttpd +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable EBNETD servers: +# ebnetd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable ebnetd. +# ebnetd_flags (str): Set to "" by default. +# Extra flags passed to start ebnetd. +# ndtpd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable ndtpd. +# ndtpd_flags (str): Set to "" by default. +# Extra flags passed to start ndtpd. +# ebhttpd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable ebhttpd. +# ebhttpd_flags (str): Set to "" by default. +# Extra flags passed to start ebhttpd. + +. %%RC_SUBR%% + +# ebnetd +name=ebnetd +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/${name}" +pidfile="/var/run/ebnetd/ebnd.pid" +required_dirs="/var/run/ebnetd" +required_files=%%PREFIX%%/etc/ebnetd.conf + +ebnetd_enable=${ebnetd_enable:-"NO"} +ebnetd_flags=${ebnetd_flags:-""} + +sig_reload=SIGHUP +extra_commands="reload" + +load_rc_config $name +run_rc_command "$1" + +# ndtpd +name=ndtpd +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/${name}" +pidfile="/var/run/ebnetd/${name}.pid" +required_dirs="/var/run/ebnetd" +required_files=%%PREFIX%%/etc/ebnetd.conf + +ndtpd_enable=${ndtpd_enable:-"NO"} +ndtpd_flags=${ndtpd_flags:-""} + +sig_reload=SIGHUP +extra_commands="reload" + +load_rc_config $name +run_rc_command "$1" + +# ebhttpd +name=ebhttpd +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/${name}" +pidfile="/var/run/ebnetd/${name}.pid" +required_dirs="/var/run/ebnetd" +required_files=%%PREFIX%%/etc/ebnetd.conf + +ebhttpd_enable=${ebhttpd_enable:-"NO"} +ebhttpd_flags=${ebhttpd_flags:-""} + +sig_reload=SIGHUP +extra_commands="reload" + +load_rc_config $name +run_rc_command "$1" diff --git a/japanese/ebnetd/files/ndtpd.sh.sample b/japanese/ebnetd/files/ndtpd.sh.sample deleted file mode 100644 index 3abaa419a30..00000000000 --- a/japanese/ebnetd/files/ndtpd.sh.sample +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -e - -# -# $FreeBSD$ -# -# startup script for ndtpd -# Usage: ndtpd.sh {start|stop} - -command=$1 -standalone=YES # Run ndtpd as a standalone daemon. -#standalone=NO # Run ndtpd as a child of inetd. - -GetDirective() { - local directive - - directive=$1 - - awk '/^[ ]*'${directive}'[ ]+/ {print $2; exit}' ${conf} -} - -MakeWorkingDirectory() { - local user group work - - user="`GetDirective user`" - group="`GetDirective group`" - work="`GetDirective work-path`" - - rm -rf ${work:=@rundir@/ndtpd} - eval install -d ${user:+-o ${user}} ${group:+-g ${group}} ${work} -} - -conf=@prefix@/etc/ndtpd.conf -ndtpd=@prefix@/sbin/ndtpd -ndtpcheck=@prefix@/sbin/ndtpcheck -ndtpcontrol=@prefix@/sbin/ndtpcontrol - -${ndtpcheck} -c ${conf} || exit - -case "${command}" in -start) - MakeWorkingDirectory - - if [ "${standalone}" = YES ]; then - ${ndtpd} && echo -n " ndtpd" - fi - ;; -stop) - if [ "${standalone}" = YES ]; then - ${ndtpcontrol} terminate && echo -n " ndtpd" - fi - ;; -*) - echo "usage: `basename $0` {start|stop}" >&2 - exit 22 - ;; -esac - -exit diff --git a/japanese/ebnetd/files/patch-doc-ja::ebnetd-ja.texi b/japanese/ebnetd/files/patch-doc-ja::ebnetd-ja.texi new file mode 100644 index 00000000000..1c644502171 --- /dev/null +++ b/japanese/ebnetd/files/patch-doc-ja::ebnetd-ja.texi @@ -0,0 +1,13 @@ +--- ../ebnetd-1.0-dist/doc-ja/ebnetd-ja.texi Wed Sep 3 20:26:39 2003 ++++ doc-ja/ebnetd-ja.texi Sat Oct 2 23:50:34 2004 +@@ -8,9 +8,7 @@ + + @dircategory CD-ROM Book Utilities + @direntry +-* EBNETD: (ebnetd). Network EB Library server. +-* NDTPD: (ndtpd). Server for accessing CD-ROM books with NDTP. +-* ebHTTPD: (ebhttpd). Server for accessing CD-ROM books with HTTP. ++* EBNETD-ja: (ebnetd-ja). Servers for accessing CD-ROM books via TCP/IP + @end direntry + + @ifinfo diff --git a/japanese/ebnetd/files/patch-doc::ebnetd.texi b/japanese/ebnetd/files/patch-doc::ebnetd.texi new file mode 100644 index 00000000000..db2059c5ba2 --- /dev/null +++ b/japanese/ebnetd/files/patch-doc::ebnetd.texi @@ -0,0 +1,13 @@ +--- ../ebnetd-1.0-dist/doc/ebnetd.texi Wed Sep 3 20:26:39 2003 ++++ doc/ebnetd.texi Sat Oct 2 23:46:15 2004 +@@ -8,9 +8,7 @@ + + @dircategory CD-ROM Book Utilities + @direntry +-* EBNETD: (ebnetd). Network EB Library server. +-* NDTPD: (ndtpd). Server for accessing CD-ROM books with NDTP. +-* ebHTTPD: (ebhttpd). Server for accessing CD-ROM books with HTTP. ++* EBNETD: (ebnetd). Servers for accessing CD-ROM books via TCP/IP + @end direntry + + @ifinfo diff --git a/japanese/ebnetd/pkg-descr b/japanese/ebnetd/pkg-descr index 2992bb39c9e..090a976da4a 100644 --- a/japanese/ebnetd/pkg-descr +++ b/japanese/ebnetd/pkg-descr @@ -1,18 +1,25 @@ -NDTPD is a server for accessing CD-ROM books with NDTP (Network -Dictionary Transfer Protocol) on TCP. You can replace dserver with -NDTPD. NDTPD can run on UNIX derived systems. It supports CD-ROM -books of EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING formats. CD-ROM -books of those formats are popular in Japan. Since CD-ROM books -themseves are stands on the ISO 9660 format, you can mount the discs -by the same way as other ISO 9660 discs. +This EBNETD distribution contains three server commands: ebnetd, ndtpd +and ebhttpd. They are servers for accessing CD-ROM book on remote host +via TCP/IP. --- Motoyuki Kasahara <m-kasahr@sra.co.jp> +ebnetd: ebnetd is a server of EBNET protocol which is designed to + communicate with EB Library. For more details about EB + Library, see http://www.sra.co.jp/m-kasahr/eb/. -In addition, you must follow the licenses of your CD-ROM books. -Though NDTPD is free software, your books may not be free. Don't -open your books to unlicensed hosts nor users. +ndtpd: ndtpd is an NDTP (Network Dictionary Transfer Protocol) + server. The first implementation of the NDTP esrver is + `dserver'. ndtpd has upper compatibility with dserver-2.2. -You can get information about NDTPD from their website. -WWW: http://www.sra.co.jp/people/m-kasahr/ndtpd/ +ebhttpd: ebhttpd is a WWW (World Wide Web) server. It supprts HTTP/1.0 + and HTTP/1.1 (Hypertext Transfer Protocol version 1.0 and 1.1). --- Kazu TAKAMUNE <takamune2004@yahoo.co.jp> +The servers support CD-ROM books of EB, EBG, EBXA, EBXA-C, S-EBXA and +EPWING formats. The servers can run as a standalone daemons by +default, but can also run as children of `inetd'. + +In addition, you must follow the licenses of your CD-ROM books. Though +EBNETD is free software, your books may not be free. Don't open your +books to unlicensed hosts nor users. + +Author: Motoyuki Kasahara <m-kasahr@sra.co.jp> +WWW: http://www.sra.co.jp/people/m-kasahr/ebnetd/ diff --git a/japanese/ebnetd/pkg-install b/japanese/ebnetd/pkg-install index d29231b3efb..747d2672696 100644 --- a/japanese/ebnetd/pkg-install +++ b/japanese/ebnetd/pkg-install @@ -1,5 +1,8 @@ #!/bin/sh - -# an installation script for ndtpd +# an installation script for ebnetd + +BATCH=${BATCH:=no} +basename=`basename $0` ask() { local question default answer @@ -7,7 +10,7 @@ ask() { question=$1 default=$2 - if [ -z "${PACKAGE_BUILDING}" ]; then + if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then read -p "${question} (y/n) [${default}]? " answer [ "${answer}" ] && default=${answer} fi @@ -29,31 +32,86 @@ yesno() { done } +check() { + local file entry + + file=$1 + entry=$2 + + sed 's/#.*//' ${file} | grep -qw ${entry} +} + +checkall() { + local file list item + + file=$1 + shift + list=$* + + for item in $list; do + if check ${file} ${item}; then + : + else + return 1 + fi + done + return 0 +} + +add() { + local oldfile newfile entry port comment + + file=$1 + entry=$2 + port=$3 + comment=$4 + + if check ${file} ${entry}; then + : + elif sed 's/#.*//' ${file} | grep -qw ${port} ; then + oldumask=`umask` + umask 0077 + tmpfile=`mktemp -q /tmp/${basename}.XXXXXX` + if [ $? -ne 0 ]; then + echo "Can't create temp file" 1>&2 + exit 1 + fi + cp $file $tmpfile + trap '' 1 2 15 + sed 's,^\([^#]*[ ]'${port}'\),\1 '${entry}, ${tmpfile} > ${file} + trap 1 2 15 + rm $tmpfile + umask $oldumask + else + echo "${entry} ${port} #${comment}" >> ${file} + fi +} + [ "$2" = POST-INSTALL ] || exit 0 # -# Add an entry for `ndtp' to /etc/services. +# Add entries for EBNETD (`ebnet' and `ndtp') to /etc/services. # file=/etc/services back=${file}.bak -name=ndtp -port=2010/tcp -comment="Network Dictionary Transfer Protocol" +entrylist='ebnet ndtp' +entry_ebnet=ebnet +port_ebnet=22010/tcp +comment_ebnet='EBNET Protocol' +entry_ndtp=ndtp +port_ndtp=2010/tcp +comment_ndtp='Network Dictionary Transfer Protocol' echo "************************************************************************" -if sed 's/#.*//' ${file} | grep -qw ${name}; then - echo "This system has already an entry for ${name} in ${file}." +if checkall ${file} ${entrylist}; then + echo "This system has already all entries for EBNETD in ${file}." else - echo "This system has no entry for ${name} in ${file}." - if yesno " Would you like to add it automatically?" y; then + echo "This system doesn't have some of entries for EBNETD in ${file}." + if yesno " Would you like to add them automatically?" y; then cp -f ${file} ${back} echo " The original file is saved as ${back}." - - if sed 's/#.*//' ${file} | grep -qw ${port}; then - sed 's,^\([^#]*[ ]'${port}'\),\1 '${name}, ${back} > ${file} - else - echo "${name} ${port} #${comment}" >> ${file} - fi + add ${file} ${entry_ebnet} ${port_ebnet} ${comment_ebnet} + add ${file} ${entry_ndtp} ${port_ndtp} ${comment_ndtp} fi fi echo "************************************************************************" diff --git a/japanese/ebnetd/pkg-message b/japanese/ebnetd/pkg-message index 796592a8b02..0822d34efec 100644 --- a/japanese/ebnetd/pkg-message +++ b/japanese/ebnetd/pkg-message @@ -1,19 +1,32 @@ -************************************************************************ -You'll need manual configurations to actually activate `ndtpd'. +********************************************************************** +You'll need manual configurations to actually activate EBNETD servers. -**** IF YOU WANT TO SETUP PRIVATE SYSLOG, edit /etc/syslog.conf. +Step 0(optional): +If you want to setup private syslog, edit /etc/syslog.conf. -1st) Copy a sample configuration file `ndtpd.conf.sample' to `ndtpd.conf' - in `${PREFIX}/etc' directory, and edit it. - Consult the "Configuration File" section of info file. +Step 1: +Copy a sample configuration file `ebnetd.conf.sample' to `ebnetd.conf' +in `${PREFIX}/etc' directory, and edit it. Consult the "Configuration +File" section of info file. -2nd) Copy a sample startup script `ndtpd.sh.sample' to `ndtpd.sh' - in `${PREFIX}/etc/rc.d' directory, and edit it. +Step 2a: +To start EBNETD servers as standalone daemons, add the following lines +to /etc/rc.conf: +ebhttpd_enable (bool): Set to "NO" by default. + Set it to "YES" to enable ebhttpd. +ebhttpd_flags (str): Set to "" by default. + Extra flags passed to start ebhttpd. +ebnetd_enable (bool): Set to "NO" by default. + Set it to "YES" to enable ebnetd. +ebnetd_flags (str): Set to "" by default. + Extra flags passed to start ebnetd. +ndtpd_enable (bool): Set to "NO" by default. + Set it to "YES" to enable ndtpd. +ndtpd_flags (str): Set to "" by default. + Extra flags passed to start ndtpd. - a) To start `ndtpd' as a standalone daemon, set the variable - `standalone' in the script to `YES', and exec it. - - b) Otherwise, to start as a child process of `inetd', - set `standalone' to `NO', and edit the file `/etc/inetd.conf'. - Consult the "Run as a Child of inetd" section of info file. -************************************************************************ +Step 2b: +To start EBNETD servers as child processes of 'inetd', edit +/etc/inetd.conf. Consult the "Run `xxxx' as a child of `inetd'" +sections of info file. +********************************************************************** diff --git a/japanese/ebnetd/pkg-plist b/japanese/ebnetd/pkg-plist index cb1c2f7b6ac..f9a22642e6f 100644 --- a/japanese/ebnetd/pkg-plist +++ b/japanese/ebnetd/pkg-plist @@ -1,18 +1,19 @@ -etc/ndtpd.conf.sample -etc/rc.d/ndtpd.sh.sample -@unexec install-info --delete %D/info/ndtpd-ja.info %D/info/dir -@unexec install-info --delete %D/info/ndtpd.info %D/info/dir -info/ndtpd-ja.info -info/ndtpd-ja.info-1 -info/ndtpd-ja.info-2 -info/ndtpd.info -info/ndtpd.info-1 -info/ndtpd.info-2 -@exec install-info %D/info/ndtpd-ja.info %D/info/dir -@exec install-info %D/info/ndtpd.info %D/info/dir +@comment $FreeBSD$ +etc/ebnetd.conf.sample +etc/rc.d/ebnetd.sh +libexec/ebhtstat +libexec/ebnstat libexec/ndtpstat +sbin/ebhtcheck +sbin/ebhtcontrol +sbin/ebhttpd +sbin/ebncheck +sbin/ebncontrol +sbin/ebndaily +sbin/ebnetd +sbin/ebnupgrade sbin/ndtpcheck sbin/ndtpcontrol sbin/ndtpd -sbin/ndtpdaily -sbin/ndtpupgrade +@exec /bin/mkdir -m 0755 -p /var/run/ebnetd +@unexec rmdir /var/run/ebnetd |