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

66 lines
1.7 KiB
Makefile

# $NetBSD: Makefile,v 1.6 2007/07/04 20:54:49 jlam Exp $
#
DISTNAME= hobbit-4.2.0
PKGNAME= hobbitclient-4.2.0
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=hobbitmon/}
MAINTAINER= gendalia@NetBSD.org
HOMEPAGE= http://hobbitmon.sourceforge.net/
COMMENT= Free-software client for the Hobbit monitor
PATCHFILES+=allinone.patch
SITES.allinone.patch=http://www.hobbitmon.com/hobbitsw/patches/
HAS_CONFIGURE= YES
USE_TOOLS+= gmake
#INSTALL_TARGET=
.include "../../mk/bsd.prefs.mk"
BBUSER?= hobbit
BBGROUP?= hobbit
BBTOPDIR?= ${PREFIX}/hobbit
BBLOGDIR?= ${VARBASE}/log/hobbit
BBSERVERNAME?= "`uname -n`"
BBSERVERIP?= 127.0.0.1
CONFTYPE?= "server"
BUILD_DEFS+= VARBASE
BUILD_DEFS+= BBSERVERNAME
BUILD_DEFS+= BBSERVERIP
RCD_SCRIPTS+= hobbitclient
PKG_GROUPS= ${BBGROUP}
PKG_USERS= ${BBUSER:Q}:${BBGROUP:Q}
PKG_GECOS.${BBUSER}= Hobbit monitor
PKG_HOME.${BBUSER}= ${BBTOPDIR}
PKG_GROUPS_VARS+= BBGROUP
PKG_USERS_VARS+= BBUSER
CONFIGURE_ARGS+="--client"
CONFIGURE_ENV+= TARGET=hobbit
CONFIGURE_ENV+= BBHOSTNAME="${BBSERVERNAME}"
CONFIGURE_ENV+= BBUSER=${BBUSER:Q}
CONFIGURE_ENV+= BBTOPDIR=${BBTOPDIR:Q}
CONFIGURE_ENV+= BBLOGDIR=${BBLOGDIR:Q}
CONFIGURE_ENV+= BBHOSTIP=${BBSERVERIP:Q}
CONFIGURE_ENV+= MANROOT=${PREFIX}/${PKGMANDIR}/
CONFIGURE_ENV+= CONFTYPE="${CONFTYPE}"
USE_TOOLS+= awk:run cat:run cp:run
USE_TOOLS+= cut:run date:run egrep:run
USE_TOOLS+= expr:run find:run grep:run
USE_TOOLS+= head:run id:run ls:run
USE_TOOLS+= mv:run rm:run sed:run
USE_TOOLS+= sort:run tail:run touch:run
USE_TOOLS+= tr:run wc:run
MAKE_ENV+= MAKE=${MAKE_PROGRAM:Q}
MAKE_ENV+= PKGDIR=${PREFIX:Q}
MAKE_ENV+= ${TOOLS_ENV}
.include "../../mk/bsd.pkg.mk"