pkgsrc/www/thttpd/Makefile

56 lines
1.7 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.30 2005/04/11 21:48:02 tv Exp $
Update to 2.25b, provided by Michael Santos in PR pkg/24128. Changes: New in version 2.25b: * Move fdwatch initialization before the chroot, so that /dev/poll can work. * Multiple fdwatch cleanups and fixes (Adam Zell). New in version 2.25: * Prohibit "Host: ." and "Host: .." (David Leadbeater). * Don't free memory prematurely on SIGUSR1 (A.D.F.). * Use the specified charset in directory listings and errors (Jonas Ohlsson). * Lowered THROTTLE_TIME from 60 seconds to 2 seconds, plus more aggressive computation of sending rate, to improve throttle reaction time (E Frank Ball). * Added code to redistribute the throttled bandwidth fairly among the currently sending connections. * Some more throttling changes that smooth things out a lot. * Added an experimental limitation on the number of simultaneous CGIs. * Chown the log file when starting as root, so that it can later be re-opened when running as nobody (or whatever user you configure). Also tweak the logfile pathname so that it still works inside a chroot tree. * Make sure URL paths begin with a slash. * Generate multiple MIME encodings in the correct order, and with the correct separator. * Ignore EINTR on read() and write(). * Fix error in httpd_read_fully() and httpd_write_fully() that could cause incorrect data to be read or written (Daniel Jensen). * Don't attempt to double-free a file descriptor if a connection times out while it is paused for throttling. * Save and restore errno in signal handlers. * The non-local referer check is no longer fooled by URLs with query strings. * Simplified handling of HAVE_INT64T (Trisk). If this causes problems, e.g. if there are still systems which don't have "long long", we can back out the change. * Keep a list of free connection structs, instead of doing linear search to find a free one (Adam Zell). * Added config.h option FLUSH_LOG_EVERY_TIME - if it's turned off, the log does not get fflushed after each request (Adam Zell). * Multiple robustness improvements to the fdwatch module (Adam Zell). * Added /dev/poll support to fdwatch (Adam Zell). * Automatically add no-cache control header on error responses.
2004-01-17 13:55:05 +01:00
DISTNAME= thttpd-2.25b
PKGREVISION= 2
CATEGORIES= www
MASTER_SITES= http://www.acme.com/software/thttpd/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
sitedrivenby.gif
MAINTAINER= mike@ethmoid.org
HOMEPAGE= http://www.acme.com/software/thttpd/
COMMENT= Tiny/turbo/throttling HTTP server
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
2004-02-22 19:34:54 +01:00
GNU_CONFIGURE= yes
USE_PKGINSTALL= yes
Update to V2.15. Main reason: IPv6. Changes: New in version 2.15: * Use standard isxdigit macro instead of is_hexit routine. * Portability fix for Debian, which lacks gai_strerror(). * Fix for .htpasswd authorization, broken by 2.14's custom error pages change. New in version 2.14: * Fix to non-local referer code - it was trying to dereference a null pointer under some circumstances. * Fix to If-Modified-Since - some leap year problems. * Rewrote match() - it was using a whole lot of CPU time for patterns with lots of |'s, such as those used by the new non-local-referer filtering. * Fix to host lookup code for -h flag. * Fix custom error pages to work with 401 Unauthorized. * Removed unused variable. New in version 2.13: * Portability fix for fdwatch on systems with poll() but not select(). * Renamed nph-redirect to redirect, now that thttpd does header parsing. * Always chdir to / after a chroot. * Some minor de-linting changes. * Revived code that closes stdin/stdout/stderr, after adding a fix in the CGI code to prevent descriptors from getting screwed up. * Bugfix for CGI header parsing - if the CGI was sending binary data (e.g. images), the result could get truncated or corrupted. * Disallow ".." listing of virtual host directory. * Revised snprintf portability fix. * Rearranged the hc initialization so it's all in one place. * New IPv6 code from KIKUCHI Takahiro. * New non-local referer filtering code from Craig Leres. * New custom error pages code from Catalin Ionescu. New in version 2.12: * Better heuristic for deciding between select() and poll(). * Added Red Hat RPM spec file. New in version 2.11: * Use poll() instead of select() when favorable. * Do lazy allocation of part of the connection data structure, to save on memory now that we can have thousands of simultaneous connections. * Some speed optimizations. * Add HTTP_HOST to CGI environment. * Bugfix for rare uninitialized variable. New in version 2.10: * Bugfix for CGI header parsing. * Call setlogin() if it's available.
2000-02-09 21:55:27 +01:00
# Note: this pkg auto-detects IPv6 without regarding USE_INET6.
BUILD_DEFS+= USE_INET6
# thttpd syslogs at level LOG_DAEMON by default
# change this to your preferred syslog level
THTTPD_LOG_FACILITY?= LOG_DAEMON
BUILD_DEFS+= THTTPD_LOG_FACILITY
Update to V2.15. Main reason: IPv6. Changes: New in version 2.15: * Use standard isxdigit macro instead of is_hexit routine. * Portability fix for Debian, which lacks gai_strerror(). * Fix for .htpasswd authorization, broken by 2.14's custom error pages change. New in version 2.14: * Fix to non-local referer code - it was trying to dereference a null pointer under some circumstances. * Fix to If-Modified-Since - some leap year problems. * Rewrote match() - it was using a whole lot of CPU time for patterns with lots of |'s, such as those used by the new non-local-referer filtering. * Fix to host lookup code for -h flag. * Fix custom error pages to work with 401 Unauthorized. * Removed unused variable. New in version 2.13: * Portability fix for fdwatch on systems with poll() but not select(). * Renamed nph-redirect to redirect, now that thttpd does header parsing. * Always chdir to / after a chroot. * Some minor de-linting changes. * Revived code that closes stdin/stdout/stderr, after adding a fix in the CGI code to prevent descriptors from getting screwed up. * Bugfix for CGI header parsing - if the CGI was sending binary data (e.g. images), the result could get truncated or corrupted. * Disallow ".." listing of virtual host directory. * Revised snprintf portability fix. * Rearranged the hc initialization so it's all in one place. * New IPv6 code from KIKUCHI Takahiro. * New non-local referer filtering code from Craig Leres. * New custom error pages code from Catalin Ionescu. New in version 2.12: * Better heuristic for deciding between select() and poll(). * Added Red Hat RPM spec file. New in version 2.11: * Use poll() instead of select() when favorable. * Do lazy allocation of part of the connection data structure, to save on memory now that we can have thousands of simultaneous connections. * Some speed optimizations. * Add HTTP_HOST to CGI environment. * Bugfix for rare uninitialized variable. New in version 2.10: * Bugfix for CGI header parsing. * Call setlogin() if it's available.
2000-02-09 21:55:27 +01:00
EGDIR= ${PREFIX}/share/examples
CONF_FILES= ${EGDIR}/thttpd.conf ${PKG_SYSCONFDIR}/thttpd.conf
RCD_SCRIPTS= thttpd
2004-02-22 19:34:54 +01:00
INSTALLATION_DIRS= share/thttpd
pre-configure:
Update to V2.15. Main reason: IPv6. Changes: New in version 2.15: * Use standard isxdigit macro instead of is_hexit routine. * Portability fix for Debian, which lacks gai_strerror(). * Fix for .htpasswd authorization, broken by 2.14's custom error pages change. New in version 2.14: * Fix to non-local referer code - it was trying to dereference a null pointer under some circumstances. * Fix to If-Modified-Since - some leap year problems. * Rewrote match() - it was using a whole lot of CPU time for patterns with lots of |'s, such as those used by the new non-local-referer filtering. * Fix to host lookup code for -h flag. * Fix custom error pages to work with 401 Unauthorized. * Removed unused variable. New in version 2.13: * Portability fix for fdwatch on systems with poll() but not select(). * Renamed nph-redirect to redirect, now that thttpd does header parsing. * Always chdir to / after a chroot. * Some minor de-linting changes. * Revived code that closes stdin/stdout/stderr, after adding a fix in the CGI code to prevent descriptors from getting screwed up. * Bugfix for CGI header parsing - if the CGI was sending binary data (e.g. images), the result could get truncated or corrupted. * Disallow ".." listing of virtual host directory. * Revised snprintf portability fix. * Rearranged the hc initialization so it's all in one place. * New IPv6 code from KIKUCHI Takahiro. * New non-local referer filtering code from Craig Leres. * New custom error pages code from Catalin Ionescu. New in version 2.12: * Better heuristic for deciding between select() and poll(). * Added Red Hat RPM spec file. New in version 2.11: * Use poll() instead of select() when favorable. * Do lazy allocation of part of the connection data structure, to save on memory now that we can have thousands of simultaneous connections. * Some speed optimizations. * Add HTTP_HOST to CGI environment. * Bugfix for rare uninitialized variable. New in version 2.10: * Bugfix for CGI header parsing. * Call setlogin() if it's available.
2000-02-09 21:55:27 +01:00
${MV} ${WRKSRC}/extras/htpasswd.1 ${WRKSRC}/extras/thtpasswd.1
${MV} ${WRKSRC}/extras/htpasswd.c ${WRKSRC}/extras/thtpasswd.c
2002-06-16 21:12:13 +02:00
for FILE in thttpd.8 extras/Makefile.in extras/thtpasswd.c; do \
${MV} -f ${WRKSRC}/$${FILE} ${WRKSRC}/$${FILE}.bak; \
2002-05-12 16:47:28 +02:00
${SED} -e "s,\.htpasswd,XXX,g;s,htpasswd,thtpasswd,g;s,XXX,.htpasswd,g" \
2002-06-16 21:12:13 +02:00
${WRKSRC}/$${FILE}.bak > ${WRKSRC}/$${FILE}; \
done
${MV} -f ${WRKSRC}/config.h ${WRKSRC}/config.h.bak
${SED} -e "s/LOG_DAEMON/${THTTPD_LOG_FACILITY}/" ${WRKSRC}/config.h.bak \
> ${WRKSRC}/config.h
post-build:
2004-02-22 19:34:54 +01:00
@for FILE in thttpd.conf; do \
${SED} ${FILES_SUBST_SED} \
2002-06-16 21:12:13 +02:00
${FILESDIR}/$${FILE} > ${WRKDIR}/$${FILE}; \
done
post-install:
${INSTALL_DATA} ${WRKDIR}/thttpd.conf ${PREFIX}/share/examples
${INSTALL_DATA} ${WRKSRC}/index.html ${PREFIX}/share/thttpd
${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${PREFIX}/share/thttpd
.include "../../mk/bsd.pkg.mk"