File: rules

package info (click to toggle)
kraken2 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,024 kB
  • sloc: cpp: 3,995; perl: 1,271; sh: 515; makefile: 64
file content (29 lines) | stat: -rwxr-xr-x 811 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

# DH_VERBOSE := 1

include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export KRAKEN2_DIR=$(CURDIR)/debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)

%:
	dh $@  --sourcedirectory=src

override_dh_link:
	dh_link
	for file in $(KRAKEN2_DIR)/kraken* ; do \
	    if ! echo $${file} | grep -q '\.pm$$' ; then \
		ln -s ../lib/$(DEB_SOURCE)/`basename $${file}` $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin/`basename $${file}` ; \
	    fi \
	done

override_dh_auto_install:
	dh_auto_install -- KRAKEN2_DIR=$(KRAKEN2_DIR)
	./install_kraken2.sh $(KRAKEN2_DIR)

override_dh_install:
	dh_install
	for pl in `grep -Rl '#![[:space:]]*/usr/bin/env[[:space:]]\+perl' debian/*/usr/*` ; do \
	    sed -i '1s?^#![[:space:]]*/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
	done