File: rules

package info (click to toggle)
bedtools 2.31.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 57,304 kB
  • sloc: ansic: 38,507; cpp: 29,721; sh: 8,001; makefile: 663; python: 240; javascript: 16
file content (59 lines) | stat: -rwxr-xr-x 1,946 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
55
56
57
58
59
#!/usr/bin/make -f

export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk
ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386))
  export DEB_CXXFLAGS_MAINT_APPEND=-msse -mfpmath=sse
endif

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- VERBOSE=1

override_dh_auto_install:
	dh_auto_install -- VERBOSE=1

# File no longer exists
#override_dh_installchangelogs:
#	dh_installchangelogs RELEASE_HISTORY

override_dh_install:
	dh_install
	# make sure all *.sh files are featuring a '#!/bin/bash' as first line
	# since there are at least two files (test/intersect/{new_test-intersect.sh,performanceTest.sh}
	# requiring bash this is taken for all scripts instead of checking first via /bin/sh -n
	for sh in `find $(CURDIR)/debian -name "*.sh"` ; do \
	    if ! head -n1 $${sh} | grep -q '^#! */bin/[ba]*sh' ; then \
	        sed -i '1 i #!/bin/bash' $${sh} ; \
	    fi ; \
	done

override_dh_install-indep:
	# Somehow the test dir is differently named than the script has it
	# Since I fail to see how this test dir was to the script at all I
	# simply change the script afterwards
	sed -i 's/^cd groupby;/cd groupBy;/' debian/$(DEB_SOURCE)-test/usr/share/$(DEB_SOURCE)/test/test.sh

override_dh_fixperms-arch:
	dh_fixperms
	chmod -x $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/bedtools/genomes/*.genome
	find $(CURDIR)/debian -name "*.bed" -executable -exec chmod -x \{\} \;
	find $(CURDIR)/debian -name "*.sam" -executable -exec chmod -x \{\} \;
	find $(CURDIR)/debian -name "*.sh"  -not -executable -exec chmod +x \{\} \;

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386 armel armhf mipsel))
	mv test/shuffle debian/
endif
	htsutil="../../bin/bedtools htsutil" \
	dh_auto_test
ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386 armel armhf mipsel))
	mv debian/shuffle test/
endif
endif