pkgsrc/www/ap2-suphp/Makefile
jlam 4390d56940 Make it easier to build and install packages "unprivileged", where
the owner of all installed files is a non-root user.  This change
affects most packages that require special users or groups by making
them use the specified unprivileged user and group instead.

(1) Add two new variables PKG_GROUPS_VARS and PKG_USERS_VARS to
    unprivileged.mk.  These two variables are lists of other bmake
    variables that define package-specific users and groups.  Packages
    that have user-settable variables for users and groups, e.g. apache
    and APACHE_{USER,GROUP}, courier-mta and COURIER_{USER,GROUP},
    etc., should list these variables in PKG_USERS_VARS and PKG_GROUPS_VARS
    so that unprivileged.mk can know to set them to ${UNPRIVILEGED_USER}
    and ${UNPRIVILEGED_GROUP}.

(2) Modify packages to use PKG_GROUPS_VARS and PKG_USERS_VARS.
2007-07-04 20:54:31 +00:00

42 lines
1.1 KiB
Makefile

# $NetBSD: Makefile,v 1.11 2007/07/04 20:55:02 jlam Exp $
#
DISTNAME= suphp-0.6.0
PKGNAME= ${APACHE_PKG_PREFIX}-${DISTNAME}
PKGREVISION= 3
CATEGORIES= www
MASTER_SITES= http://www.suphp.org/download/
MAINTAINER= rillig@NetBSD.org
HOMEPAGE= http://www.suphp.org/
COMMENT= SuEXEC-like wrapper for PHP scripts
USE_PKGLOCALEDIR= yes
GNU_CONFIGURE= yes
USE_LANGUAGES= c c++
GCC_REQD+= 3.0 # the C++ code uses the .at() method
CONFIGURE_ARGS+= APXS=${APXS}
CONFIGURE_ARGS+= --with-apache-user=${APACHE_USER:Q}
CONFIGURE_ARGS+= --with-logfile=${VARBASE}/httpd/suphp_log
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
PKG_USERS_VARS+= APACHE_USER
BUILD_DEFS+= VARBASE
EGDIR= ${PREFIX}/share/examples/suphp
CONF_FILES= ${EGDIR}/suphp.conf ${PKG_SYSCONFDIR}/suphp.conf
USE_APR= yes
PKG_APACHE_ACCEPTED= apache2 apache22
SUBST_CLASSES+= suphp
SUBST_STAGE.suphp= post-configure
SUBST_FILES.suphp= doc/suphp.conf-example
SUBST_SED.suphp= -e "s,wwwrun,${APACHE_USER},g"
post-install:
${INSTALL_DATA_DIR} ${EGDIR:Q}
${INSTALL_DATA} ${WRKSRC}/doc/suphp.conf-example ${EGDIR}/suphp.conf
.include "../../mk/apache.mk"
.include "../../mk/bsd.pkg.mk"