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.
75 lines
2 KiB
Makefile
75 lines
2 KiB
Makefile
# $NetBSD: Makefile,v 1.12 2007/07/04 20:55:06 jlam Exp $
|
|
# FreeBSD Id: ports/www/zope29/Makefile,v 1.86 2006/08/03 15:53:04 garga Exp
|
|
|
|
DISTNAME= Zope-${VER}-final
|
|
PKGNAME= zope-${VER}
|
|
PKGREVISION= 4
|
|
CATEGORIES= www python
|
|
MASTER_SITES= http://www.zope.org/Products/Zope/${VER}/
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
|
HOMEPAGE= http://www.zope.org/
|
|
COMMENT= Zope, the Z Object Publishing Environment
|
|
|
|
DEPENDS+= ${PYPKGPREFIX}-xml-[0-9]*:../../textproc/py-xml
|
|
|
|
PYTHON_VERSIONS_ACCEPTED= 24
|
|
RCD_SCRIPTS= ${PKGBASE}29 zeo29
|
|
|
|
VER= 2.9.4
|
|
DIST_SUBDIR= ${PKGBASE}29-20070321
|
|
HOTFIXES= Hotfix_20070320
|
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
|
|
.for f in ${HOTFIXES}
|
|
DISTFILES+= ${f}.tgz
|
|
SITES.${f}.tgz= \
|
|
http://www.zope.org/Products/Zope/Hotfix-2007-03-20/Hotfix-20070320/
|
|
.endfor
|
|
|
|
# Change these, if you like, via the environment.
|
|
ZOPE_USER?= www
|
|
WEBBASEDIR?= www
|
|
SZOPEBASEDIR?= ${WEBBASEDIR}/Zope29
|
|
|
|
# Do not change anything below this line.
|
|
|
|
PKG_USERS_VARS+= ZOPE_USER
|
|
|
|
.if defined(INSTANCENAME)
|
|
ZOPEINSTANCENAME= ${INSTANCENAME}
|
|
.endif
|
|
|
|
ZOPEBASEDIR= ${PREFIX}/${SZOPEBASEDIR}
|
|
ZOPEINSTANCEBASE?= ${PREFIX}/${SZOPEBASEDIR}
|
|
ZOPEINSTANCEDIR?= ${ZOPEINSTANCEBASE}/${ZOPEINSTANCENAME}
|
|
|
|
HAS_CONFIGURE= yes
|
|
CONFIGURE_ARGS= --prefix=${ZOPEBASEDIR} --with-python=${PYTHONBIN}
|
|
|
|
BUILD_TARGET= build
|
|
MAKE_FILE= makefile
|
|
|
|
PLIST_SUBST= ZOPEBASEDIR=${SZOPEBASEDIR}
|
|
MESSAGE_SUBST+= ZOPEBASEDIR=${ZOPEBASEDIR}
|
|
MESSAGE_SUBST+= ZOPE_USER=${ZOPE_USER}
|
|
MESSAGE_SUBST+= ZOPEINSTANCEDIR=${ZOPEINSTANCEDIR}
|
|
|
|
post-patch:
|
|
${FIND} ${WRKSRC} -name '*.orig' -print0 | ${XARGS} -0 -- ${RM}
|
|
|
|
post-install:
|
|
${MV} ${ZOPEBASEDIR}/skel/etc/zope.conf.in \
|
|
${ZOPEBASEDIR}/skel/etc/zope.conf.sample.in
|
|
${MKDIR} ${ZOPEBASEDIR}/Products
|
|
.for d in ${HOTFIXES}
|
|
cd ${WRKDIR}; ${PAX} -rw ${d} ${ZOPEBASEDIR}/lib/python/Products
|
|
.endfor
|
|
${FIND} ${ZOPEBASEDIR} -type f -print0 | ${XARGS} -0 -- ${CHMOD} a-w
|
|
|
|
pre-package:
|
|
${CP} ${WRKDIR}/package-pkg-message ${PKGMESSAGE}
|
|
|
|
.include "../../lang/python/application.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|