2017-01-09 15:56:27 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.105 2017/01/09 15:56:27 naddy Exp $
|
2015-11-20 19:49:45 +00:00
|
|
|
|
2016-02-25 02:19:14 +00:00
|
|
|
BROKEN-arm= src/core/ngx_rwlock.c:116:2: error: \#error ngx_atomic_cmp_set() is not defined!
|
2015-11-20 19:49:45 +00:00
|
|
|
BROKEN-hppa= src/core/ngx_rwlock.c:116:2: error: \#error ngx_atomic_cmp_set() is not defined!
|
2014-08-26 19:43:58 +00:00
|
|
|
|
2016-11-04 22:13:43 +00:00
|
|
|
COMMENT-main= robust and small HTTP server and mail proxy server
|
|
|
|
COMMENT-image_filter= nginx image filter module
|
|
|
|
COMMENT-geoip= nginx GeoIP module
|
|
|
|
COMMENT-xslt= nginx XSLT filter module
|
|
|
|
COMMENT-mailproxy= nginx mail proxy module
|
|
|
|
COMMENT-stream= nginx TCP/UDP proxy module
|
|
|
|
COMMENT-naxsi= nginx web application firewall module
|
|
|
|
COMMENT-lua= nginx lua scripting module
|
2017-01-08 19:37:13 +00:00
|
|
|
COMMENT-perl= nginx perl scripting module
|
|
|
|
COMMENT-passenger= nginx passenger (ruby/python/nodejs) integration module
|
2014-08-26 19:43:58 +00:00
|
|
|
|
2016-10-26 08:06:59 +00:00
|
|
|
VERSION= 1.10.2
|
2014-08-26 19:43:58 +00:00
|
|
|
DISTNAME= nginx-${VERSION}
|
|
|
|
CATEGORIES= www
|
|
|
|
|
2016-11-04 22:13:43 +00:00
|
|
|
PKGNAME-main= ${DISTNAME}
|
|
|
|
PKGNAME-image_filter= nginx-image_filter-${VERSION}
|
|
|
|
PKGNAME-geoip= nginx-geoip-${VERSION}
|
|
|
|
PKGNAME-xslt= nginx-xslt-${VERSION}
|
|
|
|
PKGNAME-mailproxy= nginx-mailproxy-${VERSION}
|
|
|
|
PKGNAME-stream= nginx-stream-${VERSION}
|
|
|
|
PKGNAME-naxsi= nginx-naxsi-${VERSION}
|
|
|
|
PKGNAME-lua= nginx-lua-${VERSION}
|
|
|
|
PKGNAME-perl= nginx-perl-${VERSION}
|
|
|
|
PKGNAME-passenger= nginx-passenger-${VERSION}
|
|
|
|
|
2017-01-08 19:38:12 +00:00
|
|
|
REVISION-main= 1
|
2017-01-09 15:56:27 +00:00
|
|
|
REVISION-perl= 0
|
|
|
|
REVISION-passenger= 0
|
2016-11-04 22:13:43 +00:00
|
|
|
|
2014-08-26 19:43:58 +00:00
|
|
|
MASTER_SITES= http://nginx.org/download/
|
2016-11-04 22:13:43 +00:00
|
|
|
MASTER_SITES0= https://github.com/simpl/ngx_devel_kit/archive/
|
2014-08-26 19:43:58 +00:00
|
|
|
MASTER_SITES1= https://github.com/nbs-system/naxsi/archive/
|
2016-11-04 22:13:43 +00:00
|
|
|
MASTER_SITES2= https://github.com/openresty/lua-nginx-module/archive/
|
2016-02-27 12:47:32 +00:00
|
|
|
MASTER_SITES3= https://raw.githubusercontent.com/rnagy/nginx_chroot_patch/master/
|
2014-08-26 19:43:58 +00:00
|
|
|
|
2016-11-04 22:13:43 +00:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
|
|
|
ngx_devel_kit-v0.3.0.tar.gz{v0.3.0.tar.gz}:0 \
|
|
|
|
naxsi-0.55.1.tar.gz{0.55.1.tar.gz}:1 \
|
|
|
|
lua-nginx-module-v0.10.6.tar.gz{v0.10.6.tar.gz}:2
|
|
|
|
|
2014-08-26 19:43:58 +00:00
|
|
|
HOMEPAGE= http://nginx.org/
|
|
|
|
|
|
|
|
MAINTAINER= Robert Nagy <robert@openbsd.org>, \
|
|
|
|
William Yodlowsky <william@openbsd.org>
|
|
|
|
|
|
|
|
# BSD-like
|
|
|
|
PERMIT_PACKAGE_CDROM= yes
|
|
|
|
|
2016-11-04 22:13:43 +00:00
|
|
|
MULTI_PACKAGES = -main -image_filter -geoip -xslt -mailproxy -stream -naxsi -lua -perl -passenger
|
2014-08-26 19:43:58 +00:00
|
|
|
|
2016-11-04 22:13:43 +00:00
|
|
|
WANTLIB-main= c z pcre ssl crypto
|
2017-01-08 19:37:13 +00:00
|
|
|
WANTLIB-mailproxy=
|
|
|
|
WANTLIB-stream=
|
2016-11-04 22:13:43 +00:00
|
|
|
WANTLIB-image_filter= gd
|
|
|
|
WANTLIB-geoip= GeoIP
|
2017-01-08 19:37:13 +00:00
|
|
|
WANTLIB-xslt= exslt xml2 xslt
|
|
|
|
WANTLIB-naxsi=
|
2016-11-04 22:13:43 +00:00
|
|
|
WANTLIB-lua= ${MODLUA_WANTLIB} m
|
|
|
|
WANTLIB-perl= c m perl
|
|
|
|
WANTLIB-passenger= m pthread stdc++
|
2014-08-26 19:43:58 +00:00
|
|
|
|
2016-11-04 22:13:43 +00:00
|
|
|
BUILD_DEPENDS+= ${MODRUBY_PKG_PREFIX}-passenger-*:www/ruby-passenger
|
2014-08-26 19:43:58 +00:00
|
|
|
|
2016-11-04 22:13:43 +00:00
|
|
|
LIB_DEPENDS-main= devel/pcre
|
|
|
|
LIB_DEPENDS-xslt= textproc/libxml \
|
|
|
|
textproc/libxslt
|
|
|
|
LIB_DEPENDS-image_filter=graphics/gd
|
|
|
|
LIB_DEPENDS-geoip= net/GeoIP
|
|
|
|
|
|
|
|
RUN_DEPENDS-mailproxy= www/nginx,-main=${VERSION}
|
|
|
|
RUN_DEPENDS-stream= www/nginx,-main=${VERSION}
|
|
|
|
RUN_DEPENDS-image_filter=www/nginx,-main=${VERSION}
|
|
|
|
RUN_DEPENDS-geoip= www/nginx,-main=${VERSION}
|
|
|
|
RUN_DEPENDS-xslt= www/nginx,-main=${VERSION}
|
|
|
|
RUN_DEPENDS-naxsi= www/nginx,-main=${VERSION}
|
|
|
|
RUN_DEPENDS-lua= www/nginx,-main=${VERSION}
|
|
|
|
RUN_DEPENDS-perl= www/nginx,-main=${VERSION}
|
|
|
|
RUN_DEPENDS-passenger= www/nginx,-main=${VERSION} \
|
|
|
|
ruby-passenger-*|ruby21-passenger-*|ruby22-passenger-*|ruby23-passenger-*:www/ruby-passenger
|
2015-01-02 19:32:39 +00:00
|
|
|
|
2016-11-04 22:13:43 +00:00
|
|
|
NGINX_DIR= /var/www
|
|
|
|
SUBST_VARS= NGINX_DIR
|
|
|
|
NGINX_MODULES_DIR= ${NGINX_DIR}/modules
|
|
|
|
|
|
|
|
PREFIX-mailproxy= ${NGINX_MODULES_DIR}
|
|
|
|
PREFIX-stream= ${NGINX_MODULES_DIR}
|
|
|
|
PREFIX-image_filter= ${NGINX_MODULES_DIR}
|
|
|
|
PREFIX-geoip= ${NGINX_MODULES_DIR}
|
|
|
|
PREFIX-xslt= ${NGINX_MODULES_DIR}
|
|
|
|
PREFIX-lua= ${NGINX_MODULES_DIR}
|
|
|
|
PREFIX-passenger= ${NGINX_MODULES_DIR}
|
|
|
|
|
|
|
|
CFLAGS+= -Wall -Wpointer-arith \
|
|
|
|
-I "${LOCALBASE}/include/libxml2" \
|
|
|
|
-I "${LOCALBASE}/include" \
|
|
|
|
-L "${X11BASE}/lib"
|
|
|
|
|
|
|
|
MODULES+= lang/ruby lang/lua
|
|
|
|
MODRUBY_BUILDDEP= No
|
|
|
|
MODRUBY_RUNDEP= No
|
2014-10-23 12:13:12 +00:00
|
|
|
|
2016-11-04 22:13:43 +00:00
|
|
|
PATCHFILES+= nginx-${VERSION}-chroot.patch:3
|
|
|
|
PATCH_DIST_STRIP= -p1
|
2014-08-26 19:43:58 +00:00
|
|
|
|
|
|
|
CONFIGURE_STYLE= simple
|
2016-11-04 22:13:43 +00:00
|
|
|
CONFIGURE_ENV+= MODLUA_INCL_DIR=${MODLUA_INCL_DIR} \
|
|
|
|
MODLUA_LIB=${MODLUA_LIB}
|
2014-08-26 19:43:58 +00:00
|
|
|
CONFIGURE_ARGS+= --prefix=${NGINX_DIR} \
|
|
|
|
--conf-path=${SYSCONFDIR}/nginx/nginx.conf \
|
|
|
|
--sbin-path=${PREFIX}/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=${NGINX_DIR}/cache/client_body_temp \
|
|
|
|
--http-proxy-temp-path=${NGINX_DIR}/cache/proxy_temp \
|
|
|
|
--http-fastcgi-temp-path=${NGINX_DIR}/cache/fastcgi_temp \
|
|
|
|
--http-scgi-temp-path=${NGINX_DIR}/cache/scgi_temp \
|
|
|
|
--http-uwsgi-temp-path=${NGINX_DIR}/cache/uwsgi_temp \
|
|
|
|
--user=www \
|
|
|
|
--group=www \
|
2016-11-04 22:13:43 +00:00
|
|
|
--with-http_image_filter_module=dynamic \
|
|
|
|
--with-http_geoip_module=dynamic \
|
2014-08-26 19:43:58 +00:00
|
|
|
--with-http_gzip_static_module \
|
2017-01-08 19:38:12 +00:00
|
|
|
--with-http_gunzip_module \
|
2016-11-04 22:13:43 +00:00
|
|
|
--with-http_perl_module=dynamic \
|
2016-05-06 15:07:38 +00:00
|
|
|
--with-http_realip_module \
|
|
|
|
--with-http_slice_module \
|
2014-08-26 19:43:58 +00:00
|
|
|
--with-http_ssl_module \
|
|
|
|
--with-http_stub_status_module \
|
2015-09-22 16:50:02 +00:00
|
|
|
--with-http_v2_module \
|
2016-11-04 22:13:43 +00:00
|
|
|
--with-http_xslt_module=dynamic \
|
|
|
|
--with-mail=dynamic \
|
2014-08-26 19:43:58 +00:00
|
|
|
--with-ipv6 \
|
2016-11-04 22:13:43 +00:00
|
|
|
--with-stream=dynamic \
|
|
|
|
--add-dynamic-module=${WRKSRC}/naxsi/naxsi_src/ \
|
|
|
|
--add-dynamic-module=${WRKSRC}/ngx_devel_kit \
|
|
|
|
--add-dynamic-module=${WRKSRC}/lua-nginx-module \
|
|
|
|
--add-dynamic-module=${LOCALBASE}/lib/phusion-passenger${GEM_BIN_SUFFIX}/src/nginx_module
|
2014-08-26 19:43:58 +00:00
|
|
|
|
2016-11-04 22:13:43 +00:00
|
|
|
SUBSTFILES= conf/nginx.conf \
|
|
|
|
lua-nginx-module/config
|
2014-08-26 19:43:58 +00:00
|
|
|
|
|
|
|
NO_TEST= Yes
|
|
|
|
ALL_TARGET=
|
|
|
|
|
|
|
|
pre-patch:
|
|
|
|
cd ${WRKSRC} && \
|
|
|
|
mv ../naxsi-* naxsi
|
|
|
|
cd ${WRKSRC} && \
|
2014-09-21 14:00:16 +00:00
|
|
|
mv ../ngx_devel_kit-* ngx_devel_kit && \
|
2016-11-04 22:13:43 +00:00
|
|
|
mv ../lua-nginx-module-* lua-nginx-module
|
2014-08-26 19:43:58 +00:00
|
|
|
|
|
|
|
pre-configure:
|
|
|
|
@cd ${WRKSRC} && ${SUBST_CMD} ${SUBSTFILES}
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/nginx/
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${PREFIX}/sbin
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/objs/nginx.8 ${PREFIX}/man/man8/
|
|
|
|
.for i in koi-win koi-utf win-utf mime.types nginx.conf \
|
|
|
|
fastcgi_params scgi_params uwsgi_params
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/conf/${i} ${PREFIX}/share/nginx/
|
|
|
|
.endfor
|
2016-11-04 22:13:43 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/naxsi/naxsi_config/naxsi_core.rules \
|
|
|
|
${PREFIX}/share/nginx/
|
2014-08-26 19:43:58 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/nginx/html/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/html/* ${PREFIX}/share/nginx/html/
|
2016-11-04 22:13:43 +00:00
|
|
|
${INSTALL_DATA_DIR} ${WRKINST}/var/www/modules/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/objs/*.so ${WRKINST}/var/www/modules/
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/libdata/perl5/site_perl/${ARCH}-openbsd/auto/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/objs/src/http/modules/perl/blib/lib/nginx.pm \
|
|
|
|
${PREFIX}/libdata/perl5/site_perl/${ARCH}-openbsd/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.so \
|
|
|
|
${PREFIX}/libdata/perl5/site_perl/${ARCH}-openbsd/
|
2014-08-26 19:43:58 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|