File: rules

package info (click to toggle)
sra-sdk 2.8.1-2+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 18,984 kB
  • ctags: 21,087
  • sloc: ansic: 164,474; cpp: 20,802; sh: 4,885; perl: 3,708; makefile: 3,280; python: 2,817; yacc: 471; lex: 412; lisp: 77; xml: 28
file content (55 lines) | stat: -rwxr-xr-x 1,716 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# +pie breaks the build
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

pkg := sra-toolkit

%:
	dh $@

OUTDIR=$(CURDIR)/debian/tmp
MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

override_dh_auto_clean:

override_dh_clean:
	dh_clean
	rm -f build/OUTDIR.linux

override_dh_update_autotools_config:
	echo "do nothing"

override_dh_auto_configure:
	# output dir will be checked so create it before
	mkdir -p debian/tmp/usr/lib
	ln -s /usr/lib/$(MULTIARCH) debian/tmp/usr/lib
	#
        # that's no standard configure script lacking support of default options
	#
	# --with-debug sets some options that require header files like compiler.h which
	# is internal to ncbi-vcb and not installed into the package - so this option
	# should not be used.
	./configure --build=$(MULTIARCH) --prefix=$(CURDIR)/debian/tmp/usr --build-prefix=$(CURDIR)/debian/tmp/usr --with-ngs-sdk-prefix=/usr

override_dh_auto_build:
	export LD_LIBRARY_PATH="$$LD_LIBRARY_PATH:$(OUTDIR)/lib"; export OUTDIR=$(OUTDIR) ; make DEB_CFLAGS="$(CFLAGS)" DEB_LDFLAGS="$(LDFLAGS)"

override_dh_install:
	# upstream installs versioned *.a libs - we only want a single version
	for bin in debian/tmp/usr/bin/*[a-z] ; do \
	    mv debian/tmp/usr/bin/`readlink $$bin` $$bin ; \
	    mv debian/tmp/usr/bin/`readlink $$bin` $$bin ; \
	done
	dh_install
	# remove susipcious file which is not executable and conflicts with package magic
	rm -f debian/*/usr/bin/magic
	# rename kget which conflicts with kget download manager (see #851219)
	mv debian/$(pkg)/usr/bin/kget debian/$(pkg)/usr/bin/vdb-get

#override_dh_auto_test:
#	echo "FIXME: try activating tests!!!!!!!!!!!!!!!!!!!!!!!!"

override_dh_prep:
	dh_prep -X debian/tmp