File: rules

package info (click to toggle)
primer3 2.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 134,556 kB
  • sloc: ansic: 16,336; perl: 1,595; makefile: 260; sh: 39
file content (54 lines) | stat: -rwxr-xr-x 1,639 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
52
53
54
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

sampledir:=$(CURDIR)/debian/$(DEB_SOURCE)-examples/usr/share/doc/$(DEB_SOURCE)/examples

BUILDARCH:=$(shell dpkg-architecture -q DEB_BUILD_ARCH_ENDIAN)

P3CORE_FAILED_TESTS:='primer_masker' \
	      'primer_masker_formatted'

FAILED_TESTS:=testmasker

%:
	dh $@ --sourcedirectory=src

override_dh_auto_build:
	dh_auto_build -- 'CPP=$$(CXX)'

override_dh_auto_test:
ifneq ($(BUILDARCH),little)
	cp -a test/p3test.pl test/p3test.pl~
	cp -a test/Makefile test/Makefile~
	# exclude tests known to fail on big endian
	# See README.source for further explanation.
	for tst in $(P3CORE_FAILED_TESTS) ; do sed -i "/$${tst}/d" test/p3test.pl ; done
	sed -i "0,/$(FAILED_TESTS)/s///" test/Makefile
	sed -i "/$(FAILED_TESTS)/,/endif/d" test/Makefile
endif
	dh_auto_test --sourcedirectory=test
ifneq ($(BUILDARCH),little)
	# restore original test file
	mv test/p3test.pl~ test/p3test.pl
	mv test/Makefile~ test/Makefile
endif
	dh clean --sourcedirectory=test


override_dh_installexamples:
	dh_installexamples
	mkdir -p $(sampledir)/test;
	mkdir -p $(sampledir)/src;
	mkdir -p $(sampledir)/settings_files;
	mkdir -p $(sampledir)/kmer_lists;
	cp -aR ./test/* $(sampledir)/test;
	cp -aR ./src/humrep_and_simple.txt $(sampledir)/src;
	cp -a settings_files/primer*.txt $(sampledir)/settings_files;
	cp -aR ./kmer_lists/*.list $(sampledir)/kmer_lists;

	chmod -x $(sampledir)/test/thal*;
	sed -i 's#/usr/local/bin/perl#/usr/bin/perl#' $(sampledir)/test/long_seq_tm_test.pl ;
	sed -i 's#/usr/local/bin/perl#/usr/bin/perl#' $(sampledir)/test/vgrep.pl ;