File: rules

package info (click to toggle)
pythoncard 0.8.1-8.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 5,352 kB
  • ctags: 4,594
  • sloc: python: 42,401; makefile: 55; sh: 22
file content (65 lines) | stat: -rwxr-xr-x 1,816 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
#!/usr/bin/make -f

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

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_pysupport
	dh_python
	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; done
	
	rm -f  $(install_dir)/usr/lib/python*/site-packages/PythonCard/install-pythoncard.py
	rm -f  $(install_dir)/usr/lib/python*/site-packages/PythonCard/PKG-INFO
	rm -f  $(install_dir)/usr/lib/python*/site-packages/PythonCard/README.txt
	rm -f  $(install_dir)/usr/lib/python*/site-packages/PythonCard/LICENSE.txt
	rm -f  $(install_dir)/usr/lib/python*/site-packages/PythonCard/setup.py
	rm -f  $(install_dir)/usr/lib/python*/site-packages/PythonCard/__version__.pyc
	rm -f  $(install_dir)/usr/lib/python*/site-packages/PythonCard/docs/changelog.txt
	rm -f  $(install_dir)/usr/lib/python*/site-packages/PythonCard/docs/readme.txt
	rm -rf $(install_dir)/usr/lib/python*/site-packages/PythonCard/tests
	rm -rf $(install_dir)/usr/lib/python*/site-packages/PythonCard/build

build: 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
	rm -f build-stamp
	-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 clean