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

Annotation of pkgsrc/www/apache2/Makefile, Revision 1.82.2.4

1.82.2.4! salo        1: # $NetBSD: Makefile,v 1.89 2005/12/15 11:29:00 tron Exp $
1.56      jlam        2:
                      3: .include "Makefile.common"
1.1       jlam        4:
1.71      adam        5: PKGNAME=       apache-${APACHE_VERSION}
1.82.2.4! salo        6: PKGREVISION=   3
1.71      adam        7: CATEGORIES=    www
1.1       jlam        8:
1.71      adam        9: HOMEPAGE=      http://httpd.apache.org/
                     10: COMMENT=       Apache HTTP (Web) server, version 2
1.1       jlam       11:
1.71      adam       12: CONFLICTS=     apache-*ssl-[0-9]* apache-[0-9]* apache6-[0-9]*
1.1       jlam       13:
1.71      adam       14: BUILD_DEFS+=   USE_INET6
1.1       jlam       15:
1.76      jlam       16: USE_TOOLS+=            perl:run
1.71      adam       17: USE_LIBTOOL=           yes
                     18: USE_PKGINSTALL=                yes
                     19: GNU_CONFIGURE=         yes
1.1       jlam       20: CONFIGURE_ARGS+=       --enable-layout=NetBSD
1.50      epg        21: CONFIGURE_ARGS+=       --localstatedir=${VARBASE}
1.2       jlam       22: CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
1.1       jlam       23: CONFIGURE_ARGS+=       --with-port=80
1.53      jlam       24: CONFIGURE_ARGS+=       --enable-so
1.63      minskim    25: CONFIGURE_ENV+=                perlbin=${PERL5:Q}
1.2       jlam       26:
                     27: # Apache Portable Runtime library configure options
1.51      jlam       28: CONFIGURE_ARGS+=       --with-apr=${BUILDLINK_PREFIX.apr}
                     29: CONFIGURE_ARGS+=       --with-apr-util=${BUILDLINK_PREFIX.apr}
1.2       jlam       30:
1.82.2.2  seb        31: BUILDLINK_DEPENDS.apr= apr>=0.9.7.2.0.55
                     32:
1.2       jlam       33: .include "../../mk/bsd.prefs.mk"
1.56      jlam       34: .include "../../devel/apr/buildlink3.mk"
                     35: .include "../../textproc/expat/buildlink3.mk"
1.58      jlam       36: .include "../../mk/dlopen.buildlink3.mk"
1.2       jlam       37:
1.55      jlam       38: # Set the "Multi-Processing Model" used by Apache to handle requests.
                     39: # Valid values are:
                     40: #      prefork         non-threaded, pre-forking web server
                     41: #      worker          hybrid multi-threaded multi-process web server
                     42: #
                     43: APACHE_MPM?=           prefork
                     44: CONFIGURE_ARGS+=       --with-mpm=${APACHE_MPM}
                     45: BUILD_DEFS+=           APACHE_MPM
1.57      jlam       46: .for _mpm_ in prefork worker
                     47: PLIST_SUBST.${_mpm_}?=         MPM_COMMENT.${_mpm_}="@comment "
                     48: PLIST_SUBST+=                  ${PLIST_SUBST.${_mpm_}}
                     49: .endfor
                     50: PLIST_SUBST.${APACHE_MPM}=     MPM_COMMENT.${APACHE_MPM}=
1.55      jlam       51:
1.5       jlam       52: DFLT_APACHE_MODULES=   all
                     53: DFLT_APACHE_MODULES+=  proxy proxy_connect proxy_ftp proxy_http
1.65      martin     54: DFLT_APACHE_MODULES+=  ssl deflate
1.42      xtraeme    55:
1.52      jlam       56: # LDAP support
1.73      jlam       57: .if !empty(PKG_BUILD_OPTIONS.apr:Mldap)
1.42      xtraeme    58: DFLT_APACHE_MODULES+=  ldap auth_ldap
                     59: .endif
                     60:
1.53      jlam       61: # APACHE_MODULES are the modules that are linked statically into the
                     62: # apache httpd executable.
                     63: #
1.5       jlam       64: APACHE_MODULES?=       ${DFLT_APACHE_MODULES}
1.2       jlam       65: CONFIGURE_ARGS+=       --enable-modules="${APACHE_MODULES}"
1.5       jlam       66: BUILD_DEFS+=           APACHE_MODULES
1.2       jlam       67:
1.54      jlam       68: APACHE_USER?=          www
                     69: APACHE_GROUP?=         www
1.10      wiz        70: PKG_GROUPS=            ${APACHE_GROUP}
1.80      rillig     71: PKG_USERS=             ${APACHE_USER}:${APACHE_GROUP}::Apache\ user
1.10      wiz        72:
1.2       jlam       73: PKG_SYSCONFVAR=                apache
                     74: PKG_SYSCONFSUBDIR?=    httpd
                     75: EGDIR=                 ${PREFIX}/share/examples/httpd
                     76: SBINDIR=               ${PREFIX}/sbin
                     77: CONF_FILES=            ${EGDIR}/httpd-std.conf ${PKG_SYSCONFDIR}/httpd.conf
                     78: CONF_FILES+=           ${EGDIR}/ssl-std.conf ${PKG_SYSCONFDIR}/ssl.conf
1.78      jlam       79: CONF_FILES+=           ${SBINDIR}/envvars-std ${SBINDIR}/envvars
                     80: CONF_FILES+=           ${EGDIR}/magic ${PKG_SYSCONFDIR}/magic
                     81: CONF_FILES+=           ${EGDIR}/mime.types ${PKG_SYSCONFDIR}/mime.types
1.2       jlam       82: RCD_SCRIPTS=           apache
                     83:
1.79      jlam       84: REQD_DIRS=             ${PREFIX}/share/httpd
                     85: REQD_DIRS+=            ${PREFIX}/share/httpd/htdocs
1.39      xtraeme    86: OWN_DIRS=              ${VARBASE}/log/httpd
                     87: OWN_DIRS+=             ${VARBASE}/db/httpd
                     88: OWN_DIRS_PERMS+=       ${VARBASE}/db/httpd/proxy ${APACHE_USER} ${APACHE_GROUP} 0755
1.67      martti     89: FIX_PERMS=             apachectl apxs dbmmanage envvars-std mkcert
1.38      adrianp    90:
1.60      seb        91: SUBST_CLASSES+=                paths
1.38      adrianp    92: SUBST_STAGE.paths=     pre-configure
1.71      adam       93: SUBST_FILES.paths=     config.layout
1.38      adrianp    94: SUBST_SED.paths=       -e "s|@PREFIX@|${PREFIX}|g"
                     95: SUBST_MESSAGE.paths=   "Fixing paths."
                     96:
1.60      seb        97: SUBST_CLASSES+=                apr-lt
1.55      jlam       98: SUBST_STAGE.apr-lt=    post-configure
                     99: SUBST_FILES.apr-lt=    build/config_vars.mk
                    100: SUBST_SED.apr-lt=      -e "s|^\(LIBTOOL =\) [^ ]*|\1 \$$(SHELL) \$$(top_builddir)/libtool|g"
                    101: SUBST_MESSAGE.apr-lt=  "Fixing libtool references."
                    102:
1.38      adrianp   103: SUBST_CLASSES+=                confs
1.75      jlam      104: SUBST_STAGE.confs=     post-configure
                    105: SUBST_FILES.confs=     docs/conf/highperformance-std.conf \
                    106:                        docs/conf/httpd-std.conf \
                    107:                        docs/conf/ssl-std.conf
1.38      adrianp   108: SUBST_SED.confs=       -e "s|${EGDIR}|${PKG_SYSCONFDIR}|g" \
                    109:                        -e "s|${PREFIX}/htdocs|${PREFIX}/share/httpd/htdocs|g" \
                    110:                        -e "s|${PREFIX}/conf|${PKG_SYSCONFDIR}|g" \
1.39      xtraeme   111:                        -e "s|logs/|${VARBASE}/log/httpd/|g" \
1.38      adrianp   112:                        -e "s|/var/log/httpd/foo\.log|logs/foo.log/|g" \
                    113:                        -e "s|^\(User[   ]\).*|\1${APACHE_USER}|g" \
                    114:                        -e "s|^\(Group[  ]\).*|\1${APACHE_GROUP}|g"
                    115: SUBST_MESSAGE.confs=   "Fixing configuration files."
1.2       jlam      116:
1.54      jlam      117: .include "options.mk"
                    118:
1.5       jlam      119: # Add dependencies for the modules that will be built.  For each module
                    120: # ap_mod listed in ${APACHE_MODULES}, _AP_DEPENDS.ap_mod is a whitespace
1.33      minskim   121: # separated list of dependencies or buildlink3.mk files needed to build
1.5       jlam      122: # ap_mod, and _AP_CFG_ARGS.ap_mod is a whitespace separated list of
                    123: # configure script options for ap_mod.
                    124: #
1.33      minskim   125: _AP_DEPENDS.ssl=       ../../security/openssl/buildlink3.mk
                    126: _AP_DEPENDS.deflate=   ../../devel/zlib/buildlink3.mk
1.5       jlam      127:
1.11      jlam      128: _AP_CFG_ARGS.ssl=      --with-ssl=${BUILDLINK_PREFIX.openssl}
                    129: _AP_CFG_ARGS.deflate=  --with-z=${BUILDLINK_PREFIX.zlib}
1.5       jlam      130:
                    131: .for _ap_mod in ${APACHE_MODULES}
                    132: .  if defined(_AP_DEPENDS.${_ap_mod}) && !empty(_AP_DEPENDS.${_ap_mod})
                    133: .    for _ap_depend in ${_AP_DEPENDS.${_ap_mod}}
                    134: .      if exists(${_ap_depend})
                    135: .        include "${_ap_depend}"
                    136: .      else
                    137: DEPENDS+=              ${_ap_depend}
                    138: .      endif
                    139: .    endfor
                    140: .  endif
                    141: .  if defined(_AP_CFG_ARGS.${_ap_mod}) && !empty(_AP_CFG_ARGS.${_ap_mod})
                    142: CONFIGURE_ARGS+=       ${_AP_CFG_ARGS.${_ap_mod}}
                    143: .  endif
                    144: .endfor
                    145:
1.55      jlam      146: post-extract:
                    147:        ${TOUCH} ${WRKSRC}/libtool
                    148:
1.67      martti    149: post-build:
1.71      adam      150:        ${SED} "s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g"                 \
1.67      martti    151:                < ${FILESDIR}/mkcert.sh > ${WRKDIR}/mkcert
                    152:
1.38      adrianp   153: pre-install:
1.2       jlam      154:        @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV}                            \
                    155:                ${MAKE_PROGRAM} install-conf sysconfdir="${EGDIR}"
1.82.2.1  seb       156:
1.38      adrianp   157: post-install:
                    158:        @${LN} -sf ${LOCALBASE}/libexec/apr/libtool ${PREFIX}/share/httpd/build
1.6       jlam      159:        @cd ${EGDIR};                                                   \
1.3       jlam      160:        for file in                                                     \
                    161:                highperformance-std.conf                                \
                    162:                httpd-std.conf                                          \
                    163:                ssl-std.conf;                                           \
                    164:        do                                                              \
1.38      adrianp   165:                ${CAT} $${file} | ${AWK} '                              \
1.6       jlam      166:                        /^Listen[       ]*80/   {                       \
                    167:                                print;                                  \
                    168:                                printf "%s", "Listen 0.0.0.0:80\n";     \
                    169:                                next;                                   \
                    170:                        }                                               \
                    171:                        /^Listen[       ]*443/  {                       \
                    172:                                print;                                  \
                    173:                                printf "%s", "Listen 0.0.0.0:443\n";    \
                    174:                                next;                                   \
                    175:                        }                                               \
                    176:                        { print; }                                      \
                    177:                        ' >> $${file}.new;                              \
1.2       jlam      178:                ${MV} -f $${file}.new $${file};                         \
                    179:        done
                    180:
1.38      adrianp   181:        @${INSTALL_DATA_DIR} ${PREFIX}/share/httpd/manual
                    182:        @cd ${WRKSRC}/docs/manual && ${PAX} -rw . ${PREFIX}/share/httpd/manual
                    183:
1.67      martti    184:        @${INSTALL_SCRIPT} ${WRKDIR}/mkcert ${PREFIX}/sbin
                    185:
1.38      adrianp   186:        for file in ${FIX_PERMS}; do \
                    187:                ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/sbin/$$file && \
                    188:                ${CHMOD} ${BINMODE} ${PREFIX}/sbin/$$file; \
                    189:        done
                    190:
1.1       jlam      191: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>