File: rules

package info (click to toggle)
python-werkzeug 0.8.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,940 kB
  • sloc: python: 16,194; makefile: 143; pascal: 66; xml: 16
file content (45 lines) | stat: -rwxr-xr-x 1,454 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
#!/usr/bin/make -f

# Copyright 2009, Noah Slater <nslater@tumbolia.org>

# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and this
# notice are preserved.

export PYTHONPATH=$(abspath $(CURDIR))
PKGDIR=$(CURDIR)/debian/python-werkzeug/

include /usr/share/python/python.mk

%:
	dh $@ --with python2,sphinxdoc

override_dh_auto_install:
	python setup.py install \
		--single-version-externally-managed \
		--install-layout=deb \
		--root $(PKGDIR)
	dh_link usr/share/javascript/jquery/jquery.js \
	  $(call py_libdir,$(shell pyversions -vd))/werkzeug/debug/shared/jquery.js
	dh_link /usr/share/doc/python-werkzeug/html/_sources \
		/usr/share/doc/python-werkzeug/rst

override_dh_fixperms:
	find $(PKGDIR) -name '*\.png' -exec chmod -x '{}' \;
	dh_fixperms

clean:
	rm -rf build
	dh_clean
	make -C docs clean
	find $(CURDIR) -name '*\.py[co]' -delete
	find $(CURDIR) \( -name '\._*' -o -name '\.DS_Store' \) -delete

get-orig-source:
	trap 'rm -rf $(CURDIR)/.werkzeug-tarball' EXIT;\
	VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-+]+).*,\1,p') &&\
	mkdir -p .werkzeug-tarball &&\
	uscan --force-download --rename --destdir=.werkzeug-tarball --upstream-version=$$VER &&\
	cd .werkzeug-tarball &&\
	tar xf python-werkzeug*tar.gz --exclude ubuntu.ttf --exclude FONT_LICENSE &&\
	tar Jcf ../python-werkzeug_$$VER+dfsg.orig.tar.xz Werkzeug-$$VER