File: rules

package info (click to toggle)
python-biom-format 2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,548 kB
  • ctags: 1,051
  • sloc: python: 6,257; makefile: 137; sh: 52
file content (51 lines) | stat: -rwxr-xr-x 1,661 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
#!/usr/bin/make -f

DH_VERBOSE := 1

pkg     := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
version := $(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- )
bindir  := $(CURDIR)/debian/$(pkg)/usr/bin
mandir  := $(CURDIR)/debian/$(pkg)/usr/share/man/man1

#UVER := $(shell LC_ALL=C dpkg-parsechangelog | awk '/^Version:/{print $$2;}' | sed -e 's,-[^-]*$$,,g')
#CYTHONVER := $(shell dpkg -l cython | awk '/^ii/{print $$3;}' || echo 0)
#MIN_CYTHONVER := 0.17~beta1-2
#NO_CYTHON := $(shell if dpkg --compare-versions $(CYTHONVER) lt $(MIN_CYTHONVER) ; then echo 0 ; else echo 1 ; fi)

export PYBUILD_TEST_NOSE = 1

pyrun = DEB_BUILD_OPTIONS= pybuild -s custom -p $(shell pyversions -dv) --test --test-args

%:
	dh $@ --with python2 --buildsystem=pybuild --with linktree

override_dh_auto_build:
	USE_CYTHON=true dh_auto_build
	$(pyrun) 'make --directory=doc singlehtml'
	$(pyrun) 'pyqi make-bash-completion \
	    --command-config-module biom.interfaces.optparse.config \
	    --driver-name biom -o debian/bash-completion'

override_dh_installman:
	$(pyrun) 'make --directory=doc man'
	dh_installman

override_dh_auto_clean:
	rm -rf build/tests
	dh_auto_clean
	find -name "._*" -delete  #Remove any Mac metadata files
	make --directory=doc clean
	rm -f debian/bash-completion
	rm -f python-code/support-code/_*.cpp

override_dh_install:
	dh_install
	dh_bash-completion
	# All *.py scripts simply say
	#   "This script no longer exists. ..."
	rm -f $(bindir)/*.py

get-orig-source:
	# . debian/get-orig-source
	mkdir -p ../tarballs
	uscan --verbose --force-download --repack --compression xz --destdir=../tarballs