File: rules

package info (click to toggle)
pyfastx 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,336 kB
  • sloc: ansic: 4,826; python: 1,816; sh: 505; perl: 66; makefile: 31
file content (36 lines) | stat: -rwxr-xr-x 1,340 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# DH_VERBOSE := 1
export LC_ALL=C.UTF-8
include /usr/share/dpkg/default.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

export PYBUILD_BEFORE_TEST=\
	mkdir -pv {build_dir}/src \
	&& cp -v src/version.h {build_dir}/src

export PYBUILD_AFTER_TEST=rm -rvf {build_dir}/src {build_dir}/non.fa

%:
	dh $@ --buildsystem pybuild --with python3

INDEXED_GZIP_DIR = /usr/lib/python3/dist-packages/indexed_gzip
execute_before_dh_auto_build:
	# Upstream originally vendored these files straight in src/, but
	# stopped for some reason.  We're pulling them instead from the
	# package python3-indexed-gzip.
	cp --update=none $(INDEXED_GZIP_DIR)/zran.c src/
	cp --update=none $(INDEXED_GZIP_DIR)/zran.h src/
	cp --update=none $(INDEXED_GZIP_DIR)/zran_file_util.c src/
	cp --update=none $(INDEXED_GZIP_DIR)/zran_file_util.h src/

execute_after_dh_installdocs:
	# Deduplicate changelog entries flagged by lintian.
	rm debian/pyfastx/usr/share/doc/pyfastx/docs/changelog.rst*
	cd debian/pyfastx/usr/share/doc/pyfastx/docs \
	&& ln -s ../changelog.gz changelog.rst.gz

execute_after_dh_installexamples:
	# Remove duplicate uncompressed files caused by the nature of the test;
	# we can get them back during the CLI test.
	rm debian/pyfastx/usr/share/doc/pyfastx/examples/test.fa
	rm debian/pyfastx/usr/share/doc/pyfastx/examples/test.fq