pkgsrc/net/spread/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

53 lines
1.7 KiB
Makefile

# $NetBSD: Makefile,v 1.21 2007/07/04 20:54:52 jlam Exp $
#
DISTNAME= spread-src-3.17.3
PKGNAME= ${DISTNAME:S/-src//}
PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.cnds.jhu.edu/download/noformdown/
MAINTAINER= recht@NetBSD.org
HOMEPAGE= http://www.spread.org/
COMMENT= Group communication system providing a number of messaging services
WRKSRC= ${WRKDIR}/${DISTNAME}
USE_TOOLS+= perl
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --includedir=${PREFIX:Q}/include/spread
MAKE_FLAGS+= LD=${CC:Q}
PKG_GROUPS_VARS+= SPREAD_GROUP
PKG_USERS_VARS+= SPREAD_USER
SPREAD_USER= spread
SPREAD_GROUP= spread
FILES_SUBST+= SPREAD_USER=${SPREAD_USER:Q}
FILES_SUBST+= SPREAD_GROUP=${SPREAD_GROUP:Q}
FILES_SUBST+= RUNTIME_DIR=${RUNTIME_DIR:Q}
INCLUDEDIR= ${PREFIX}/include/spread
DOCSDIR= ${PREFIX}/share/doc/spread
EXAMPLEDIR= ${PREFIX}/share/examples/spread
RUNTIME_DIR= ${VARBASE}/run/spread
RCD_SCRIPTS= spread
PKG_GROUPS= ${SPREAD_USER}
PKG_USERS= ${SPREAD_USER}:${SPREAD_GROUP}
CONF_FILES= ${EXAMPLEDIR}/spread.access_ip.sample ${PKG_SYSCONFDIR}/spread.access_ip
CONF_FILES+= ${EXAMPLEDIR}/spread.conf.sample ${PKG_SYSCONFDIR}/spread.conf
OWN_DIRS_PERMS= ${RUNTIME_DIR} ${SPREAD_USER} ${SPREAD_GROUP} 0750
post-install:
${INSTALL_DATA_DIR} ${DOCSDIR}
${INSTALL_DATA_DIR} ${EXAMPLEDIR}
${INSTALL_DATA} ${WRKSRC}/sample.spread.conf ${EXAMPLEDIR}/spread.conf.sample
${INSTALL_DATA} ${WRKSRC}/sample.spread.access_ip ${EXAMPLEDIR}/spread.access_ip.sample
${INSTALL_DATA} ${WRKSRC}/Readme.txt ${DOCSDIR}/Readme.txt
${INSTALL_DATA} ${WRKSRC}/license.txt ${DOCSDIR}/LICENSE
${INSTALL_DATA} ${WRKSRC}/Short_Buffer_Handling.txt ${DOCSDIR}/Short_Buffer_Handling.txt
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"