1 include ..
/..
/Makefile.omd
5 DIR
= $(NAME
)-$(VERSION
)
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
)))
17 set
-e
; for p in patches
/*.dif
; do \
18 echo
"applying $$p..." ; \
19 ( cd
$(DIR
) ; patch
-p1
-b
) < $$p ; \
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
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
50 rm -rf
$(NAME
)-*.
*.
[0-9] tmp.root