check_oracle_health: update to 1.9.3.5
[omd.git] / packages / mod_python / Makefile
blob73c32884e5db0dea838aef8d692bee9900a8899f
1 include ../../Makefile.omd
3 NAME = mod_python
4 VERSION = 3.3.1
5 DIR = $(NAME)-$(VERSION)
7 CONFIGUREOPTS = \
8 --prefix=$(OMD_ROOT)
10 APACHE_VERSION = $(shell $(APACHE_BIN) -v | awk '/version/ {print $$3}' | awk -F/ '{print $$2}')
11 APACHE_VERSION_MAIN = $(word 1, $(subst ., ,$(APACHE_VERSION)))
12 APACHE_VERSION_SUB = $(word 2, $(subst ., ,$(APACHE_VERSION)))
15 build:
16 tar xzf $(DIR).tar.gz
17 set -e ; for p in patches/*.dif ; do \
18 echo "applying $$p..." ; \
19 ( cd $(DIR) ; patch -p1 -b ) < $$p ; \
20 done
21 # Apply special patch for apache >= 2.4
22 if [ $(APACHE_VERSION_MAIN) -ge 2 -a $(APACHE_VERSION_SUB) -ge 4 ]; then \
23 echo "applying patches/0008-apache24.patch..." ; \
24 ( cd $(DIR) ; patch -p1 -b ) < patches/0008-apache24.patch ; \
26 cd $(DIR) ; ./configure $(CONFIGUREOPTS)
27 echo '#define OMD_VERSION "$(OMD_VERSION)"' > $(DIR)/src/omd_version.h
28 $(MAKE) -C $(DIR) all
30 install:
31 # Use 'make install' of mod_python into a temporary file.
32 # mod_python does not honor --prefix, so we move the stuff over...
33 make DESTDIR=$$(pwd)/tmp.root -C $(DIR) install
35 # Installation directories vary much
36 mkdir -p $(DESTDIR)$(OMD_ROOT)/lib/apache/modules
37 MP=$$(find tmp.root -name mod_python.so) ; \
38 install -m 644 $$MP $(DESTDIR)$(OMD_ROOT)/lib/apache/modules
40 mkdir -p $(DESTDIR)$(OMD_ROOT)/lib/python/mod_python
41 PYDIR=$$(find tmp.root -name "*egg*" | sed 's@/mod_python.*@@') ; \
42 if [ -z "$$PYDIR" ] ; then PYDIR=$$(find tmp.root/ -name __init__.py | sed 's@/mod_python/__init__.*@@') ; fi ; \
43 install $$PYDIR/mod_python/* $(DESTDIR)$(OMD_ROOT)/lib/python/mod_python ; \
44 if [ -e $$PYDIR/*egg* ] ; then install -m 644 $$PYDIR/*egg* $(DESTDIR)$(OMD_ROOT)/lib/python ; fi
45 rm -rf tmp.root
47 skel:
49 clean:
50 rm -rf $(NAME)-*.*.[0-9] tmp.root