File: rules

package info (click to toggle)
paleomix 1.2.13.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,804 kB
  • sloc: python: 28,145; sh: 477; makefile: 184
file content (51 lines) | stat: -rwxr-xr-x 1,873 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

include /usr/share/dpkg/default.mk

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

export PYBUILD_TEST_ARGS = --exclude='(test_requirementobj__version__command_not_executable)'

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# apply fix that seems to be needed due to improperly set
	# time zone in pbuilder
	sed -i~ 's/"MTime": "2005-07-07 08:50:00"/"MTime": "2005-07-07 06:50:00"/' tests/common_tests/makefile_test.py
	PATH=$(CURDIR)/bin/:$(PATH) dh_auto_test
	mv tests/common_tests/makefile_test.py~ tests/common_tests/makefile_test.py
endif

override_dh_install:
	dh_install
	find debian -name LICENSE -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/python2.7/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