File: rules

package info (click to toggle)
gmap 2020-04-08+ds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 23,792 kB
  • sloc: ansic: 468,240; perl: 5,336; makefile: 958; sh: 80
file content (53 lines) | stat: -rwxr-xr-x 1,744 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
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk
mandir  := $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/man/man1
utildir := $(CURDIR)/util
bindir  := $(CURDIR)/src

include /usr/share/dpkg/architecture.mk

HELP2MAN = /usr/bin/help2man --no-info --version-string=${DEB_VERSION}

%:
	dh  $@

override_dh_auto_configure:
	dh_auto_configure -- --with-gmapdb=/var/cache/gmap \
	--bindir=/usr/lib/gmap

override_dh_auto_install:
	mkdir -p $(mandir)
	$(HELP2MAN) --name='Genomic Mapping and Alignment Program' \
	$(bindir)/gmap |debian/filter.pl >$(mandir)/gmap.1
	$(HELP2MAN) --name='Genomic Short-read Nucleotide Alignment Program' \
	$(bindir)/gsnap |debian/filter.pl >$(mandir)/gsnap.1
	$(HELP2MAN) --name='Tool for genome database creation for GMAP or GSNAP' \
	$(utildir)/gmap_build |debian/filter.pl >$(mandir)/gmap_build.1
	dh_auto_install

override_dh_install:
	mkdir -p debian/$(DEB_SOURCE)/usr/bin
	dh_install
	for bin in `echo gmap gsnap gmap_build gmapl gsnapl; \
		cd $(CURDIR)/debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)/; \
		ls -1 gmap*.* gsnap*.* `; do \
		ln -s /usr/lib/gmap/$$bin debian/$(DEB_SOURCE)/usr/bin/$$bin; \
	done

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test --no-parallel
endif

override_dh_installexamples:
	mkdir $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/examples
	find tests/ -type f -print0 | xargs -0r sed -i \
		-e 's@$(CURDIR)@«buildpath»@g' \
		-e 's@\#! /bin/bash@\#! /bin/sh@g'
	tar --sort=name \
		--mtime="@${SOURCE_DATE_EPOCH}" \
		--owner=root --group=root --numeric-owner \
		--mode=go=rX,u+rw,a-s \
		-cJf $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/examples/tests.tar.xz  tests