summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: de263987e67ef7c6ff8090f03cdddd9d0b9a1067 (plain)
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

export DH_VERBOSE=1
export DH_ALWAYS_EXCLUDE=.svn

PYDEF  = $(shell pyversions -d)
PYVERS = $(shell pyversions -r)
PYVERS = python2.4 python2.5


#############
### Build ###
build: build-stamp
build-stamp: $(PYVERS:%=build-ext-%)
	dh_testdir
	#docbook-to-man debian/python-dmidecode.sgml > python-dmidecode.1
	#$(MAKE) -f Makefile
	touch $@
build-ext-%:
	$(subst $(PYDEF),python,$*) src/setup.py build


###############
### Install ###
install: install-stamp
	dh_testdir
	dh_testroot
	dh_installdirs
	#$(MAKE) DESTDIR=$(CURDIR)/debian/python-dmidecode install
install-stamp: build-stamp $(PYVERS:%=install-ext-%)
install-ext-%:
	$(subst $(PYDEF),python,$*) src/setup.py install --root $(CURDIR)/debian/python-dmidecode


#############
### Clean ###
clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp configure-stamp
	-rm -rf $(CURDIR)/debian/python-dmidecode
	-$(MAKE) -f Makefile clean
	dh_clean


binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
	dh_install
#	dh_python
#	dh_pysupport
	dh_pycentral
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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