diff options
author | flz <flz@FreeBSD.org> | 2005-06-26 19:33:02 +0800 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2005-06-26 19:33:02 +0800 |
commit | 8acac3ed4a01310da88d4bb3340d5141fac4f1c3 (patch) | |
tree | 1a45fc5ebb5a42ed6f1848ffcc6bf1b85b0c47d9 /www/fnord | |
parent | c6028226c5b8449ce5a359c2676e247815171332 (diff) | |
download | freebsd-ports-gnome-8acac3ed4a01310da88d4bb3340d5141fac4f1c3.tar.gz freebsd-ports-gnome-8acac3ed4a01310da88d4bb3340d5141fac4f1c3.tar.zst freebsd-ports-gnome-8acac3ed4a01310da88d4bb3340d5141fac4f1c3.zip |
- Add OPTIONS to enable/disable support for : CGI, Directory listing,
System symlink dereferencing and Old style redirections.
Diffstat (limited to 'www/fnord')
-rw-r--r-- | www/fnord/Makefile | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/www/fnord/Makefile b/www/fnord/Makefile index b8d99ec6ecfa..811340274b80 100644 --- a/www/fnord/Makefile +++ b/www/fnord/Makefile @@ -18,10 +18,57 @@ RUN_DEPENDS= setuidgid:${PORTSDIR}/sysutils/daemontools \ USE_GMAKE= yes USE_BZIP2= yes +USE_REINPLACE= yes PLIST_FILES= bin/fnord \ bin/fnord-conf +OPTIONS= CGI "Enable CGI support" on \ + DIR_LIST "Enable directory listing" on \ + SYSTEM_SYMLINK_DEREF "Enable system symlink (needs DIR_LIST)" off \ + OLD_STYLE_REDIRECT "Enable old style redirection" off + +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_CGI) +SED_SCRIPT+= -e "s|^// \(\#define CGI\).*|\1|" +.endif + +# HOPE YOU KNOW WHAT YOU'RE LINKING ! +# +# e.g.: if a file foo is a symlink to /etc/passwd and you don't have a +# chroot enviroment then the system-wide /etc/passwd is provided !!! +# +# If the symlink is dangling OR this option is not active the symlink is +# provided as a new http-uri. +# +# e.g.: is foo a symlink to /etc/passwd than the client gets a href to +# http://<vhost>/etc/passwd */ + +.if defined(WITH_SYSTEM_SYMLINK_DEREF) +.if defined(WITHOUT_DIR_LIST) +IGNORE= SYSTEM_SYMLINK_DEREF has no effect if DIR_LIST is not enabled +.endif +SED_SCRIPT+= -e "s|^/\* \(\#define SYSTEM_SYMLINK_DEREF\).*|\1|" +.endif + +.if !defined(WITHOUT_DIR_LIST) +SED_SCRIPT+= -e "s|^/\* \(\#define DIR_LIST\).*|\1|" +.endif + +# If a file is not found locally, and $REDIRECT_HOST is set, fnord will +# issue a redirect to strcat($REDIRECT_HOST,uri). Otherwise, if +# $REDIRECT_URI is set, fnord will issue a redirect to $REDIRECT_URI. +# Only if those fail will a 404 error be returned. */ + +.if defined(WITH_OLD_STYLE_REDIRECT) +SED_SCRIPT+= -e "s|^/\* \(\#define OLD_STYLE_REDIRECT\).*|\1|" +.endif + +post-patch: + [ -z '${SED_SCRIPT}' ] || \ + ${REINPLACE_CMD} ${SED_SCRIPT} ${WRKSRC}/httpd.c + do-build: cd ${WRKSRC}; ${GMAKE} DIET="" @@ -29,4 +76,4 @@ do-install: ${INSTALL_PROGRAM} ${WRKSRC}/fnord ${PREFIX}/bin/ ${INSTALL_SCRIPT} ${WRKSRC}/fnord-conf ${PREFIX}/bin/ -.include <bsd.port.mk> +.include <bsd.port.post.mk> |