File: rules

package info (click to toggle)
ffindex 0.9.9.9-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 492 kB
  • sloc: ansic: 2,382; makefile: 163; perl: 86; python: 56; sh: 21; ruby: 6
file content (61 lines) | stat: -rwxr-xr-x 2,295 bytes parent folder | download | duplicates (4)
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
60
61
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# lkajan: work in progress, enable this in next upstream release, after speaking to upstream
# tille@d.o: If enabled only ffindex_apply_mpi and for creating the manpage another (not yet
#            known) Build-Depends is needed.

pkgdata:=ffindex
sampledir:=$(CURDIR)/debian/$(pkgdata)/usr/share/doc/$(pkgdata)/examples

export HAVE_MPI:=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

FFMANPAGES = ffindex_apply.1 ffindex_build.1 ffindex_from_fasta.1 ffindex_get.1 ffindex_modify.1 ffindex_unpack.1 ffindex_apply_mpi.1 ffindex_from_tsv.1
ffmanpages: $(FFMANPAGES)
BINNAMES =	\
		ffindex_apply="apply a program to each FFindex entry";\
		ffindex_build="build file index from files in directories";\
		ffindex_from_fasta="populate index from FASTA file";\
		ffindex_get="retrieve entries from file index";\
		ffindex_modify="modify file index entries";\
		ffindex_unpack="unpack file index entries";\
		ffindex_apply_mpi="apply a program to each FFindex entry (mpi enhanced)";\
		ffindex_from_tsv="populate index from TSV file";

# MPI binaries built when openmpi headers+library installed
FFMANPAGES += ffindex_apply_mpi.1
BINNAMES   += ffindex_apply_mpi="apply a program to each FFindex entry (mpi enhanced)";

override_dh_installman: $(FFMANPAGES)
	dh_installman

$(FFMANPAGES): %.1 : debian/tmp/usr/bin/%
	unset LD_PRELOAD && export LD_LIBRARY_PATH=debian/tmp/usr/lib && eval '$(BINNAMES)' && help2man --no-info --no-discard-stderr '--help-option= ' -n "$$$*" --version-option="-v" '$<' -o '$@' --include debian/man_notes.nroff

override_dh_clean:
	rm -f $(FFMANPAGES)
	dh_clean

override_dh_install:
	dh_install
	find debian -name ffindex_apply_mpi -exec chrpath --delete \{\} \;

# [Laszlo Kajan <lkajan@rostlab.org>]
# ffindex has an overly large default for FFINDEX_MAX_INDEX_ENTRIES (40000000). In order to require less RAM for testing the package (make check), a more modest value is set below.
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test -- FFINDEX_MAX_INDEX_ENTRIES=20000 check
endif

override_dh_installexamples:
	dh_installexamples
	cp -aR test $(sampledir)/;
	cp ./src/test.should $(sampledir)/;
	cp ./src/test-unlink.should $(sampledir)/;