File: rules

package info (click to toggle)
argparse 1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 844 kB
  • ctags: 1,028
  • sloc: python: 4,630; makefile: 50
file content (71 lines) | stat: -rwxr-xr-x 1,643 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
#!/usr/bin/make -f

DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
PKG_DIR=argparse-$(DEB_UPSTREAM_VERSION)
get-orig-source:
	uscan --force-download --rename --repack --download-version=$(DEB_UPSTREAM_VERSION) --destdir=.

build:
	dh_testdir
	python setup.py build

	# Generate the docs from the doc sources
	[ ! -e doc/source ] || sphinx-build doc/source html

	#And clean the cruft
	[ ! -e html/_sources ] || rm -rf html/_sources
	[ ! -e html/.doctrees ] || rm -rf html/.doctrees
	[ ! -e html/.buildinfo ] || rm -rf html/.buildinfo
	[ ! -e html/objects.inv ] || rm -rf html/objects.inv

	touch $@

clean:
	dh_testdir
	dh_testroot

	[ ! -e html ] || rm -rf html
	[ ! -e doc.orig ] || mv doc.orig doc

	python setup.py clean --all
	[ -f argparse.pyc ] && rm -f argparse.pyc

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	[ ! -e doc ] || mv doc doc.orig

	python setup.py install --root $(CURDIR)/debian/python-argparse
	
	# Remove jquery.js javascript as per policy 4.13
	[ ! -e html/_static/jquery.js ] || rm -rf html/_static/jquery.js


binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples test/*
	dh_installchangelogs
	dh_link -p python-argparse-doc \
		/usr/share/javascript/jquery/jquery.js \
		/usr/share/doc/python-argparse-doc/html/_static/jquery.js
	dh_pysupport
	dh_compress -Xexamples -X.js
	dh_fixperms
	dh_strip
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: build install

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install get-orig-source