2019-07-23 04:32:57 +02:00
|
|
|
PLUGINS = df cpu if_ if_err_ load memory processes swap netstat uptime interrupts irqstats ntpdate plugindir_
|
2007-06-11 17:45:16 +02:00
|
|
|
|
|
|
|
|
2007-11-30 11:43:07 +01:00
|
|
|
munin-node: plugins/* munin-node.conf
|
2019-07-19 06:08:23 +02:00
|
|
|
@export VERSION=$$(cat VERSION); \
|
|
|
|
export CONF=$$(grep -v '^#' munin-node.conf); \
|
|
|
|
export "PLUGINS=$(PLUGINS)"; \
|
2007-06-11 17:45:16 +02:00
|
|
|
echo "Making munin-node for muninlite version $$VERSION"; \
|
2019-07-19 06:08:23 +02:00
|
|
|
export PLSTR=""; \
|
|
|
|
for PLGIN in $$PLUGINS; \
|
2007-06-11 17:45:16 +02:00
|
|
|
do \
|
|
|
|
echo "Adding plugin $$PLGIN"; \
|
2019-07-19 06:08:23 +02:00
|
|
|
PLSTR=$$(printf "%s\n" "$$PLSTR"; grep -v '^#' plugins/$$PLGIN); \
|
2007-06-11 17:45:16 +02:00
|
|
|
done; \
|
2019-07-19 06:08:23 +02:00
|
|
|
perl -p -e '\
|
|
|
|
s/\@\@VERSION\@\@/$$ENV{"VERSION"}/; \
|
|
|
|
s/\@\@CONF\@\@/$$ENV{"CONF"}/; \
|
|
|
|
s/\@\@PLUGINS\@\@/$$ENV{"PLUGINS"}/; \
|
|
|
|
s/\@\@PLSTR\@\@/$$ENV{"PLSTR"}/;' \
|
2007-06-11 17:45:16 +02:00
|
|
|
munin-node.in > munin-node
|
|
|
|
@chmod +x munin-node
|
|
|
|
|
|
|
|
all: munin-node
|
2019-07-23 04:32:57 +02:00
|
|
|
|
2007-06-11 17:45:16 +02:00
|
|
|
clean-node:
|
|
|
|
@echo "Removing munin-node"
|
|
|
|
@rm -f munin-node
|
|
|
|
|
2019-07-23 04:32:57 +02:00
|
|
|
clean-tgz:
|
|
|
|
@echo "Removing old releases"
|
2007-06-11 17:45:16 +02:00
|
|
|
@rm -rf releases
|
|
|
|
|
|
|
|
clean: clean-node
|
2019-07-23 04:32:57 +02:00
|
|
|
|
2007-06-11 17:45:16 +02:00
|
|
|
clean-all: clean-node clean-tgz
|
|
|
|
|
|
|
|
tgz: clean-node
|
|
|
|
@VERSION=$$(cat VERSION); \
|
|
|
|
echo "Building release/muninlite-$$VERSION.tar.gz"; \
|
|
|
|
mkdir -p releases; \
|
|
|
|
cp -ra . releases/muninlite-$$VERSION 2>/dev/null || true; \
|
|
|
|
cd releases; \
|
2011-01-27 11:11:08 +01:00
|
|
|
rm -rf muninlite-$$VERSION/releases; \
|
|
|
|
rm -rf muninlite-$$VERSION/.svn; \
|
2007-06-11 17:45:16 +02:00
|
|
|
tar zcvf muninlite-$$VERSION.tar.gz muninlite-$$VERSION >/dev/null; \
|
2007-11-30 11:43:07 +01:00
|
|
|
rm -rf muninlite-$$VERSION;
|