# Build wrapper for Nginx # $OpenBSD: Makefile.bsd-wrapper,v 1.12 2013/06/19 16:21:12 reyk Exp $ LNDIR= /usr/bin/lndir .include .if (${MACHINE_ARCH} == "vax") CFLAGS=-O1 ${PIPE} ${DEBUG} .endif CONFIGURE_ARGS= --prefix=/var/www \ --conf-path=/etc/nginx/nginx.conf \ --sbin-path=/usr/sbin/nginx \ --pid-path=/var/run/nginx.pid \ --lock-path=/var/run/nginx.lock \ --http-log-path=logs/access.log \ --error-log-path=logs/error.log \ --http-client-body-temp-path=/var/www/cache/client_body_temp \ --http-proxy-temp-path=/var/www/cache/proxy_temp \ --http-fastcgi-temp-path=/var/www/cache/fastcgi_temp \ --http-scgi-temp-path=/var/www/cache/scgi_temp \ --http-uwsgi-temp-path=/var/www/cache/uwsgi_temp \ --user=www \ --group=www \ --with-http_gzip_static_module \ --with-http_ssl_module \ --with-http_stub_status_module \ --with-ipv6 \ --with-cc-opt="-DNGX_ENABLE_SYSLOG" \ --without-mail_pop3_module \ --without-mail_imap_module \ --without-mail_smtp_module MAN+= ${.OBJDIR}/objs/nginx.8 all: ${.OBJDIR}/objs/ngx_auto_config.h @cd ${.OBJDIR} && ${MAKE} BEFOREMAN=${.OBJDIR}/objs/ngx_auto_config.h ${.OBJDIR}/objs/nginx.8: ${BEFOREMAN} cd ${.OBJDIR} && ${MAKE} -f objs/Makefile manpage ${.OBJDIR}/objs/ngx_auto_config.h: ${.OBJDIR}/configure @cd ${.OBJDIR} && CC="${CC}" LD_SHLIB="${CC}" \ OPTIM="${CFLAGS} ${COPTS}" \ PATH="/sbin:/usr/sbin:/bin:/usr/bin" \ sh configure ${CONFIGURE_ARGS} .if !exists(${.OBJDIR}/configure) ${.OBJDIR}/configure: ${.CURDIR}/configure ${LNDIR} -s -e obj -e obj.${MACHINE_ARCH} -e Makefile.bsd-wrapper ${.CURDIR} .endif .if ${.OBJDIR} == ${.CURDIR} clean: -@cd ${.OBJDIR} && ${MAKE} clean .else clean: @cd ${.OBJDIR} && find . \! -type d -print0 | xargs -0r rm .endif cleandir: clean prereq: # nothing left test: # Nothing here so far... depend: # Nothing here so far... lint: # Nothing here so far... tags: # Nothing here so far... distribution: ${INSTALL} -C -o root -g wheel -m 0644 \ ${.CURDIR}/conf/fastcgi_params \ ${.CURDIR}/conf/koi-utf \ ${.CURDIR}/conf/koi-win \ ${.CURDIR}/conf/mime.types \ ${.CURDIR}/conf/nginx.conf \ ${.CURDIR}/conf/scgi_params \ ${.CURDIR}/conf/uwsgi_params \ ${.CURDIR}/conf/win-utf \ ${DESTDIR}/etc/nginx/ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 0444 \ ${.CURDIR}/html/50x.html \ ${DESTDIR}/var/www/htdocs/ .ifdef NOMAN maninstall: @echo NOMAN is set .endif install: maninstall ${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o ${BINOWN} \ -g ${BINGRP} -m ${BINMODE} objs/nginx ${DESTDIR}/usr/sbin/nginx .include .include .ifndef NOMAN .include .endif