File: rules

package info (click to toggle)
paleomix 1.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,128 kB
  • sloc: python: 21,288; sh: 182; makefile: 37
file content (51 lines) | stat: -rwxr-xr-x 1,679 bytes parent folder | download | duplicates (3)
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

include /usr/share/dpkg/default.mk

# DH_VERBOSE := 1

# README.rst is parsed in test
export PYBUILD_BEFORE_TEST=cp -a README.rst {build_dir};

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	PATH=$(CURDIR)/bin/:$(PATH) dh_auto_test
endif

override_dh_install:
	dh_install
	find debian -name LICENSE -delete
	find debian -name README.rst -delete

override_dh_fixperms:
	dh_fixperms
	for rs in `find debian -iname "*.r"` ; do \
	    if head -n 1 $$rs | grep -q '^#!/usr/bin/.*Rscript' ; then \
	        chmod +x $$rs ; \
	    else \
	        chmod -x $$rs ; \
	    fi ; \
	done

override_dh_installdocs:
	dh_installdocs
	# since tests dir contains empty files which are used afterwards for
	# testing and dh_installdocs is ignoring empty files we need to make
	# sure all files are really copied
	rsync -a -v tests debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)
	# test runner is seeking for paleomix modules in source - we use inside the installed package
	### sed -i 's:(find paleomix -mindepth 1:(find /usr/lib/python*/dist-packages/paleomix -mindepth 1:' debian/*/usr/share/doc/*/tests/run
	#echo "======  Also empty files belong to the docs ======"
	#find debian -name "empty_file*"
	#find debian -name "timestamp_*"
	#echo "======  Hope something was printed between these lines ===="
	#
	# This test tries to execute setup.sh which does not work outside source directory
	find debian/$(DEB_SOURCE)/usr/share/doc/ -name fileutils_test.py -delete
	find debian/$(DEB_SOURCE)/usr/share/doc/ -name setup.h -delete

override_dh_python3:
	dh_python3 --verbose --shebang=/usr/bin/python3