# New ports collection makefile for: Russian Apache + mod_ssl # Date created: 7 July 2000 1:05 MSD # Whom: Dmitry Sivachenko # # $FreeBSD$ # PORTNAME= apache+mod_ssl PORTVERSION= ${VERSION_APACHE}.${VERSION_RA}.${VERSION_MODSSL} CATEGORIES= russian www security MASTER_SITES= http://www.apache.org/dist/httpd/ \ ftp://ftp.ccs.neu.edu/net/mirrors/ftp.apache.org/apache/dist/httpd/ \ ftp://ftp.rge.com/pub/infosystems/apache/dist/httpd/ \ ftp://apache.compuex.com/pub/apache/dist/httpd/ \ ftp://apache.arctic.org/pub/apache/dist/httpd/ \ ftp://ftp.epix.net/pub/apache/dist/httpd/ \ ftp://ftp.ameth.org/pub/mirrors/ftp.apache.org/apache/dist/httpd/ \ ftp://ftp.connectnet.com/pub/www/apache/httpd/ \ ftp://apache.technomancer.com/mirrors/apache/dist/httpd/ \ ftp://ftp.raver.net/pub/ftp.apache.org/httpd/ \ ftp://www3.service.digital.com/apache/dist/httpd/ \ ftp://galileo.galilei.com/pub/apache/httpd/ \ ftp://ftp.mtnranch.net/pub/apache/dist/httpd/ \ ftp://ftp.iodynamics.com/pub/mirror/apache/dist/httpd/ \ ftp://apache.nextpath.com/pub/apache/dist/httpd/ \ ${MASTER_SITES_MODSSL:S/$/:modssl/} \ ${MASTER_SITES_RA:S/$/:rapatches/} MASTER_SITES_MODSSL= http://www.modssl.org/source/ \ ftp://ftp.modssl.org/source/ \ ftp://ftp.pca.dfn.de/pub/tools/net/mod_ssl/ \ ftp://ftp.ecrc.net/pub/security/mod_ssl/ \ ftp://ftp.nvg.ntnu.no/pub/unix/mod_ssl/ \ ftp://ftp.ulpgc.es/pub/mod_ssl/ \ ftp://glock.missouri.edu/pub/mod_ssl/ \ ftp://ftp.fu-berlin.de/unix/security/mod_ssl/ \ ftp://ftp.ntrl.net/pub/mirror/ralfsw/mod_ssl/ MASTER_SITES_RA= ftp://ftp.lexa.ru/pub/apache-rus/ \ ftp://ftp.lexa.ru/pub/apache-rus/old-versions/ DISTNAME= apache_${VERSION_APACHE} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ mod_ssl-${VERSION_MODSSL}-${VERSION_APACHE}${EXTRACT_SUFX}:modssl \ patches_${VERSION_APACHE}rusPL${VERSION_RA}.tar.gz:rapatches MAINTAINER= lev@serebryakov.spb.ru USE_OPENSSL= YES .include LIB_DEPENDS= mm.12:${PORTSDIR}/devel/mm VERSION_APACHE= 1.3.27 VERSION_MODSSL= 2.8.11 VERSION_RA= 30.16 # # some defaults # DATADIR=${PREFIX}/www DOCUMENT_ROOT=${DATADIR}/data DEFAULT_PATH?=/bin:/usr/bin:${PREFIX}/bin # # suexec support # .if defined(WITH_APACHE_SUEXEC) APACHE_SUEXEC_DOCROOT?=${DOCUMENT_ROOT} APACHE_SUEXEC_USERDIR?=public_html SUEXEC_CONF= \ --enable-suexec \ --suexec-docroot=${APACHE_SUEXEC_DOCROOT} \ --suexec-caller=www \ --suexec-uidmin=1000 \ --suexec-gidmin=1000 \ --suexec-logfile=/var/log/httpd-suexec.log \ --suexec-userdir=${APACHE_SUEXEC_USERDIR} \ --suexec-safepath=${DEFAULT_PATH} .if defined(APACHE_SUEXEC_UMASK) SUEXEC_CONF+= --suexec-umask=${APACHE_SUEXEC_UMASK} .endif PLIST_SUB+= SUEXEC="" SUEXEC_MAN= suexec.8 .else # WITH_APACHE_SUEXEC SUEXEC_CONF= PLIST_SUB+= SUEXEC="@comment " SUEXEC_MAN= .endif # WITH_APACHE_SUEXEC # # Configutre parameters # HAS_CONFIGURE= yes CONFIGURE_ARGS= \ --prefix=${PREFIX} \ --server-uid=www \ --server-gid=www \ --with-perl=${PERL} \ --with-layout=${FILESDIR}/FreeBSD.layout:FreeBSD \ --without-confadjust OPTIM= -DHARD_SERVER_LIMIT=512 \ -DDOCUMENT_LOCATION=\\"${PREFIX}/www/data/\\" \ -DDEFAULT_PATH=\\"${PREFIX}/bin:/bin:/usr/bin\\" \ -DACCEPT_FILTER_NAME=\\"httpready\\" .if defined(WITH_DSO_MODULES) CONFIGURE_ARGS+= \ --enable-shared=max \ --disable-shared=so \ --disable-shared=charset \ --enable-module=most \ --enable-module=auth_db \ --enable-module=mmap_static \ --enable-module=define \ --disable-module=auth_dbm \ ${SUEXEC_CONF} PLIST_SUB+= DSO_MOD="" .else CONFIGURE_ARGS+= \ --enable-shared=remain \ --enable-module=most \ --enable-module=auth_db \ --enable-module=mmap_static \ --enable-module=define \ --disable-shared=define \ --enable-module=ssl \ --disable-shared=ssl \ --disable-module=auth_dbm \ ${SUEXEC_CONF} PLIST_SUB+= DSO_MOD="@comment " .endif OPTIM= -DDOCUMENT_LOCATION=\\"${DOCUMENT_ROOT}\\" \ -DDEFAULT_PATH=\\"${DEFAULT_PATH}\\" .if defined(APACHE_HARD_SERVER_LIMIT) OPTIM+= -DHARD_SERVER_LIMIT=${APACHE_HARD_SERVER_LIMIT} .else OPTIM+= -DHARD_SERVER_LIMIT=512 .endif .if defined(APACHE_PERF_TUNING) OPTIM+= -DBUFFERED_LOGS CFLAGS+= -O6 -fomit-frame-pointer .endif CONFIGURE_ENV= CFLAGS='${CFLAGS}' \ OPTIM='${OPTIM}' \ SSL_BASE='SYSTEM' \ EAPI_MM='SYSTEM' \ PATH="${PREFIX}/bin:${PATH}" INSTALL_TARGET= install-quiet MAN1= dbmmanage.1 htdigest.1 htpasswd.1 MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 \ ${SUEXEC_MAN} TYPE= test CRT= KEY= pre-fetch: @${ECHO_MSG} "" .if defined(WITH_DSO_MODULES) @${ECHO_MSG} "Build all modules (except mod_so and mod_charest) as DSO." .else @${ECHO_MSG} "You could define WITH_DSO_MODULES to build all modules as DSO." .endif .if defined(APACHE_PERF_TUNING) @${ECHO_MSG} "Build Apache for maximum performance." .else @${ECHO_MSG} "You could define APACHE_PERF_TUNING to build Apache for maximum performace." .endif .if defined(APACHE_HARD_SERVER_LIMIT) @${ECHO_MSG} "Build Apache with HARD_SERVER_LIMIT=${APACHE_HARD_SERVER_LIMIT}" .else @${ECHO_MSG} "You could define APACHE_HARD_SERVER_LIMIT, default one is 512" .endif .if defined(WITH_APACHE_SUEXEC) @${ECHO_MSG} "Build apache with suexec support" @${ECHO_MSG} " suexec docroot: ${APACHE_SUEXEC_DOCROOT}" @${ECHO_MSG} " suexec userdir: ${APACHE_SUEXEC_USERDIR}" @${ECHO_MSG} " suexec safepath: ${DEFAULT_PATH}" @${ECHO_MSG} " These values could be defined as APACHE_SUEXEC_DOCROOT, APACHE_SUEXEC_USERDIR and DEFAULT_PATH." .else @${ECHO_MSG} "You could define WITH_APACHE_SUEXEC to build suexec support." .endif @${ECHO_MSG} "" pre-patch: @cd ${WRKDIR}/apache_${VERSION_APACHE} \ && ${ECHO_MSG} "===> Applying Russian Apache extension" \ && ${PATCH} ${PATCH_DIST_ARGS} < ${WRKDIR}/RA-1.3rusPL${VERSION_RA}.patch @cd ${WRKDIR} \ && tar cf - src conf htdocs | tar xf - -C ${WRKDIR}/apache_${VERSION_APACHE} @cd ${WRKDIR}/mod_ssl-${VERSION_MODSSL}-${VERSION_APACHE} \ && ${ECHO_MSG} "===> Applying mod_ssl-${VERSION_MODSSL} extension" \ && ./configure --with-apache=../${DISTNAME} --expert post-patch: @cd ${WRKSRC} \ && find . -type f -name "*.orig" -print | xargs ${RM} -f post-build: @cd ${WRKSRC} \ && ${ECHO_MSG} "===> Creating Dummy Certificate for Server (SnakeOil)" \ && ${ECHO_MSG} " [use 'make certificate' to create a real one]" \ && ${MAKE} certificate TYPE=dummy >/dev/null 2>&1 certificate: @cd ${WRKSRC} \ && ${ECHO_MSG} "===> Creating Test Certificate for Server" \ && ${MAKE} certificate TYPE=${TYPE} CRT=${CRT} KEY=${KEY} pre-install: PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL post-install: @if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \ ${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \ ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/apache.sh ${PREFIX}/etc/rc.d/apache.sh; \ fi .if defined(WITH_SUEXEC) @${ECHO_CMD} "sbin/suexec" >> ${TMPPLIST} .endif .include