Update plone3 skeleton
[zope-bootstrap.git] / Makefile.pil
1 # -*- makefile -*-
2
3 PIL_VERSION     ?= 1.1.6
4 PIL_URL         ?= http://effbot.org/downloads/Imaging-$(PIL_VERSION).tar.gz
5
6 ###########################################################################
7
8 pil-unpack: $(PYTHON_DIR)/Extensions/Imaging-$(PIL_VERSION)/README
9 $(PYTHON_DIR)/Extensions/Imaging-$(PIL_VERSION)/README:
10         @$(httpget) $(PIL_URL) $(PYTHON_DIR)/Extensions/pil.tgz
11         tar -C $(PYTHON_DIR)/Extensions -xzf $(PYTHON_DIR)/Extensions/pil.tgz
12         rm -f $(PYTHON_DIR)/Extensions/pil.tgz
13 .PHONY: pil-unpack
14
15 pil-build: $(PYTHON_DIR)/bin/pilconvert.py
16 $(PYTHON_DIR)/bin/pilconvert.py:
17         cd $(PYTHON_DIR)/Extensions/Imaging-$(PIL_VERSION) && $(PYTHON) setup.py build --force
18         cd $(PYTHON_DIR)/Extensions/Imaging-$(PIL_VERSION) && $(PYTHON) setup.py install --force
19 .PHONY: pil-build
20
21 pil-rebuild: pil-clean pil-build
22 .PHONY: pil-rebuild
23
24 pil-clean:
25         rm -f $(PYTHON_DIR)/bin/pilconvert.py
26 .PHONY: pil-clean
27
28 pil: pil-unpack pil-build
29 .PHONY: pil
30
31 ###########################################################################
32
33 debdepends::
34         aptitude install libjpeg62-dev libfreetype6-dev
35
36 setup:: pil
37
38 fullhelp::
39         @echo "    pil-rebuild"
40         @echo "        recompile PIL plugin from source. This may be needed after"
41         @echo "        upgrading the host distribution."
42         @echo
43
44 varhelp::
45         @echo "    PIL_VERSION ($(PIL_VERSION))"
46         @echo "        Version of the Python Imaging Library to install."
47         @echo
48         @echo "    PIL_URL ($(PIL_URL))"
49         @echo "        URL to download the Python Imaging Library from. The default value"
50         @echo "        is automatically generated from PIL_VERSION."
51         @echo