File: rules

package info (click to toggle)
pythoncard 0.8.2-5
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 9,364 kB
  • ctags: 6,988
  • sloc: python: 56,804; makefile: 60; sh: 22
file content (75 lines) | stat: -rwxr-xr-x 2,124 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
#!/usr/bin/make -f

build_dir     = build
install_dir   = debian/tmp
pyvers       := $(shell pyversions -r)

-include /usr/share/python/python.mk

binary: binary-indep binary-arch

binary-arch: ;

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -A docs/changelog.txt
	dh_installmenu
	dh_installdocs
	dh_installman
	dh_install --list-missing --sourcedir $(install_dir)
	dh_fixperms
	dh_compress -X.py
	dh_python2
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

install: build
	dh_testdir
	dh_testroot
	dh_installdirs
	for py in $(pyvers); do \
	    $$py setup.py install --no-compile --root=debian/tmp ${py_setup_install_args}; done
	
	rm -f  $(install_dir)/usr/lib/python*/*-packages/PythonCard/install-pythoncard.py
	rm -f  $(install_dir)/usr/lib/python*/*-packages/PythonCard/PKG-INFO
	rm -f  $(install_dir)/usr/lib/python*/*-packages/PythonCard/README.txt
	rm -f  $(install_dir)/usr/lib/python*/*-packages/PythonCard/LICENSE.txt
	rm -f  $(install_dir)/usr/lib/python*/*-packages/PythonCard/setup.py
	rm -f  $(install_dir)/usr/lib/python*/*-packages/PythonCard/__version__.pyc
	rm -f  $(install_dir)/usr/lib/python*/*-packages/PythonCard/docs/changelog.txt
	rm -f  $(install_dir)/usr/lib/python*/*-packages/PythonCard/docs/readme.txt
	rm -rf $(install_dir)/usr/lib/python*/*-packages/PythonCard/tests
	rm -rf $(install_dir)/usr/lib/python*/*-packages/PythonCard/build
	
	# Fix 'executable-not-elf-or-script' lintian warnings.
	find $(install_dir)/usr/lib/python*/*-packages/PythonCard -executable | \
	    grep '\.\(jpg\|png\|rsrc\.py\|html\|txt\|/versionInfo\.py\)$$' | \
	    xargs chmod a-x

build: build-indep

build-arch:
	: # Nothing to do

build-indep: build-stamp
build-stamp: 
	dh_testdir
	set -e; \
	for py in $(pyvers); do \
	    $$py setup.py build ; done
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-for py in $(pyvers); do \
	    $$py setup.py clean --all; done
	find . -name "*.pyc" | xargs rm -f
	find . -name "*.pyo" | xargs rm -f
	rm -rf $(build_dir) $(install_dir)
	dh_clean

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