Merge branch 'master' of mathias-kettner.de:omd
[omd.git] / packages / python / Makefile
blob364fefbd2987eb9ac3acc096e035ef261b4ecea9
1 include ../../Makefile.omd
3 NAME = Python
4 VERSION = 2.7.11
5 DIR = $(NAME)-$(VERSION)
7 .PHONY: skel
9 build:
10 tar xzf $(DIR).tgz
11 cd $(DIR) ; \
12 ./configure \
13 --prefix="" \
14 --enable-shared \
15 --enable-unicode=ucs4 \
16 LDFLAGS="-Wl,--rpath,$(OMD_ROOT)/lib" \
17 ; \
18 $(MAKE) -j2
20 # Install python files (needed by dependent packages like mod_python, python-modules, ...)
21 # during compilation and install targets
22 $(MAKE) -C $(DIR) DESTDIR=$(shell pwd)/tmp.python27 install
24 install:
25 $(MAKE) -C $(DIR) DESTDIR=$(DESTDIR)$(OMD_ROOT) install
27 # Cleanup some unused stuff
28 rm $(DESTDIR)$(OMD_ROOT)/bin/idle
29 rm $(DESTDIR)$(OMD_ROOT)/bin/smtpd.py
31 # Fix python interpreter for kept scripts
32 sed -i "1s|^#!.*python|#!$(OMD_ROOT)/bin/python|" \
33 $(DESTDIR)$(OMD_ROOT)/bin/pydoc \
34 $(DESTDIR)$(OMD_ROOT)/bin/python2.7-config \
35 $(DESTDIR)$(OMD_ROOT)/bin/2to3
37 skel:
39 clean:
40 rm -rf $(DIR) tmp.python27