File: rules

package info (click to toggle)
html5lib 0.90-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 612 kB
  • ctags: 1,058
  • sloc: python: 9,275; makefile: 57; sh: 12
file content (76 lines) | stat: -rwxr-xr-x 1,380 bytes parent folder | download
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PKGNAME:=python-html5lib
PYVERS:=$(shell pyversions -r)


include /usr/share/dpatch/dpatch.make

build: patch build-stamp
build-stamp:
	dh_testdir

	set -e; \
	for py in $(PYVERS); do  \
	    $$py setup.py build; \
	done

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	set -e ;\
	if [ -d tests ]; then cd tests ;\
	for py in $(PYVERS); do  \
	    PYTHONPATH=$(CURDIR)/build/lib $$py runtests.py; \
	done; fi
endif

	touch $@

clean: clean-patched unpatch
clean-patched: patch-stamp
	dh_testdir
	dh_testroot
	rm -f install-stamp build-stamp
	-for py in $(PYVERS); do  \
	    $$py setup.py clean; \
	done
	find . -name \*.pyc | xargs rm -f
	rm -rf build
	dh_clean 

install: install-stamp
install-stamp:
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	set -e; \
	for py in $(PYVERS); do  \
	    $$py setup.py install --root=debian/$(PKGNAME); \
	done

	dh_installdocs -A
	dh_installexamples
	touch install-stamp

binary-arch: build install
# We have nothing to do by default.

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_compress -X.py
	dh_fixperms
	dh_pysupport
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install \
        clean-patched patch unpatch