File: rules

package info (click to toggle)
python-dpkt 1.6%2Bsvn54-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 448 kB
  • ctags: 1,950
  • sloc: python: 5,136; makefile: 71
file content (69 lines) | stat: -rwxr-xr-x 1,709 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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpatch/dpatch.make

PYVERS=$(shell pyversions -r)

PACKAGE = python-dpkt
URL:=http://dpkt.googlecode.com/svn/trunk/
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')
SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz

build: patch-stamp

clean: unpatch
	dh_testdir
	
	# Add here commands to clean up after the build process.
	for python in $(PYVERS); do \
	   $$python setup.py clean; \
	done
	
	rm -f build-stamp
	rm -f dpkt/*.pyc dpkt/*.pyo
	
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_installdirs
	
	for python in $(PYVERS); do \
	   $$python setup.py install --root=debian/python-dpkt; \
	done

# Build architecture-dependent files here.
binary-arch:
# We have nothing to do by default.

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGES
	dh_installdocs AUTHORS HACKING
	dh_installexamples examples/*
	dh_pysupport
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

get-orig-source:
	@@dh_testdir
	@@rm -rf $(TARBALL)
	@@mkdir get-orig-source
	@@svn export -r $(SVN_REVISION) $(URL) \
               get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
	@@echo Cleaning up ...
	@@GZIP=--best tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig
	@@rm -rf get-orig-source
	@@echo "  "$(TARBALL)" created; move it to the right destination to build the package"

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