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

Annotation of pkgsrc/www/nginx-devel/Makefile, Revision 1.84

1.84    ! osa         1: # $NetBSD: Makefile,v 1.83 2022/06/28 11:37:07 wiz Exp $
1.34      adam        2:
1.84    ! osa         3: DISTNAME=      nginx-1.23.0
1.76      gutterid    4: CATEGORIES=    www
                      5: MASTER_SITES=  http://nginx.org/download/
                      6: DISTFILES=     ${DEFAULT_DISTFILES}
1.1       imil        7:
1.70      osa         8: MAINTAINER=    osa@NetBSD.org
1.76      gutterid    9: HOMEPAGE=      https://nginx.org/
                     10: COMMENT=       Lightweight HTTP server and mail proxy server
                     11: LICENSE=       2-clause-bsd
1.1       imil       12:
1.76      gutterid   13: .include "../../mk/bsd.prefs.mk"
                     14:
                     15: NGINX_USER?=           nginx
                     16: NGINX_GROUP?=          nginx
                     17: NGINX_DATADIR?=                ${VARBASE}/db/nginx
                     18: NGINX_LOGDIR?=         ${VARBASE}/log/nginx
                     19: NGINX_PIDDIR?=         ${VARBASE}/run
                     20:
                     21: BUILD_DEFS+=           NGINX_DATADIR NGINX_LOGDIR NGINX_PIDDIR VARBASE
                     22:
                     23: PKG_USERS_VARS+=       NGINX_USER
                     24: PKG_GROUPS_VARS+=      NGINX_GROUP
                     25: PKG_GROUPS=            ${NGINX_GROUP}
                     26: PKG_USERS=             ${NGINX_USER}:${NGINX_GROUP}
                     27:
                     28: PKG_GECOS.${NGINX_USER}=       NGINX server user
                     29: PKG_HOME.${NGINX_USER}=                ${NGINX_DATADIR}
                     30: PKG_SHELL.${NGINX_USER}=       ${NOLOGIN}
                     31:
                     32: USE_PKGLOCALEDIR=      yes
                     33: HAS_CONFIGURE=         yes
                     34: CONFIGURE_ARGS+=       --user=${NGINX_USER}
                     35: CONFIGURE_ARGS+=       --group=${NGINX_GROUP}
                     36: CONFIGURE_ARGS+=       --with-ld-opt=-L${PREFIX}/lib\ -Wl,-R${PREFIX}/lib
                     37: CONFIGURE_ARGS+=       --prefix=${PREFIX}
                     38: CONFIGURE_ARGS+=       --sbin-path=${PREFIX}/sbin
                     39: CONFIGURE_ARGS+=       --conf-path=${PKG_SYSCONFDIR}/nginx.conf
                     40: CONFIGURE_ARGS+=       --pid-path=${NGINX_PIDDIR}/nginx.pid
                     41: CONFIGURE_ARGS+=       --lock-path=${NGINX_DATADIR}/nginx.lock
                     42: CONFIGURE_ARGS+=       --error-log-path=${NGINX_LOGDIR}/error.log
                     43: CONFIGURE_ARGS+=       --http-log-path=${NGINX_LOGDIR}/access.log
                     44: CONFIGURE_ARGS+=       --http-client-body-temp-path=${NGINX_DATADIR}/client_body_temp
                     45: CONFIGURE_ARGS+=       --http-proxy-temp-path=${NGINX_DATADIR}/proxy_temp
                     46: CONFIGURE_ARGS+=       --http-fastcgi-temp-path=${NGINX_DATADIR}/fstcgi_temp
                     47: CONFIGURE_ARGS+=       --http-scgi-temp-path=${NGINX_DATADIR}/scgi_temp
                     48:
                     49: PKG_SYSCONFSUBDIR=     nginx
                     50:
                     51: .include "options.mk"
                     52:
                     53: EGDIR=                 ${PREFIX}/share/examples/nginx
                     54: EGFILES+=              fastcgi.conf fastcgi_params koi-utf koi-win \
                     55:                        mime.types nginx.conf win-utf
                     56:
                     57: .for file in ${EGFILES}
                     58: CONF_FILES+=   ${EGDIR}/conf/${file} ${PKG_SYSCONFDIR}/${file}
                     59: .  if !empty(PKG_OPTIONS:Mnaxsi)
                     60: CONF_FILES+=   ${EGDIR}/conf/naxsi_core.rules ${PKG_SYSCONFDIR}/naxsi_core.rules
                     61: .  endif
                     62: .endfor
                     63:
                     64: RCD_SCRIPTS=           nginx
                     65:
                     66: INSTALLATION_DIRS+=    ${PKGMANDIR}/man8 sbin share/examples/nginx/conf \
                     67:                        share/examples/nginx/html
                     68: MAKE_DIRS+=            ${NGINX_PIDDIR}
                     69: OWN_DIRS=              ${NGINX_LOGDIR}
                     70: OWN_DIRS_PERMS+=       ${NGINX_DATADIR} ${NGINX_USER} ${NGINX_GROUP} 0700
                     71:
                     72: BUILD_TARGET=          build
                     73:
                     74: SUBST_CLASSES+=                paths
                     75: SUBST_STAGE.paths=     pre-configure
                     76: SUBST_FILES.paths=     conf/nginx.conf
                     77: SUBST_SED.paths=       -e 's,%%PKG_SYSCONFDIR%%,${PKG_SYSCONFDIR},g'
                     78: SUBST_SED.paths+=      -e 's,%%NGINX_LOGDIR%%,${NGINX_LOGDIR},g'
                     79: SUBST_SED.paths+=      -e 's,%%NGINX_PIDDIR%%,${NGINX_PIDDIR},g'
                     80: SUBST_SED.paths+=      -e 's,%%NGINX_USER%%,${NGINX_USER},g'
                     81: SUBST_SED.paths+=      -e 's,%%NGINX_GROUP%%,${NGINX_GROUP},g'
                     82:
                     83: MESSAGE_SUBST+=                NGINX_LOGDIR=${NGINX_LOGDIR}
                     84: MESSAGE_SUBST+=                NGINX_PIDDIR=${NGINX_PIDDIR}
                     85: MESSAGE_SUBST+=                NGINX_USER=${NGINX_USER}
                     86: MESSAGE_SUBST+=                NGINX_GROUP=${NGINX_GROUP}
                     87:
                     88: .if ${OPSYS} == "Darwin"
                     89: SOEXT=         bundle
                     90: .else
                     91: SOEXT=         so
                     92: .endif
                     93: PLIST_SUBST+=  SOEXT=${SOEXT}
                     94:
1.84    ! osa        95: post-patch:
        !            96: .if !empty(PKG_OPTIONS:Mluajit)
        !            97:        (cd ${WRKSRC}/ && patch -p1 <${PATCHDIR}/extra-patch-lua-nginx-module)
        !            98: .endif
        !            99: .if !empty(PKG_OPTIONS:Mnaxsi)
        !           100:        (cd ${WRKSRC}/ && patch <${PATCHDIR}/extra-patch-naxsi_runtime.c)
        !           101: .endif
        !           102:
1.76      gutterid  103: do-install:
                    104:        ${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${DESTDIR}${PREFIX}/sbin/nginx
                    105: .for file in ${EGFILES}
                    106:        ${INSTALL_DATA} ${WRKSRC}/conf/${file} ${DESTDIR}${EGDIR}/conf/${file}
                    107: .endfor
                    108:        ${INSTALL_DATA} ${WRKSRC}/html/50x.html ${DESTDIR}${EGDIR}/html/50x.html
                    109:        ${INSTALL_DATA} ${WRKSRC}/html/index.html ${DESTDIR}${EGDIR}/html/index.html
                    110:        ${INSTALL_MAN} ${WRKSRC}/objs/nginx.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
                    111: .if !empty(PKG_OPTIONS:Mnaxsi)
                    112:        ${INSTALL_DATA} ${WRKDIR}/${NAXSI_DISTNAME}/naxsi_config/naxsi_core.rules ${DESTDIR}${EGDIR}/conf
                    113: .endif
                    114: .if !empty(PKG_OPTIONS:Mperl)
                    115:        ${INSTALL_LIB_DIR} ${DESTDIR}${PERL5_INSTALLVENDORARCH}/auto/nginx
                    116:        ${INSTALL_LIB} ${WRKSRC}/objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.${SOEXT} \
                    117:                ${DESTDIR}${PERL5_INSTALLVENDORARCH}/auto/nginx
                    118:        ${INSTALL_DATA} ${WRKSRC}/objs/src/http/modules/perl/blib/lib/nginx.pm \
                    119:                ${DESTDIR}${PERL5_INSTALLVENDORARCH}
                    120: .endif
                    121: .if !empty(PKG_OPTIONS:Mdso)
                    122:        ${INSTALL_LIB_DIR} ${DESTDIR}${PREFIX}/libexec/nginx
                    123:        (cd ${WRKSRC}/objs/ && ${FIND} . -name '*.so' -maxdepth 1 -type f \
                    124:                -exec ${INSTALL_PROGRAM} {} ${DESTDIR}${PREFIX}/libexec/nginx \;)
                    125: .endif
                    126:
                    127: .include "../../devel/zlib/buildlink3.mk"
1.58      jperkin   128: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>