* Install some documentation.

* Add a rc.d start-up script.
* Add a wrapper around the daemon that ensures its running (suggested by
  the thttpd author).
* Add a sample configuration file.
* Move one of the echo'ed messages to pkg/MESSAGES for the benefit of package
  users.
This commit is contained in:
David E. O'Brien 2000-03-23 02:25:32 +00:00
parent cc75cd9ec3
commit bdb6fa84ad
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=26973
4 changed files with 45 additions and 17 deletions

View file

@ -10,11 +10,11 @@ DISTNAME= thttpd-2.16
CATEGORIES= www ipv6
MASTER_SITES= http://www.acme.com/software/thttpd/ \
http://www.freenix.no/~anders/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} notes.html
MAINTAINER= anders@fix.no
NO_PACKAGE= "Group needs to be created for users to have their own web dirs"
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
GNU_CONFIGURE= yes
MAN1= makeweb.1 htpasswd.1
@ -36,10 +36,36 @@ do-install:
@${INSTALL_MAN} ${WRKSRC}/extras/makeweb.1 ${PREFIX}/man/man1
@${INSTALL_MAN} ${WRKSRC}/extras/htpasswd.1 ${PREFIX}/man/man1
@${INSTALL_MAN} ${WRKSRC}/extras/syslogtocern.8 ${PREFIX}/man/man8
@if [ ! -f ${PREFIX}/sbin/thttpd_wrapper ]; then \
${ECHO} "Installing ${PREFIX}/sbin/thttpd_wrapper file."; \
${ECHO} "#!/bin/sh" > ${PREFIX}/sbin/thttpd_wrapper; \
${ECHO} "while true ; do" >> ${PREFIX}/sbin/thttpd_wrapper; \
${ECHO} " ${PREFIX}/sbin/thttpd -D -C ${PREFIX}/etc/thttpd.conf" >> ${PREFIX}/sbin/thttpd_wrapper; \
${ECHO} " sleep 10" >> ${PREFIX}/sbin/thttpd_wrapper; \
${ECHO} "done" >> ${PREFIX}/sbin/thttpd_wrapper; \
${CHMOD} 751 ${PREFIX}/sbin/thttpd_wrapper; \
fi
@${ECHO} "Installing ${PREFIX}/etc/thttpd.conf.sample configuration file."
@${ECHO} "dir=${PREFIX}/www/data" > ${PREFIX}/etc/thttpd.conf.sample
@${ECHO} "chroot" >> ${PREFIX}/etc/thttpd.conf.sample
@${ECHO} "cgipat=*.cgi" >> ${PREFIX}/etc/thttpd.conf.sample
@${ECHO} "logfile=${PREFIX}/www/logs/thttpd.log" >> ${PREFIX}/etc/thttpd.conf.sample
@${ECHO} "pidfile=/var/run/thttpd.pid" >> ${PREFIX}/etc/thttpd.conf.sample
@if [ ! -f ${PREFIX}/etc/rc.d/thttpd.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/thttpd.sh startup file."; \
${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/thttpd.sh; \
${ECHO} "[ -x ${PREFIX}/sbin/thttpd_wrapper ] && ${PREFIX}/sbin/thttpd_wrapper && ${ECHO} -n ' thttpd'" >> ${PREFIX}/etc/rc.d/thttpd.sh; \
${CHMOD} 751 ${PREFIX}/etc/rc.d/thttpd.sh; \
fi
.if !defined(NOPORTDOCS)
@${MKDIR} ${PREFIX}/share/doc/thttpd
@${INSTALL_MAN} ${DISTDIR}/notes.html ${PREFIX}/share/doc/thttpd
.endif
post-install: message
post-install:
@${CAT} ${PKGMESSAGE}
pre-configure: config-message
post-configure: config-message
post-build: config-message
@ -51,17 +77,4 @@ config-message:
@${ECHO} ""
@${ECHO} "====================================================================="
message:
@${ECHO} "====================================================================="
@${ECHO} ""
@${ECHO} "If you want users to be able to create their own web subdirectories"
@${ECHO} "off of the main web directory, you need to:"
@${ECHO} ""
@${ECHO} "a) add a group for www admins"
@${ECHO} "b) chgrp yourgroup ${PREFIX}/bin/makeweb ${PREFIX}/www"
@${ECHO} "c) chmod 2755 ${PREFIX}/bin/makeweb"
@${ECHO} "d) tell them about makeweb(1)"
@${ECHO} ""
@${ECHO} "====================================================================="
.include <bsd.port.mk>

View file

@ -1 +1,2 @@
MD5 (thttpd-2.16.tar.gz) = c095d3b8919cb386dfb5ee35dad2ad42
MD5 (notes.html) = c5fec04bcb3cfbb6c1d590c66441a3e7

11
www/thttpd/pkg-message Normal file
View file

@ -0,0 +1,11 @@
===========================================================================
If you want users to be able to create their own web
subdirectories off of the main web directory, you need to:
a) add a group for www admins
b) chgrp yourgroup ${PREFIX}/bin/makeweb ${PREFIX}/www
c) chmod 2755 ${PREFIX}/bin/makeweb
d) tell them about makeweb(1)
===========================================================================

View file

@ -2,6 +2,9 @@ bin/htpasswd
bin/makeweb
bin/syslogtocern
sbin/thttpd
sbin/thttpd_wrapper
etc/thttpd.conf.sample
etc/rc.d/thttpd.sh
www/cgi-bin/redirect
www/cgi-bin/phf
www/cgi-bin/ssi