[omd-commits] OMD Git: omd: shinken: prepare local install of the pyro and multiprocessing python modules

git version control git at mathias-kettner.de
Fri Dec 24 12:00:07 CET 2010


Module: omd
Branch: master
Commit: 908b8dfaca5dfa1ab0db64408287f94ecd6fdffd
URL:    http://omdistro.org/projects/omd/repository/revisions/908b8dfaca5dfa1ab0db64408287f94ecd6fdffd

Author: Gerhard Lausser <gerhard.lausser at consol.de>
Date:   Fri Dec 24 10:30:24 2010 +0000

shinken: prepare local install of the pyro and multiprocessing python modules

---

 packages/shinken/LIESMICH                |    8 ++++++++
 packages/shinken/Makefile                |   25 +++++++++++++++++++++++++
 packages/shinken/skel/etc/init.d/shinken |    2 ++
 3 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/packages/shinken/LIESMICH b/packages/shinken/LIESMICH
new file mode 100644
index 0000000..0db7c1c
--- /dev/null
+++ b/packages/shinken/LIESMICH
@@ -0,0 +1,8 @@
+Python-Module
+- multiprocessing
+  Ist erst seit 2.6 im Standardumfang von Python
+  Fuer aeltere Versionen muss multiprocessing extra installiert werden
+  http://pypi.python.org/packages/source/m/multiprocessing/multiprocessing-2.6.2.1.tar.gz
+- Pyro
+  http://www.xs4all.nl/~irmen/pyro3/download/Pyro-3.11.tar.gz
+
diff --git a/packages/shinken/Makefile b/packages/shinken/Makefile
index fc70a03..12f299d 100644
--- a/packages/shinken/Makefile
+++ b/packages/shinken/Makefile
@@ -4,15 +4,29 @@ NAME = shinken
 VERSION = 0.4.1
 DIR = $(NAME)-$(VERSION)
 
+PYRO=Pyro-3.11
+MP=multiprocessing-2.6.2.1
+PYRO_FILE=$(PYRO).tar.gz
+MP_FILE=$(MP).tar.gz
+PYRO_URL=http://www.xs4all.nl/~irmen/pyro3/download/$(PYRO_FILE)
+MP_URL=http://pypi.python.org/packages/source/m/multiprocessing/$(MP_FILE)
+
 build:
 	tar xzf $(DIR).tar.gz
 	set -e ; for p in patches/*.dif ; do \
 	    echo "applying $$p..." ; \
 	    ( cd $(DIR) ; patch -p1 -b ) < $$p ; \
 	done
+	test -f $(PYRO_FILE) || wget $(PYRO_URL)
+	test -f $(MP_FILE) || wget $(MP_URL)
 
 
 install:
+	$(MAKE) installshinken
+	#$(MAKE) installpyro
+	#$(MAKE) installmp
+
+installshinken:
 	# bin/shinken-* startfiles
 	mkdir -p $(DESTDIR)$(OMD_ROOT)/bin
 	install -m 755 $(DIR)/bin/shinken-arbiter $(DESTDIR)$(OMD_ROOT)/bin
@@ -28,5 +42,16 @@ install:
 	install -m 755 merge-shinken-config $(DESTDIR)$(OMD_ROOT)/bin
 	install -m 755 merge-shinken-specific-config $(DESTDIR)$(OMD_ROOT)/bin
   
+installpyro:
+	tar xzf $(PYRO_FILE)
+	( cd $(PYRO) ; python setup.py install --home=$(DESTDIR)$(OMD_ROOT) --install-scripts=$(DESTDIR)$(OMD_ROOT)/tmp --install-data=$(DESTDIR)$(OMD_ROOT)/tmp )
+
+installmp:
+	tar xzf $(MP_FILE)
+	( cd $(MP) ; PYTHONPATH=$(DESTDIR)$(OMD_ROOT)/lib/python python setup.py install --home=$(DESTDIR)$(OMD_ROOT) --install-scripts=$(DESTDIR)$(OMD_ROOT)/tmp --install-data=$(DESTDIR)$(OMD_ROOT)/tmp )
+
 clean:
 	rm -rf $(DIR)
+	rm -rf $(PYRO)
+	rm -rf $(MP)
+
diff --git a/packages/shinken/skel/etc/init.d/shinken b/packages/shinken/skel/etc/init.d/shinken
index 078305a..32ea79e 100755
--- a/packages/shinken/skel/etc/init.d/shinken
+++ b/packages/shinken/skel/etc/init.d/shinken
@@ -79,6 +79,8 @@ case "$1" in start|restart|reload|checkconfig)
     sed -ri 's/^([[:space:]]*port[[:space:]]*=[[:space:]]*)([0-9]+)/\1'${SHINKEN_POLLER_PORT}'/' $TARGET_ETC/pollerd.ini
     sed -ri 's/^([[:space:]]*port[[:space:]]*=[[:space:]]*)([0-9]+)/\1'${SHINKEN_REACTIONNER_PORT}'/' $TARGET_ETC/reactionnerd.ini
     sed -ri 's/^([[:space:]]*port[[:space:]]*=[[:space:]]*)([0-9]+)/\1'${SHINKEN_BROKER_PORT}'/' $TARGET_ETC/brokerd.ini
+    # force creation of a run-directory for the pid-files
+    test -d ${RUN} || mkdir -p ${RUN}
 esac
 
 usage() {



More information about the omd-commits mailing list