File: rules

package info (click to toggle)
pkpgcounter 3.50-7.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 544 kB
  • ctags: 295
  • sloc: python: 2,934; makefile: 39; sh: 37
file content (56 lines) | stat: -rwxr-xr-x 1,211 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
#!/usr/bin/make -f
# -*- makefile -*-
#export DH_VERBOSE=1

# The versions of python currently supported
PYTHON=$(shell pyversions -d)

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

build: build-stamp

build-stamp: patch
	dh_testdir
	$(PYTHON) setup.py build
	touch $@

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f *-stamp
	rm -rf compile build
	./clean.sh
	dh_clean

install: build install-$(PYTHON)

install-$(PYTHON):
	dh_testdir
	dh_testroot
	$(PYTHON) setup.py install --root `pwd`/debian/pkpgcounter/ $(py_setup_install_args)
	find ./debian/pkpgcounter/usr/lib -name '*\.py' | xargs sed -i -e '1 s|^#\!.*python.*||'
	sed -i -e '1 s|^#\!.*python.*|#!/usr/bin/python|' ./debian/pkpgcounter/usr/bin/pkpgcounter
	rm ./debian/pkpgcounter/usr/share/doc/pkpgcounter/COPYING

# Build architecture-independent files here.
# Pass to all debhelper commands in this target to reduce clutter.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installchangelogs
	dh_python2
	dh_compress -X.py
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep

binary-arch:

.PHONY: build clean binary-indep binary install