- Add backup MASTER_SITES
- Add USE_RC_SUBR - Add RC_SUBR documentation to dhttpd.1 - Pass maintainership to submitter PR: 113493 Submitted by: Lars Engels <lars.engels@0x20.net>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
25
www/dhttpd/files/dhttpd.sh.in
Normal file
25
www/dhttpd/files/dhttpd.sh.in
Normal file
@@ -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"
|
||||
15
www/dhttpd/files/patch-dhhtpd.1
Normal file
15
www/dhttpd/files/patch-dhhtpd.1
Normal file
@@ -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
|
||||
@@ -1,2 +0,0 @@
|
||||
etc/rc.d/dhttpd.sh
|
||||
sbin/dhttpd
|
||||
Reference in New Issue
Block a user