File: rules

package info (click to toggle)
python-pmw 1.3.2-6
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 2,100 kB
  • ctags: 3,852
  • sloc: python: 17,191; makefile: 60
file content (89 lines) | stat: -rwxr-xr-x 2,268 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
77
78
79
80
81
82
83
84
85
86
87
88
89
#! /usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

packagedoc=python-pmw-doc
source_dir=$(CURDIR)/src/Pmw
package_dir=./debian/python-pmw
pdoc=./debian/python-pmw-doc
v=Pmw_1_3
PYVERS=$(shell pyversions -vr)

build: build-arch build-indep
build-arch:
build-indep: config build-stamp
build-stamp: build-all-pythons
	touch $@

build-all-pythons: $(PYVERS:%=build-python%)
	touch $@

# Build Python extensions for each version of Python
# Since the tarball is not in standard distutils format, we need to 
# execute setup.py from the src subdirectory.
build-python%:
	dh_testdir
	python$* setup.py build
	touch $@

clean: 
	dh_testdir
	-rm -f config ./setup.py ./Pmw
	-rm -rf build build-stamp build-all-pythons build-python*
	dh_clean -i

config: 
#	Make links to conventional locations for distutils in dist root
#	otherwise build will not work properly.
	ln -s src/Pmw ./Pmw
	ln -s src/setup.py ./setup.py
	touch $@

install: build-indep install-prereq install-all-pythons install-docs

install-prereq:
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

install-all-pythons: $(PYVERS:%=install-python%)

install-python%:
	python$* setup.py install --install-layout=deb	\
		--prefix=$(CURDIR)/debian/python-pmw/usr
	-find $(CURDIR)/debian/ -name '*.py[co]' | xargs rm -f

install-docs:
	mkdir -p $(pdoc)/usr/share/doc/$(packagedoc)/examples
	install -m 644 $(source_dir)/$(v)/demos/* 		\
		$(pdoc)/usr/share/doc/$(packagedoc)/examples/
	cp -pr $(source_dir)/$(v)/doc				\
		$(pdoc)/usr/share/doc/$(packagedoc)/html
	chmod a+x $(pdoc)/usr/share/doc/$(packagedoc)/examples/All.py

binary-indep: build-indep install
	dh_testdir
	dh_testroot
	dh_installdirs -Ai
	dh_installdocs -Ai $(source_dir)/README
	dh_installchangelogs -i $(source_dir)/$(v)/doc/changes.html
	dh_fixperms -i
	dh_compress -AiX.py
	dh_python2 -i --package=python-pmw
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch:
# There are no architecture-dependent files to be uploaded
# generated by this package.  If there were any they would be
# made here.


# Below here is fairly generic really

binary:	binary-indep binary-arch

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