6832a16900
Bug Fixes: Correct some invalid HTML in the message files. Fix some memory leaks, free some unfreed memory, check some pointers, close some files. Don't send the extra arguments to POST requests that WWWOFFLE uses internally. Removed segmentation fault potential when password not used in config file. Another fix for the cookie problem. Warn if running as root. Try both IPv6 and IPv4 socket binding (IPv6 may not accept IPv4). Potential bug fix for page corruption. Potential fix for IPv6 configuration on Solaris. New Features: Add an option to have case-insensitive matching for URL-SPEC path and args. Added the option to only fetch images on the same host (automatic fetching). Allow URL-SPECs to contain an '=' sign embedded in them (long time bug fix). The monitor options page now accepts ranges of hours or days (e.g. '1-5n'). [Note: The change to IPv6 binding to not require IPv4-mapped addresses was already present in the package as "patch-ac".] [Note: TODO: Have the package create a user, and let the "rc.d" script run wwwoffle as that user.] Also, reorder ${MASTER_SITES} to comply with the request on the download page, and work around an install target corner case for the benefit of bulk build machines (only applies for hosts on which wwwoffle has never run).
91 lines
3.3 KiB
Makefile
91 lines
3.3 KiB
Makefile
# $NetBSD: Makefile,v 1.44 2002/09/05 16:56:54 fredb Exp $
|
|
|
|
DISTNAME= wwwoffle-2.7e
|
|
CATEGORIES= www
|
|
MASTER_SITES= ${MASTER_SITE_SUNSITE:=apps/www/servers/} \
|
|
ftp://ftp.demon.co.uk/pub/unix/httpd/ \
|
|
http://www.gedanken.freeserve.co.uk/download-wwwoffle/
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
MAINTAINER= fredb@netbsd.org
|
|
HOMEPAGE= http://www.gedanken.demon.co.uk/wwwoffle/
|
|
COMMENT= WWW proxy with support for offline browsing
|
|
|
|
USE_GMAKE= yes
|
|
GNU_CONFIGURE= yes
|
|
|
|
CONFIGURE_ARGS+= --with-confdir=${PKG_SYSCONFDIR}
|
|
CONFIGURE_ARGS+= --with-spooldir=/var/wwwoffle
|
|
|
|
PKG_SYSCONFSUBDIR= wwwoffle
|
|
PLIST_SUBST+= GTAR="${GTAR}" PKG_SYSCONFDIR="${PKG_SYSCONFDIR}"
|
|
INSTALL_FILE= ${WRKDIR}/INSTALL
|
|
|
|
post-build:
|
|
cd ${WRKSRC}/cache/search/htdig/scripts; \
|
|
for f in wwwoffle-ht*; do \
|
|
${MV} $$f $$f.old; \
|
|
${SED} -e '/htsearch/s#^#${PREFIX}/libexec/cgi-bin/#' \
|
|
-e 's#/usr/local#${PREFIX}#' $$f.old > $$f; \
|
|
${RM} $$f.old; \
|
|
done
|
|
${SED} -e 's#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g' \
|
|
-e 's#@PREFIX@#${PREFIX}#g' \
|
|
${FILESDIR}/wwwoffled > ${WRKDIR}/wwwoffled
|
|
${SED} -e 's#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g' \
|
|
INSTALL > ${WRKDIR}/INSTALL
|
|
|
|
# For bulk-build machines: a one-time install/deinstall, if wwwoffle
|
|
# is never run, leaves an incomplete cache directory, which the install
|
|
# target incorrectly calculates to be a pre-2.2 cache. This tricks it
|
|
# into setting up the cache directory properly.
|
|
pre-install:
|
|
${MKDIR} /var/wwwoffle/prevtime1
|
|
|
|
post-install:
|
|
if [ -f ${PKG_SYSCONFDIR}/wwwoffle.conf.install ]; then \
|
|
${CP} -p ${PKG_SYSCONFDIR}/wwwoffle.conf.install \
|
|
${PREFIX}/share/examples/wwwoffle.conf; \
|
|
elif [ -f ${PKG_SYSCONFDIR}/wwwoffle.conf ]; then \
|
|
${CP} -p ${PKG_SYSCONFDIR}/wwwoffle.conf \
|
|
${PREFIX}/share/examples/wwwoffle.conf; \
|
|
fi
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/convert-cache \
|
|
${PREFIX}/sbin/wwwoffle-convert-cache
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/uncompress-cache \
|
|
${PREFIX}/sbin/wwwoffle-uncompress-cache
|
|
${INSTALL_SCRIPT} ${WRKSRC}/conf/upgrade-config.pl \
|
|
${PREFIX}/sbin/wwwoffle-upgrade-config.pl
|
|
${INSTALL_SCRIPT} ${WRKSRC}/conf/upgrade-config-2.x-2.5.pl \
|
|
${PREFIX}/sbin/wwwoffle-upgrade-config-2.x-2.5.pl
|
|
${INSTALL_SCRIPT} ${WRKDIR}/wwwoffled ${PREFIX}/etc/rc.d
|
|
# Directories other than html and search are automatically created at run time
|
|
${GTAR} czCf / ${PREFIX}/libdata/wwwoffle-spool.tar.gz \
|
|
var/wwwoffle/html var/wwwoffle/search
|
|
@${ECHO}
|
|
@${ECHO} ==+===+===+===+===+===+===+===+===+===+===+===+===+===+===+=
|
|
@${ECHO}
|
|
@${ECHO} Attention pkgsrc source users:
|
|
@${ECHO}
|
|
@${ECHO} 'Please run' "\`make finish'" 'from this directory *after*'
|
|
@${ECHO} '(optionally) running' "\`make package'", 'in order to fix'
|
|
@${ECHO} 'up the installed "wwwoffle.pac" files to your hostname'
|
|
@${ECHO} 'and convert your config file and cache to the new format.'
|
|
@${ECHO}
|
|
@${ECHO} ==+===+===+===+===+===+===+===+===+===+===+===+===+===+===+=
|
|
@${ECHO}
|
|
|
|
# We don't do the following automatically, as that would inconvenience
|
|
# package build machines, not to mention putting the wrong information
|
|
# into the "wwwoffle.pac" files.
|
|
finish:
|
|
${SETENV} CONFDIR="${PKG_SYSCONFDIR}" PKG_PREFIX="${PREFIX}" \
|
|
${SH} INSTALL _ POST-INSTALL
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
.if defined(USE_INET6) && ${USE_INET6} == "YES"
|
|
CONFIGURE_ARGS+= --with-ipv6
|
|
.endif
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|