File: rules

package info (click to toggle)
python-lz4 0.7.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 120 kB
  • ctags: 84
  • sloc: ansic: 172; python: 49; makefile: 23
file content (31 lines) | stat: -rwxr-xr-x 1,021 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with python2

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e \
	;LIBPATH=$$(dirname $$(find build -type f -name lz4.so -print0)) \
	;for python in $(shell pyversions -r); do \
	    for test in $(wildcard ./tests/t*.py); do \
	        PYTHONPATH="$${LIBPATH}:$(PYTHONPATH)" \
	        $$python $${test} \
	    ;done \
	;done
endif

DPATH := $(abspath $(dir $(MAKEFILE_LIST)))
VER ?= $(shell dpkg-parsechangelog -l$(DPATH)/changelog -SVersion | perl -ne 'print $$1 if m{([\d\.]+)}')
.PHONY: get-orig-source
## http://wiki.debian.org/onlyjob/get-orig-source
get-orig-source:  $(info I: $(VER))
	@echo "# Downloading..."
	uscan --noconf --verbose --rename \
              --destdir=$(CURDIR) --check-dirname-level=0 \
              --force-download --download-version $(VER) $(DPATH) \
              --repack --compression xz
	mv -v python-lz4_$(VER).orig.tar.xz python-lz4_$(VER)+dfsg.orig.tar.xz