4390d56940
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.
44 lines
1.2 KiB
Text
44 lines
1.2 KiB
Text
# $NetBSD: Makefile.common,v 1.13 2007/07/04 20:54:50 jlam Exp $
|
|
|
|
DISTNAME= mydns-1.1.0
|
|
CATEGORIES= net
|
|
MASTER_SITES= http://mydns.bboy.net/download/
|
|
EXTRACT_SUFX= .tar.bz2
|
|
|
|
MAINTAINER= ghen@NetBSD.org
|
|
HOMEPAGE= http://mydns.bboy.net/
|
|
|
|
GNU_CONFIGURE= YES
|
|
USE_TOOLS+= makeinfo
|
|
USE_PKGLOCALEDIR= YES
|
|
|
|
CONFIGURE_ARGS+= --with-confdir=${PKG_SYSCONFDIR:Q}
|
|
|
|
MYDNS_USER?= mydns
|
|
MYDNS_GROUP?= mydns
|
|
MYDNS_PERMS= ${ROOT_USER} ${ROOT_GROUP} 600
|
|
|
|
PKG_GROUPS_VARS+= MYDNS_GROUP
|
|
PKG_USERS_VARS+= MYDNS_USER
|
|
|
|
SUBST_CLASSES+= user
|
|
SUBST_STAGE.user= pre-build
|
|
SUBST_FILES.user= src/mydns/conf.c
|
|
SUBST_SED.user= -e 's/%%MYDNS_USER%%/${MYDNS_USER}/'
|
|
SUBST_SED.user+= -e 's/%%MYDNS_GROUP%%/${MYDNS_GROUP}/'
|
|
|
|
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
|
|
CONF_FILES_PERMS= ${EGDIR}/mydns.conf ${PKG_SYSCONFDIR}/mydns.conf ${MYDNS_PERMS}
|
|
RCD_SCRIPTS= mydns
|
|
|
|
PKG_GROUPS= ${MYDNS_GROUP}
|
|
PKG_USERS= ${MYDNS_USER}:${MYDNS_GROUP}
|
|
|
|
post-install:
|
|
${INSTALL_DATA_DIR} ${EGDIR}
|
|
${WRKSRC}/src/mydns/mydns --dump-config > ${EGDIR}/mydns.conf
|
|
${CHMOD} 0600 ${EGDIR}/mydns.conf
|
|
|
|
.include "../../security/openssl/buildlink3.mk"
|
|
.include "../../devel/gettext-lib/buildlink3.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|