Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jun 2002 15:58:06 +0800 (CST)
From:      Gea-Suan Lin <gslin@Infomath.math.NCTU.edu.tw>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        gslin@Infomath.math.NCTU.edu.tw
Subject:   ports/39769: New port: www/dhttpd
Message-ID:  <20020624075806.26DDA56B9@Infomath.math.NCTU.edu.tw>

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

>Number:         39769
>Category:       ports
>Synopsis:       New port: www/dhttpd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 24 02:00:06 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Gea-Suan Lin
>Release:        FreeBSD 4.6-RELEASE i386
>Organization:
>Environment:
System: FreeBSD Infomath.math.NCTU.edu.tw 4.6-RELEASE FreeBSD 4.6-RELEASE #0: Sun Jun 16 21:11:17 CST 2002 root@Infomath.math.NCTU.edu.tw:/usr/obj/usr/src/sys/INFOMATH i386


	
>Description:

dhttpd is a secure and efficient personal HTTP server. It does not need a
permanent IP address and can be run from a user account on high ports. Among
its features, dhttpd supports caching, customized error messages, low profile
memory usage, little hard disk space, highly portable code, and easy setup.
dhttpd is the perfect solution for the minimalist in all of us.

WWW: http://uts.cc.utexas.edu/~foxx/dhttpd/
	
>How-To-Repeat:
	
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	dhttpd
#	dhttpd/distinfo
#	dhttpd/Makefile
#	dhttpd/files
#	dhttpd/files/patch-main.cc
#	dhttpd/files/patch-socket.cc
#	dhttpd/files/patch-config.hh
#	dhttpd/files/dhttpd.sh
#	dhttpd/pkg-comment
#	dhttpd/pkg-descr
#	dhttpd/pkg-plist
#
echo c - dhttpd
mkdir -p dhttpd > /dev/null 2>&1
echo x - dhttpd/distinfo
sed 's/^X//' >dhttpd/distinfo << 'END-of-dhttpd/distinfo'
XMD5 (dhttpd-1.02a.tgz) = 6e8669ed4ec52f82559386ed191b1e37
END-of-dhttpd/distinfo
echo x - dhttpd/Makefile
sed 's/^X//' >dhttpd/Makefile << 'END-of-dhttpd/Makefile'
X# New ports collection makefile for: 	dhttpd
X# Date created:				24 June 2002
X# Whom:					Gea-Suan Lin <gslin@ccca.nctu.edu.tw>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	dhttpd
XPORTVERSION= 	1.02a
XCATEGORIES=	www
XMASTER_SITES=	http://uts.cc.utexas.edu/~foxx/dhttpd/
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	gslin@ccca.nctu.edu.tw
X
XUSE_REINPLACE=	yes
X
XWRKSRC=		${WRKDIR}/${PORTNAME}-1.02-4
XBUILD_WRKSRC=	${WRKSRC}/src
X
XMAN1=		dhttpd.1
X
XSTARTUP_SCRIPT=	${PORTNAME}.sh
X
Xpost-patch:
X	@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/src/config.hh
X	@${SED} -e "s,%%PREFIX%%,${PREFIX}," ${FILESDIR}/${STARTUP_SCRIPT} > ${WRKSRC}/${STARTUP_SCRIPT}
X
Xdo-install:
X	${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1
X	${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/sbin
X	${INSTALL_SCRIPT} ${WRKSRC}/${STARTUP_SCRIPT} ${PREFIX}/etc/rc.d
X
X.include <bsd.port.mk>
END-of-dhttpd/Makefile
echo c - dhttpd/files
mkdir -p dhttpd/files > /dev/null 2>&1
echo x - dhttpd/files/patch-main.cc
sed 's/^X//' >dhttpd/files/patch-main.cc << 'END-of-dhttpd/files/patch-main.cc'
X--- src/main.cc	Tue Mar  4 09:10:41 1997
X+++ src/main.cc.orig	Mon Jun 24 15:12:32 2002
X@@ -18,7 +18,6 @@
X  */
X 
X #include <errno.h>
X-#include <grp.h>
X #include <pwd.h>
X #include <signal.h>
X #include <stdio.h>
END-of-dhttpd/files/patch-main.cc
echo x - dhttpd/files/patch-socket.cc
sed 's/^X//' >dhttpd/files/patch-socket.cc << 'END-of-dhttpd/files/patch-socket.cc'
X--- src/socket.cc.orig	Mon Jun 24 15:12:40 2002
X+++ src/socket.cc	Mon Jun 24 15:13:03 2002
X@@ -17,6 +17,7 @@
X  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X  */
X 
X+#include <sys/types.h>
X #include <errno.h>
X #include <netdb.h>
X #include <netinet/in.h>
X@@ -24,7 +25,6 @@
X #include <stdio.h>
X #include <string.h>
X #include <unistd.h>
X-#include <sys/types.h>
X #include <sys/socket.h>
X #include <sys/types.h>
X #include <sys/wait.h>
X@@ -149,7 +149,7 @@
X 	do
X 	{
X 		cSidLen = sizeof( cSid );
X-		s = accept( sock, &cSid, &cSidLen );
X+		s = accept( sock, &cSid, (socklen_t *) &cSidLen );
X 	}
X 	while( s==-1 );
X 
END-of-dhttpd/files/patch-socket.cc
echo x - dhttpd/files/patch-config.hh
sed 's/^X//' >dhttpd/files/patch-config.hh << 'END-of-dhttpd/files/patch-config.hh'
X--- src/config.hh.orig	Mon Jun 24 15:21:37 2002
X+++ src/config.hh	Mon Jun 24 15:23:14 2002
X@@ -1,17 +1,17 @@
X /* Set this as the user id number you want dhttpd to use when    *
X  * starting it as root.  You can get this info from /etc/passwd. */
X-#define UID		65534
X+#define UID		80
X 
X /* Set this to the proper group id number of UID above.          */
X-#define GID		65534
X+#define GID		80
X 
X /* Set your default port number.  If you aren't running as       *
X  * root, you must use a value >= 1024, such as 8080.             */
X #define DEFAULTPORT	80
X 
X /* This is the directory where the web pages are located.        */
X-#define WEBDIRPREFIX	"/var/www"
X+#define WEBDIRPREFIX	"%%PREFIX%%/www/data"
X 
X /* This defines the maximum number of child processes (i.e.      *
X  * maximum sockets being serviced by dhttpd).                    */
X-#define MAXCHILDPROC	100
X+#define MAXCHILDPROC	2048
END-of-dhttpd/files/patch-config.hh
echo x - dhttpd/files/dhttpd.sh
sed 's/^X//' >dhttpd/files/dhttpd.sh << 'END-of-dhttpd/files/dhttpd.sh'
X#!/bin/sh
X
Xcase "$1" in
Xstart)
X	if [ -x %%PREFIX%%/sbin/dhttpd ]; then
X		%%PREFIX%%/sbin/dhttpd && echo -n ' dhttpd'
X	fi
X	;;
Xstop)
X	killall dhttpd && echo -n ' dhttpd'
X	;;
X*)
X	echo "Usage: `basename $0` {start|stop}" >&2
X	;;
Xesac
X
Xexit 0
END-of-dhttpd/files/dhttpd.sh
echo x - dhttpd/pkg-comment
sed 's/^X//' >dhttpd/pkg-comment << 'END-of-dhttpd/pkg-comment'
XMinimal secure webserver. Fast and efficient, no cgi-bin support
END-of-dhttpd/pkg-comment
echo x - dhttpd/pkg-descr
sed 's/^X//' >dhttpd/pkg-descr << 'END-of-dhttpd/pkg-descr'
Xdhttpd is a secure and efficient personal HTTP server. It does not need a
Xpermanent IP address and can be run from a user account on high ports. Among
Xits features, dhttpd supports caching, customized error messages, low profile
Xmemory usage, little hard disk space, highly portable code, and easy setup.
Xdhttpd is the perfect solution for the minimalist in all of us.
X
XWWW: http://uts.cc.utexas.edu/~foxx/dhttpd/
END-of-dhttpd/pkg-descr
echo x - dhttpd/pkg-plist
sed 's/^X//' >dhttpd/pkg-plist << 'END-of-dhttpd/pkg-plist'
Xetc/rc.d/dhttpd.sh
Xsbin/dhttpd
END-of-dhttpd/pkg-plist
exit

	


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

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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