Skip site navigation (1)Skip section navigation (2)
Date:      Sat,  9 Jun 2007 13:08:57 +0200 (CEST)
From:      Lars Engels <lars.engels@0x20.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/113493: [PATCH] www/dhttpd: overhaul port, take maintainership
Message-ID:  <20070609110857.B135F39DDE@mail.0x20.net>
Resent-Message-ID: <200706091110.l59BA3fG086668@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         113493
>Category:       ports
>Synopsis:       [PATCH] www/dhttpd: overhaul port, take maintainership
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 09 11:10:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Lars Engels
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD maggie.bsd-geek.de 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Wed Jun  6 21:12:35 CEST
>Description:
[DESCRIBE CHANGES]
- add backup MASTER_SITES
- add USE_RC_SUBR
- add RC_SUBR documentation to dhttpd.1
- Take maintainership

Added file(s):
- files/dhttpd.sh.in
- files/patch-dhhtpd.1

Removed file(s):
- pkg-plist
- files/dhttpd.sh

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- dhttpd-1.02a.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/www/dhttpd/Makefile,v
retrieving revision 1.6
diff -u -u -r1.6 Makefile
--- Makefile    13 May 2006 04:41:09 -0000      1.6
+++ Makefile    9 Jun 2007 10:47:48 -0000
@@ -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>
Index: pkg-plist
===================================================================
RCS file: pkg-plist
diff -N pkg-plist
--- pkg-plist   24 Jun 2002 09:17:18 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-etc/rc.d/dhttpd.sh
-sbin/dhttpd
Index: files/dhttpd.sh
===================================================================
RCS file: files/dhttpd.sh
diff -N files/dhttpd.sh
--- files/dhttpd.sh     24 Jun 2002 09:17:18 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -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
Index: files/dhttpd.sh.in
===================================================================
RCS file: files/dhttpd.sh.in
diff -N files/dhttpd.sh.in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ files/dhttpd.sh.in  9 Jun 2007 10:47:48 -0000
@@ -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"
Index: files/patch-dhhtpd.1
===================================================================
RCS file: files/patch-dhhtpd.1
diff -N files/patch-dhhtpd.1
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ files/patch-dhhtpd.1        9 Jun 2007 10:47:48 -0000
@@ -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
--- dhttpd-1.02a.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070609110857.B135F39DDE>