Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DH_VERBOSE=1
4
5 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
6
7 include /usr/share/dpkg/default.mk
8 ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386))
9 export DEB_CXXFLAGS_MAINT_APPEND=-msse -mfpmath=sse
10 endif
11
12 %:
13 dh $@
14
15 override_dh_auto_build:
16 dh_auto_build -- VERBOSE=1
17
18 override_dh_auto_install:
19 dh_auto_install -- VERBOSE=1
20
21 # File no longer exists
22 #override_dh_installchangelogs:
23 # dh_installchangelogs RELEASE_HISTORY
24
25 override_dh_install:
26 dh_install
27 # make sure all *.sh files are featuring a '#!/bin/bash' as first line
28 # since there are at least two files (test/intersect/{new_test-intersect.sh,performanceTest.sh}
29 # requiring bash this is taken for all scripts instead of checking first via /bin/sh -n
30 for sh in `find $(CURDIR)/debian -name "*.sh"` ; do \
31 if ! head -n1 $${sh} | grep -q '^#! */bin/[ba]*sh' ; then \
32 sed -i '1 i #!/bin/bash' $${sh} ; \
33 fi ; \
34 done
35
36 override_dh_install-indep:
37 # Somehow the test dir is differently named than the script has it
38 # Since I fail to see how this test dir was to the script at all I
39 # simply change the script afterwards
40 sed -i 's/^cd groupby;/cd groupBy;/' debian/$(DEB_SOURCE)-test/usr/share/$(DEB_SOURCE)/test/test.sh
41
42 override_dh_fixperms-arch:
43 dh_fixperms
44 chmod -x $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/bedtools/genomes/*.genome
45 find $(CURDIR)/debian -name "*.bed" -executable -exec chmod -x \{\} \;
46 find $(CURDIR)/debian -name "*.sam" -executable -exec chmod -x \{\} \;
47 find $(CURDIR)/debian -name "*.sh" -not -executable -exec chmod +x \{\} \;
48
49 override_dh_auto_test:
50 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
51 ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386 armel armhf mipsel))
52 mv test/shuffle debian/
53 endif
54 htsutil="../../bin/bedtools htsutil" \
55 dh_auto_test
56 ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386 armel armhf mipsel))
57 mv debian/shuffle test/
58 endif
59 endif