File: rules

package info (click to toggle)
markupsafe 0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 124 kB
  • sloc: python: 588; ansic: 178; makefile: 61
file content (77 lines) | stat: -rwxr-xr-x 2,123 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/make -f

#export DH_VERBOSE=1
PYVERS=$(shell pyversions -vr) $(shell py3versions -sv)

include /usr/share/python/python.mk
pkgdir = $(CURDIR)/debian/python$(if $(patsubst 3.%,,$(1)),,3)-markupsafe

clean:
	dh_testdir
	dh_testroot
	rm -rf dist build MarkupSafe.egg-info
	find . -name '*\.pyc' -delete
	dh_clean install-stamp build-stamp \
		$(PYVERS:%=install-python%) $(PYVERS:%=build-python%) \
		$(PYVERS:%=install-debug-python%) $(PYVERS:%=build-debug-python%)

build: build-stamp

build-stamp: $(PYVERS:%=build-python%) $(PYVERS:%=build-debug-python%)
	touch $@

build-python%:
	python$* setup.py --with-speedups build
	touch $@

build-debug-python%:
	python$*-dbg setup.py --with-speedups build
	touch $@

install: install-stamp
install-stamp: $(PYVERS:%=install-python%) $(PYVERS:%=install-debug-python%)
	dh_install
	touch $@

install-python%: build
	python$* setup.py --with-speedups install \
		--install-layout=deb --skip-build \
		--single-version-externally-managed \
		--root $(call pkgdir,$*)
	rm -f $(call pkgdir,$*)$(call py_libdir,$*)/markupsafe/_speedups.c
	touch $@

install-debug-python%: build
	python$*-dbg setup.py --with-speedups install \
		--install-layout=deb --skip-build \
		--single-version-externally-managed \
		--root $(call pkgdir,$*)-dbg/
	touch $@

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -a
	dh_installdocs -a
	dh_python2 -a
	dh_python3 -a
	dh_makeshlibs -a
	dh_strip -ppython-markupsafe --dbg-package=python-markupsafe-dbg
	dh_strip -ppython3-markupsafe --dbg-package=python3-markupsafe-dbg
	rm -rf $(call pkgdir,2.X)-dbg/usr/share/doc/python-markupsafe-dbg
	rm -rf $(call pkgdir,3.X)-dbg/usr/share/doc/python3-markupsafe-dbg
	ln -s python-markupsafe $(call pkgdir,2.X)-dbg/usr/share/doc/python-markupsafe-dbg
	ln -s python3-markupsafe $(call pkgdir,3.X)-dbg/usr/share/doc/python3-markupsafe-dbg
	dh_compress -a -X.py
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a -- -Z bzip2

binary-indep:

binary: binary-indep binary-arch

.PHONY: build clean binary-indep binary-arch binary install