File: rules

package info (click to toggle)
pywbxml 0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,436 kB
  • ctags: 43
  • sloc: sh: 8,867; makefile: 64; python: 24
file content (71 lines) | stat: -rwxr-xr-x 1,546 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
#!/usr/bin/make -f

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

include /usr/share/quilt/quilt.make

configure_flags += --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE)

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	configure_flags += --host=$(DEB_HOST_GNU_TYPE)
endif

PYVERS=$(shell pyversions -vr)

clean: unpatch
	dh_testdir
	dh_testroot
	-rm -rf build build-stamp $(PYVERS:%=build-%/)
	dh_clean

build-%/configure-stamp:
	dh_testdir
	mkdir -p build-$*
	cd build-$* && \
		PYTHON=/usr/bin/python$* CFLAGS="$(CFLAGS)" \
			$(CURDIR)/configure $(configure_flags)
	touch $@

build-%/build-stamp: build-%/configure-stamp
	dh_testdir
	$(MAKE) -C build-$*
	touch $@

build: patch $(PYVERS:%=build-%/build-stamp)

install-clean:
	dh_testdir
	dh_testroot
	dh_clean -k

install-%: build-%/build-stamp
	dh_testdir
	dh_testroot
	$(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/python-wbxml

install: build install-clean $(PYVERS:%=install-%)
	-rm $(CURDIR)/debian/python-wbxml/usr/lib/python*/site-packages/*.la \
	  $(CURDIR)/debian/python-wbxml/usr/lib/python*/site-packages/*.a

binary-indep:

binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installchangelogs -a
	dh_installdocs -a
	dh_installexamples -a
	dh_pycentral -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch

.PHONY: clean binary-indep binary-arch binary