# This file specifies where Munin will look for things after you've
# run 'make' in the source directory.  Modify it to suit your needs.

# DESTDIR is empty during building, and optionally set to point to
# a shadow tree during make install.

#
# the base of the Munin installation.
# 
ifdef PREFIX
UPREFIX=$(PREFIX)
else
UPREFIX=/usr
endif

# Where Munin keeps its configurations (server.conf, client.conf, ++)
CONFDIR    = $(PREFIX)/etc/munin

# Server only - where to put munin-cron
BINDIR     = $(UPREFIX)/bin

# Client only - where to put munin-node, munin-node-configure, and munin-run
SBINDIR    = $(UPREFIX)/sbin

# Where to put text and html documentation
DOCDIR     = $(UPREFIX)/doc

# Where to put man pages
MANDIR     = $(UPREFIX)/man

# Where to put internal binaries and plugin repository
LIBDIR     = $(DATADIR)

# Server only - Output directory
HTMLDIR    = $(PREFIX)/www/munin
CGIDIR     = $(PREFIX)/www/cgi-bin

# Client only - Where to put RRD files and other intenal data
DBDIR      = $(PREFIX)/var/munin

# Client only - Where plugins should put their states. Must be writable by
# group "munin", and should be preserved between reboots
PLUGSTATE  = $(DBDIR)/plugin-state

# Where Munin should place its logs.
LOGDIR     = /var/log

# Location of PID files and other statefiles. On the server, must be
# writable by the user "munin".
STATEDIR   = /var/run/munin

# The perl interpreter to use
# Passed in from FreeBSD port Makefile.

# The python interpreter to use (used by some plugins)
PYTHON     = /usr/bin/env python

# Server only - Where to install the perl libraries
PERLLIB    = $(PREFIX)/$(SITE_PERL_REL)

# Client only - Install plugins for this architecture
OSTYPE     = $(shell uname | tr '[A-Z]' '[a-z]')

# How to figure out the hostname. (Only used in default configuration
# files)
HOSTNAME   = $(shell hostname)

# What is the safest way to create a tempfile.
# Default is to figure it out by testing various methods.
# Replace this with a known platform-specific method
MKTEMP     = $(shell ./test-mktemp)

# Munin version number.
VERSION    = $(shell cat RELEASE)

# User to run munin as
USER       = munin
GROUP      = munin

# Default user to run the plugins as
PLUGINUSER = nobody

# Which command to use to check if the USER and GROUP to run Munin as, exists.
CHECKUSER:= $(shell /usr/sbin/pw user show $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
CHECKGROUP:= $(shell /usr/sbin/pw group show $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))

CHOWN      = chown
CHMOD      = chmod
CHGRP      = chgrp


syntax highlighted by Code2HTML, v. 0.9.1