File: rules

package info (click to toggle)
ssake 4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 4,780 kB
  • sloc: perl: 2,285; python: 368; sh: 211; makefile: 28
file content (41 lines) | stat: -rwxr-xr-x 1,185 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
#!/usr/bin/make -f
# debian/rules file for ssake
# (C) Andreas Tille
# GPL

include /usr/share/dpkg/pkg-info.mk

examples=$(DEB_SOURCE)-examples

%:
	dh $@

BINDIR := $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin
DOCDIR := $(CURDIR)/debian/$(examples)/usr/share/doc/$(DEB_SOURCE)

override_dh_install:
	dh_install
	cp -a SSAKE $(BINDIR)/ssake
	# Fix totally broken interpreter definitions
	for pl in `grep -Rl '#!/home/.\+/perl' debian/*/usr/*` ; do \
	    sed -i '1s?^#!/home/.\+/perl?#!/usr/bin/perl?' $${pl} ; \
	done
	for sh in `grep -Rl '#!/usr/bin/bash' debian/*/usr/*` ; do \
	    sed -i '1s?^#!/usr/bin/bash?#!/bin/bash?' $${sh} ; \
	done

override_dh_installexamples:
	dh_installexamples
	find $(DOCDIR)/examples -name "*.sh" -type f -exec sed -i '1 i #!/bin/sh' \{\} \;

override_dh_installdocs:
	dh_installdocs
	markdown readme.md > $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/README.html

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	TESTDIR=$$(mktemp -d) ; \
	cp -a test/* $${TESTDIR} ; \
	cd $${TESTDIR} && $(CURDIR)/SSAKE -f Herpesvirus_3.60kb.reads.fa -m 16 -o 2 -r 0.6 -p 0 -t 0 -c 1 -w 5 -b myFirstSSAKErun
	rm -rf $${TESTDIR}
endif