Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 # lkajan: work in progress, enable this in next upstream release, after speaking to upstream
7 # [email protected]: If enabled only ffindex_apply_mpi and for creating the manpage another (not yet
8 # known) Build-Depends is needed.
9
10 pkgdata:=ffindex
11 sampledir:=$(CURDIR)/debian/$(pkgdata)/usr/share/doc/$(pkgdata)/examples
12
13 export HAVE_MPI:=1
14
15 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
16
17 %:
18 dh $@
19
20 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
21 ffmanpages: $(FFMANPAGES)
22 BINNAMES = \
23 ffindex_apply="apply a program to each FFindex entry";\
24 ffindex_build="build file index from files in directories";\
25 ffindex_from_fasta="populate index from FASTA file";\
26 ffindex_get="retrieve entries from file index";\
27 ffindex_modify="modify file index entries";\
28 ffindex_unpack="unpack file index entries";\
29 ffindex_apply_mpi="apply a program to each FFindex entry (mpi enhanced)";\
30 ffindex_from_tsv="populate index from TSV file";
31
32 # MPI binaries built when openmpi headers+library installed
33 FFMANPAGES += ffindex_apply_mpi.1
34 BINNAMES += ffindex_apply_mpi="apply a program to each FFindex entry (mpi enhanced)";
35
36 override_dh_installman: $(FFMANPAGES)
37 dh_installman
38
39 $(FFMANPAGES): %.1 : debian/tmp/usr/bin/%
40 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
41
42 override_dh_clean:
43 rm -f $(FFMANPAGES)
44 dh_clean
45
46 override_dh_install:
47 dh_install
48 find debian -name ffindex_apply_mpi -exec chrpath --delete \{\} \;
49
50 # [Laszlo Kajan <[email protected]>]
51 # 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.
52 override_dh_auto_test:
53 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
54 dh_auto_test -- FFINDEX_MAX_INDEX_ENTRIES=20000 check
55 endif
56
57 override_dh_installexamples:
58 dh_installexamples
59 cp -aR test $(sampledir)/;
60 cp ./src/test.should $(sampledir)/;
61 cp ./src/test-unlink.should $(sampledir)/;