[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / www / nginx

File: [cvs.NetBSD.org] / pkgsrc / www / nginx / Makefile (download)

Revision 1.25, Wed Aug 8 06:44:08 2012 UTC (11 years, 7 months ago) by imil
Branch: MAIN
Changes since 1.24: +2 -2 lines

Changes with nginx 1.2.3                                         07 Aug 2012

    *) Feature: the Clang compiler support.

    *) Bugfix: extra listening sockets might be created.
       Thanks to Roman Odaisky.

    *) Bugfix: nginx/Windows might hog CPU if a worker process failed to
       start.
       Thanks to Ricardo Villalobos Guevara.

    *) Bugfix: the "proxy_pass_header", "fastcgi_pass_header",
       "scgi_pass_header", "uwsgi_pass_header", "proxy_hide_header",
       "fastcgi_hide_header", "scgi_hide_header", and "uwsgi_hide_header"
       directives might be inherited incorrectly.

    *) Bugfix: trailing dot in a source value was not ignored if the "map"
       directive was used with the "hostnames" parameter.

    *) Bugfix: incorrect location might be used to process a request if a
       URI was changed via a "rewrite" directive before an internal redirect
       to a named location.

# $NetBSD: Makefile,v 1.25 2012/08/08 06:44:08 imil Exp $

DISTNAME=		nginx-1.2.3
CATEGORIES=		www
MASTER_SITES=		http://nginx.org/download/
DISTFILES=		${DEFAULT_DISTFILES}

MAINTAINER=		joerg@NetBSD.org
HOMEPAGE=		http://nginx.org/
COMMENT=		Lightweight HTTP server and mail proxy server
LICENSE=		2-clause-bsd

PKG_DESTDIR_SUPPORT=	user-destdir
.include "../../mk/bsd.prefs.mk"

NGINX_USER?=		nginx
NGINX_GROUP?=		nginx
NGINX_DATADIR?=		${VARBASE}/db/nginx
NGINX_LOGDIR?=		${VARBASE}/log/nginx
NGINX_PIDDIR?=		${VARBASE}/run

BUILD_DEFS+=		NGINX_DATADIR NGINX_LOGDIR NGINX_PIDDIR VARBASE

PKG_USERS_VARS+=	NGINX_USER
PKG_GROUPS_VARS+=	NGINX_GROUP
PKG_GROUPS=		${NGINX_GROUP}
PKG_USERS=		${NGINX_USER}:${NGINX_GROUP}

PKG_GECOS.${NGINX_USER}=NGINX server user
PKG_HOME.${NGINX_USER}=	${NGINX_DATADIR}
PKG_SHELL.${NGINX_USER}=${NOLOGIN}

USE_PKGLOCALEDIR=	yes
HAS_CONFIGURE=		yes
CONFIGURE_ARGS+=	--user=${NGINX_USER}
CONFIGURE_ARGS+=	--group=${NGINX_GROUP}
CONFIGURE_ARGS+=	--with-ld-opt=-L${PREFIX}/lib\ -Wl,-R${PREFIX}/lib
CONFIGURE_ARGS+=	--prefix=${PREFIX}
CONFIGURE_ARGS+=	--sbin-path=${PREFIX}/sbin
CONFIGURE_ARGS+=	--conf-path=${PKG_SYSCONFDIR}/nginx.conf
CONFIGURE_ARGS+=	--pid-path=${NGINX_PIDDIR}/nginx.pid
CONFIGURE_ARGS+=	--lock-path=${NGINX_DATADIR}/nginx.lock
CONFIGURE_ARGS+=	--error-log-path=${NGINX_LOGDIR}/error.log
CONFIGURE_ARGS+=	--http-log-path=${NGINX_LOGDIR}/access.log
CONFIGURE_ARGS+=	--http-client-body-temp-path=${NGINX_DATADIR}/client_body_temp
CONFIGURE_ARGS+=	--http-proxy-temp-path=${NGINX_DATADIR}/proxy_temp
CONFIGURE_ARGS+=	--http-fastcgi-temp-path=${NGINX_DATADIR}/fstcgi_temp

.include "../../mk/bsd.prefs.mk"

PKG_SYSCONFSUBDIR=	nginx

.include "options.mk"

EGDIR=			${PREFIX}/share/examples/nginx
EGFILES+=		fastcgi.conf fastcgi_params koi-utf koi-win \
			mime.types nginx.conf win-utf

.for file in ${EGFILES}
CONF_FILES+=	${EGDIR}/conf/${file} ${PKG_SYSCONFDIR}/${file}
.	if !empty(PKG_OPTIONS:Mnaxsi)
CONF_FILES+=	${EGDIR}/conf/naxsi_core.rules
CONF_FILES+=	${PKG_SYSCONFDIR}/naxsi_core.rules
.	endif
.endfor

RCD_SCRIPTS=		nginx

INSTALLATION_DIRS=	${PKGMANDIR}/man8 sbin share/examples/nginx/conf \
			share/examples/nginx/html
MAKE_DIRS+=		${NGINX_PIDDIR}
OWN_DIRS=		${NGINX_LOGDIR}
OWN_DIRS_PERMS+=	${NGINX_DATADIR} ${NGINX_USER} ${NGINX_GROUP} 0700

BUILD_TARGET=		build

SUBST_CLASSES+=		paths
SUBST_STAGE.paths=	pre-configure
SUBST_FILES.paths=	conf/nginx.conf
SUBST_SED.paths=	-e 's,%%PKG_SYSCONFDIR%%,${PKG_SYSCONFDIR},g'
SUBST_SED.paths+=	-e 's,%%NGINX_LOGDIR%%,${NGINX_LOGDIR},g'
SUBST_SED.paths+=	-e 's,%%NGINX_PIDDIR%%,${NGINX_PIDDIR},g'
SUBST_SED.paths+=	-e 's,%%NGINX_USER%%,${NGINX_USER},g'
SUBST_SED.paths+=	-e 's,%%NGINX_GROUP%%,${NGINX_GROUP},g'

MESSAGE_SUBST+=		NGINX_LOGDIR=${NGINX_LOGDIR}
MESSAGE_SUBST+=		NGINX_PIDDIR=${NGINX_PIDDIR}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${DESTDIR}${PREFIX}/sbin/nginx
.for file in ${EGFILES}
	${INSTALL_DATA} ${WRKSRC}/conf/${file} ${DESTDIR}${EGDIR}/conf/${file}
.endfor
	${INSTALL_DATA} ${WRKSRC}/html/50x.html ${DESTDIR}${EGDIR}/html/50x.html
	${INSTALL_DATA} ${WRKSRC}/html/index.html ${DESTDIR}${EGDIR}/html/index.html
	${INSTALL_MAN} ${WRKSRC}/man/nginx.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
.if !empty(PKG_OPTIONS:Mnaxsi)
	${INSTALL_DATA} ${WRKDIR}/${NAXSI}/naxsi_config/naxsi_core.rules ${DESTDIR}${EGDIR}/conf
.endif


.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"