Merge branch 'master' of mathias-kettner.de:omd
[omd.git] / packages / mod-gearman / Makefile
blobbd03d4dcbca63425f82b08c020d831a85ceb3b83
1 include ../../Makefile.omd
3 NAME = mod_gearman
4 VERSION = 1.5.5
5 GEARMAND = $(shell grep "^VERSION " ../gearmand/Makefile | awk '{ print $$3 }')
6 DIR = mod_gearman-$(VERSION)
8 .PHONY: skel
10 build:
11 test -f mod_gearman-${VERSION}.tar.gz || wget "http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-$(VERSION).tar.gz"
12 tar xzf mod_gearman-$(VERSION).tar.gz
13 #for p in patches/*.patch ; do \
14 # echo "applying $$p..." ; \
15 # ( cd $(DIR) ; patch -p1 -b ) < $$p || exit 1; \
16 #done
17 cd $(DIR) && \
18 ./configure --prefix=$(OMD_ROOT) --enable-embedded-perl --with-gearman=$(shell pwd)/../gearmand/gearmand-${GEARMAND} && \
19 $(MAKE) -j 1
21 install:
22 $(MAKE) DESTDIR=$(DESTDIR) -C $(DIR) -j 1 install
23 # fix path for plugin
24 [ -d $(DESTDIR)$(OMD_ROOT)/lib/nagios/plugins ] || mkdir -p $(DESTDIR)$(OMD_ROOT)/lib/nagios/plugins
25 mv $(DESTDIR)$(OMD_ROOT)/bin/check_gearman $(DESTDIR)$(OMD_ROOT)/lib/nagios/plugins/
26 rm -rf $(DESTDIR)$(OMD_ROOT)/share/mod_gearman/*.conf
27 rm -f $(DESTDIR)$(OMD_ROOT)/lib/mod_gearman/mod_gearman.so
28 rm -rf $(DESTDIR)$(OMD_ROOT)/etc
29 rm -rf $(DESTDIR)$(OMD_ROOT)/var
31 skel:
32 mkdir -p $(SKEL)/etc/mod-gearman
33 cp $(DIR)/etc/mod_gearman_neb.conf.in $(SKEL)/etc/mod-gearman/server.cfg
34 cp $(DIR)/etc/mod_gearman_worker.conf.in $(SKEL)/etc/mod-gearman/worker.cfg
35 for p in patches/*.skel_patch ; do \
36 echo "applying $$p..." ; \
37 ( cd $(SKEL) ; patch -p1 ) < $$p || exit 1; \
38 done
39 find $(SKEL)/etc/mod-gearman -name \*.orig -exec rm {} \;
40 mkdir -p $(SKEL)/var/log/mod_gearman
41 touch $(SKEL)/var/log/mod_gearman/neb.log
42 touch $(SKEL)/var/log/mod_gearman/worker.log
46 clean:
47 rm -rf $(DIR)