Module: check_mk
Branch: master
Commit: 343d155c0145d68968dcc8f2e248733dc230b4a4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=343d155c0145d6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 11 15:03:25 2014 +0100
pre-packed agents are now shipped with regular check_mk
---
Makefile | 18 ++++--------------
agents/Makefile | 10 ++++++++++
agents/windows/Makefile | 6 ++++++
3 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/Makefile b/Makefile
index f057ac6..baadd20 100644
--- a/Makefile
+++ b/Makefile
@@ -110,6 +110,7 @@ dist: mk-livestatus mk-eventd
--exclude "logstate.txt" \
--exclude "*.unversioned.exe" \
--exclude "*.cc" \
+ --exclude "*.c" \
--exclude "*.res" \
--exclude "*~" \
--exclude "Makefile" \
@@ -168,25 +169,14 @@ version:
if [ -n "$$newversion" ] ; then $(MAKE) NEW_VERSION=$$newversion setversion ;
fi
setversion:
- sed -ri 's/^(VERSION[[:space:]]*= *).*/\1'"$(NEW_VERSION)/" Makefile
agents/Makefile ; \
- for agent in agents/* ; do \
- if [ "$$agent" != agents/windows -a "$$agent" != agents/plugins
-a "$$agent" != agents/hpux ] ; then \
- sed -i 's/echo Version: [0-9.a-z]*/'"echo Version:
$(NEW_VERSION)/g" $$agent; \
- fi ; \
- done ; \
- sed -i 's/say "Version: .*"/say "Version:
$(NEW_VERSION)"/' agents/check_mk_agent.openvms
- sed -i 's/!define CHECK_MK_VERSION .*/!define CHECK_MK_VERSION
"'$(NEW_VERSION)'"/' agents/windows/installer*.nsi ; \
- sed -ri 's/^(VERSION[[:space:]]*= *).*/\1'"$(NEW_VERSION)/"
agents/windows/Makefile ; \
+ sed -ri 's/^(VERSION[[:space:]]*= *).*/\1'"$(NEW_VERSION)/" Makefile ;
\
sed -i 's/^AC_INIT.*/AC_INIT([MK Livestatus],
['"$(NEW_VERSION)"'], [mk(a)mathias-kettner.de])/'
livestatus/configure.ac ; \
sed -i 's/^VERSION=".*/VERSION="$(NEW_VERSION)"/'
mkeventd/bin/mkeventd ; \
sed -i 's/^VERSION=".*/VERSION="$(NEW_VERSION)"/'
doc/treasures/mknotifyd ; \
sed -i 's/^VERSION=".*/VERSION="$(NEW_VERSION)"/'
doc/treasures/liveproxy/liveproxyd ; \
sed -i 's/^VERSION=.*/VERSION='"$(NEW_VERSION)"'/'
scripts/setup.sh ; \
- echo 'check-mk_$(NEW_VERSION)-1_all.deb net optional' > debian/files ; \
- cd agents/windows ; rm check_mk_agent.exe check_mk_agent-64.exe check_mk_agent.msi ;
make ; cd ../.. ; \
- cp agents/windows/install_agent.exe check-mk-agent-$(NEW_VERSION).exe ; \
- cp agents/windows/install_agent-64.exe check-mk-agent-$(NEW_VERSION)-64.exe ; \
- cp agents/windows/check_mk_agent.msi check-mk-agent-$(NEW_VERSION).msi
+ echo 'check-mk_$(NEW_VERSION)-1_all.deb net optional' > debian/files
+ $(MAKE) -C agents NEW_VERSION=$(NEW_VERSION) setversion
headers:
doc/helpers/headrify
diff --git a/agents/Makefile b/agents/Makefile
index 7bee157..8741b8b 100644
--- a/agents/Makefile
+++ b/agents/Makefile
@@ -50,6 +50,16 @@ waitmax: waitmax.c
fi
@echo "Fine. Typing 'make install' as root now will install into
/usr/bin"
+setversion:
+ sed -ri 's/^(VERSION[[:space:]]*= *).*/\1'"$(NEW_VERSION)/" Makefile ;
\
+ sed -i 's/say "Version: .*"/say "Version: $(NEW_VERSION)"/'
agents/check_mk_agent.openvms ; \
+ for agent in *; do \
+ if [ "$$agent" != windows -a "$$agent" != plugins -a
"$$agent" != hpux ] ; then \
+ sed -i 's/echo Version: [0-9.a-z]*/'"echo Version:
$(NEW_VERSION)/g" $$agent; \
+ fi ; \
+ done ; \
+ $(MAKE) -C agents NEW_VERSION=$(NEW_VERSION) setversion
+
packages: rpm deb
rpm $(RPM_PACKAGE):
diff --git a/agents/mk-job.solaris b/agents/mk-job.solaris
old mode 100644
new mode 100755
diff --git a/agents/windows/Makefile b/agents/windows/Makefile
index da6fc8e..1218416 100755
--- a/agents/windows/Makefile
+++ b/agents/windows/Makefile
@@ -40,6 +40,12 @@ all: fix_linebreaks install_agent.exe install_agent-64.exe
msi_installer
.PHONY: inc_build_version fix_linebreaks
+setversion:
+ sed -i 's/!define CHECK_MK_VERSION .*/!define CHECK_MK_VERSION
"'$(NEW_VERSION)'"/' installer*.nsi ; \
+ sed -ri 's/^(VERSION[[:space:]]*= *).*/\1'"$(NEW_VERSION)/" Makefile ;
\
+ rm check_mk_agent.exe check_mk_agent-64.exe check_mk_agent.msi ; \
+ make
+
# Converts all files which are targeted to a windows system to CRLF
fix_linebreaks:
for F in mrpe/* plugins/* *.ini; do \