File: rules

package info (click to toggle)
xlwt 0.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 716 kB
  • ctags: 1,730
  • sloc: python: 8,282; makefile: 30
file content (41 lines) | stat: -rwxr-xr-x 1,101 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
#!/usr/bin/make -f

#export DH_VERBOSE=1
include /usr/share/python/python.mk
PYVERS=$(shell pyversions -vd)


%:
	dh $@

override_dh_auto_clean:
	find . -name '*\.py[co]' -delete
	rm -rf build

override_dh_install:
	rm -r $(CURDIR)/debian/python-xlwt$(call py_libdir,$(PYVERS))/xlwt/examples
	dh_install

override_dh_installchangelogs:
	dh_installchangelogs -i HISTORY.html

override_dh_compress:
	dh_compress -i -X.py

get-orig-source:
	REV=$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*svn([^-]+).*,\1,p'); \
	VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p'); \
	if [ x$$REV = x ]; then \
	  uscan --force-download --rename --download-version=$$VER --destdir=.; \
      tar -zxf xlwt_$$VER.orig.tar.gz; \
      rm -f xlwt-$$VER/xlwt/antlr.py; \
      tar -zcf xlwt_$$VER.orig.tar.gz xlwt-$$VER; \
      rm -rf xlwt-$$VER; \
	else \
	  svn -q export -r $$REV https://secure.simplistix.co.uk/svn/xlwt/trunk xlwt-r$$REV && \
	  rm -f xlw-r$$REV/xlwt/antlr.py && \
	  tar -zcf ./xlwt_$$VER.orig.tar.gz xlwt-r$$REV; \
	  rm -rf xlwt-r$$REV; \
	fi

.PHONY: get-orig-source