File: rules

package info (click to toggle)
ncbi-entrez-direct 6.10.20170123%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 804 kB
  • ctags: 285
  • sloc: perl: 7,796; sh: 496; makefile: 32
file content (44 lines) | stat: -rwxr-xr-x 1,280 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS  = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

%:
	dh $@

MODES = address citmatch contact filter link notify post proxy search spell
STD_WRAPPERS = $(MODES:%=bin/e%)
WRAPPERS = $(STD_WRAPPERS) bin/esummary
AS_IS_SCRIPTS = amino-acid-composition between-two-genes edirutil \
	        entrez-phrase-search filter-stop-words ftp-* \
	        join-into-groups-of nquire reorder-columns sort-uniq-count* \
	        word-at-a-time xy-plot

bin/edirect: edirect.pl
	mkdir -p bin
	install $< $@

$(STD_WRAPPERS): bin/e%: bin/edirect
	echo '#!/bin/sh' > $@
	echo 'exec /usr/bin/edirect -$* "$$@"' >> $@
	chmod +x $@

bin/esummary: bin/edirect
	echo '#!/bin/sh' > $@
	echo 'exec /usr/bin/edirect -fetch -format docsum "$$@"' >> $@
	chmod +x $@

override_dh_auto_build: $(WRAPPERS)
	dh_auto_build
	install $(AS_IS_SCRIPTS) debian/efetch debian/einfo bin/
# Always use gccgo?  The resulting binary would be much smaller, but
# pull in a large shared library with few other reverse dependencies.
	go build -gccgoflags '$(CFLAGS) $(LDFLAGS)' -o bin/xtract xtract.go || \
	    install xtract.pl bin/xtract

override_dh_auto_clean:
	dh_auto_clean
	rm -rf bin