2007-06-11 17:45:16 +02:00
|
|
|
|
|
|
|
|
2011-01-14 21:27:09 +01:00
|
|
|
PLUGINS=df cpu if_ if_err_ load memory processes swap netstat uptime interrupts irqstats ntpdate plugindir_
|
2007-06-11 20:31:45 +02:00
|
|
|
#PLUGINS=cpu if_ if_err_ load memory processes netstat uptime interrupts irqstats
|
2007-06-11 17:45:16 +02:00
|
|
|
|
2007-11-30 11:43:07 +01:00
|
|
|
munin-node: plugins/* munin-node.conf
|
2007-06-11 17:45:16 +02:00
|
|
|
@VERSION=$$(cat VERSION); \
|
2007-11-30 11:43:07 +01:00
|
|
|
CONF=$$(grep -v '^#' munin-node.conf); \
|
2007-06-11 17:45:16 +02:00
|
|
|
echo "Making munin-node for muninlite version $$VERSION"; \
|
|
|
|
PLSTR=""; \
|
|
|
|
for PLGIN in $(PLUGINS); \
|
|
|
|
do \
|
|
|
|
echo "Adding plugin $$PLGIN"; \
|
|
|
|
PLSTR=$$(echo "$$PLSTR"; grep -v '^#' plugins/$$PLGIN); \
|
|
|
|
done; \
|
|
|
|
PLSTR=$$(echo "$$PLSTR" | sed -e 's/\\/\\\\/g' \
|
|
|
|
-e 's/\//\\\//g' \
|
|
|
|
-e 's/\$$/\\$$/g'); \
|
|
|
|
perl -p -e \
|
2007-11-30 11:43:07 +01:00
|
|
|
"s/\@\@VERSION\@\@/$$VERSION/;s/\@\@CONF\@\@/$$CONF/;s/\@\@PLUGINS\@\@/$(PLUGINS)/;s/\@\@PLSTR\@\@/$$PLSTR/;" \
|
2007-06-11 17:45:16 +02:00
|
|
|
munin-node.in > munin-node
|
|
|
|
@chmod +x munin-node
|
|
|
|
|
|
|
|
|
|
|
|
all: munin-node
|
|
|
|
|
|
|
|
clean-node:
|
|
|
|
@echo "Removing munin-node"
|
|
|
|
@rm -f munin-node
|
|
|
|
|
|
|
|
clean-tgz:
|
|
|
|
@echo "Old releases"
|
|
|
|
@rm -rf releases
|
|
|
|
|
|
|
|
clean: clean-node
|
|
|
|
|
|
|
|
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; \
|
|
|
|
rm -rf muninlite-$$VERSION/releases; \
|
|
|
|
tar zcvf muninlite-$$VERSION.tar.gz muninlite-$$VERSION >/dev/null; \
|
2007-11-30 11:43:07 +01:00
|
|
|
rm -rf muninlite-$$VERSION;
|