diff options
Diffstat (limited to 'www/dhttpd')
-rw-r--r-- | www/dhttpd/Makefile | 22 | ||||
-rw-r--r-- | www/dhttpd/files/dhttpd.sh | 17 | ||||
-rw-r--r-- | www/dhttpd/files/dhttpd.sh.in | 25 | ||||
-rw-r--r-- | www/dhttpd/files/patch-dhhtpd.1 | 15 | ||||
-rw-r--r-- | www/dhttpd/pkg-plist | 2 |
5 files changed, 56 insertions, 25 deletions
diff --git a/www/dhttpd/Makefile b/www/dhttpd/Makefile index d4f23f54c98d..bd5ac7209a87 100644 --- a/www/dhttpd/Makefile +++ b/www/dhttpd/Makefile @@ -8,26 +8,36 @@ PORTNAME= dhttpd PORTVERSION= 1.02a CATEGORIES= www -MASTER_SITES= http://ccca.nctu.edu.tw/~gslin/Software/ +MASTER_SITES= http://ccca.nctu.edu.tw/~gslin/Software/ \ + http://bsd-geek.de/FreeBSD/distfiles/ EXTRACT_SUFX= .tgz -MAINTAINER= ports@FreeBSD.org +MAINTAINER= lars.engels@0x20.net COMMENT= Minimal secure webserver. Fast and efficient, no cgi-bin support WRKSRC= ${WRKDIR}/${PORTNAME}-1.02-4 BUILD_WRKSRC= ${WRKSRC}/src +PLIST_FILES= sbin/dhttpd + MAN1= dhttpd.1 -STARTUP_SCRIPT= ${PORTNAME}.sh +USE_RC_SUBR= dhttpd.sh + +pre-everything:: + @${ECHO_MSG} "==============================================================" + @${ECHO_MSG} "To change the default document root" + @${ECHO_MSG} "${PREFIX}/www/data edit" + @${ECHO_MSG} "${FILESDIR}/patch-config.hh" + @${ECHO_MSG} "for your needs and re-compile dhhtpd." + @${ECHO_MSG} "==============================================================" post-patch: - @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/src/config.hh - @${SED} -e "s,%%PREFIX%%,${PREFIX}," ${FILESDIR}/${STARTUP_SCRIPT} > ${WRKSRC}/${STARTUP_SCRIPT} + @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/src/config.hh \ + ${WRKSRC}/dhttpd.1 do-install: ${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1 ${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/sbin - ${INSTALL_SCRIPT} ${WRKSRC}/${STARTUP_SCRIPT} ${PREFIX}/etc/rc.d .include <bsd.port.mk> diff --git a/www/dhttpd/files/dhttpd.sh b/www/dhttpd/files/dhttpd.sh deleted file mode 100644 index 39c0d10d87ca..000000000000 --- a/www/dhttpd/files/dhttpd.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -case "$1" in -start) - if [ -x %%PREFIX%%/sbin/dhttpd ]; then - %%PREFIX%%/sbin/dhttpd && echo -n ' dhttpd' - fi - ;; -stop) - killall dhttpd && echo -n ' dhttpd' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac - -exit 0 diff --git a/www/dhttpd/files/dhttpd.sh.in b/www/dhttpd/files/dhttpd.sh.in new file mode 100644 index 000000000000..821b02c2de63 --- /dev/null +++ b/www/dhttpd/files/dhttpd.sh.in @@ -0,0 +1,25 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: dhttpd +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable dhttpd: +# +# dhttpd_enable (bool): Set it to "YES" to enable dhttpd +# + +. %%RC_SUBR%% + +name="dhttpd" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${dhttpd_enable="NO"} + +command=%%PREFIX%%/sbin/${name} + +run_rc_command "$1" diff --git a/www/dhttpd/files/patch-dhhtpd.1 b/www/dhttpd/files/patch-dhhtpd.1 new file mode 100644 index 000000000000..f50e5dc804fc --- /dev/null +++ b/www/dhttpd/files/patch-dhhtpd.1 @@ -0,0 +1,15 @@ +--- dhttpd.1.orig Tue Mar 4 01:35:54 1997 ++++ dhttpd.1 Sat Jun 9 12:42:17 2007 +@@ -13,6 +13,12 @@ + and it was in working condition, it was realized that it was memory + efficient, low profile, quick, and served the one need for + an HTTP daemon: to transmit files. ++ ++The document root is /usr/local/www/data. ++ ++To enable dhttp, add 'dhttpd_enable="YES"' to /etc/rc.conf. ++If you want to change the default port from 80 to another port, add ++\'dhhtdp_flags="- p <PORT>"\' to /etc/rc.conf. + .SH OPTIONS + .TP + .B \-h diff --git a/www/dhttpd/pkg-plist b/www/dhttpd/pkg-plist deleted file mode 100644 index 1bff3de28e1c..000000000000 --- a/www/dhttpd/pkg-plist +++ /dev/null @@ -1,2 +0,0 @@ -etc/rc.d/dhttpd.sh -sbin/dhttpd |