File: rules

package info (click to toggle)
bedtools 2.26.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 55,328 kB
  • sloc: cpp: 37,989; sh: 6,930; makefile: 2,225; python: 163
file content (38 lines) | stat: -rwxr-xr-x 1,406 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
#!/usr/bin/make -f

export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')

%:
	dh $@

override_dh_installchangelogs:
	dh_installchangelogs RELEASE_HISTORY

override_dh_install:
	dh_install
	rm -f $(CURDIR)/debian/$(DEBPKGNAME)/usr/bin/groupBy # distributed in the filo package.
	# 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_fixperms-arch:
	dh_fixperms
	chmod -x $(CURDIR)/debian/$(DEBPKGNAME)/usr/share/bedtools/genomes/*.genome
	find $(CURDIR)/debian -name "*.bed" -executable -exec chmod -x \{\} \;
	find $(CURDIR)/debian -name "*.sh"  -not -executable -exec chmod +x \{\} \;

get-orig-source:
	uscan --no-symlink --force-download --download-version $(DEB_UPSTREAM_VERSION)