File: rules

package info (click to toggle)
mummer 3.23~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,228 kB
  • ctags: 2,073
  • sloc: cpp: 13,128; ansic: 7,537; perl: 4,176; makefile: 376; sh: 130; csh: 44; awk: 17
file content (51 lines) | stat: -rwxr-xr-x 1,725 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
#!/usr/bin/make -f
%:
	dh $@

CFLAGS  += $(shell dpkg-buildflags --get CFLAGS)
# src/kurtz/mm3src/Makefile and src/kurtz/streesrc/Makefile make a use of CFLAGS that does not allow to override it, hence the following is added:
CFLAGS += -DSTREEHUGE -I$(CURDIR)/src/kurtz/libbasedir -I$(CURDIR)/src/kurtz/streesrc

TMPDIR      = $(CURDIR)/debian/tmp
BIN_DIR     = $(TMPDIR)/usr/bin
AUX_BIN_DIR = $(TMPDIR)/usr/lib/mummer
FINAL_BIN_DIR     = /usr/bin
FINAL_AUX_BIN_DIR = /usr/lib/mummer
FINAL_SCRIPT_DIR  = /usr/share/perl5/

override_dh_auto_build:
	[ -d $(BIN_DIR) ] || mkdir -p $(BIN_DIR)
	[ -d $(AUX_BIN_DIR) ] || mkdir -p $(AUX_BIN_DIR)
	$(MAKE) BIN_DIR=$(BIN_DIR) AUX_BIN_DIR=$(AUX_BIN_DIR) \
	        FINAL_BIN_DIR=$(FINAL_BIN_DIR) FINAL_AUX_BIN_DIR=$(FINAL_AUX_BIN_DIR) \
	        FINAL_SCRIPT_DIR=$(FINAL_SCRIPT_DIR) \
	        CFLAGS="$(CFLAGS)"
	$(MAKE) -C docs

override_dh_auto_test:
	$(MAKE) check

override_dh_prep:
# Unfortunately the upstream makefile does not separate the build and install steps.
	dh_prep -X debian/tmp

override_dh_auto_install:
# /usr/bin/annotate renamed /usr/bin/mummer-annotate for namespace and license (Artistic) reasons.
	mv $(BIN_DIR)/annotate $(BIN_DIR)/mummer-annotate

override_dh_compress:
	dh_compress -Xpdf

NAME    = $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
VERSION = $(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | sed 's/~dfsg.*//')
TARBALL = MUMmer$(VERSION).tar.gz

get-orig-source:
	wget http://downloads.sourceforge.net/sourceforge/$(NAME)/$(TARBALL)
	rm -rf tmp
	mkdir tmp
	cd tmp ;\
	tar -xzf ../$(TARBALL) ;\
	rm -vf `find . -maxdepth 4 -name [MX]*.pdf` ;\
	GZIP="--best --no-name" tar -czf ../$(NAME)_$(VERSION)~dfsg.orig.tar.gz *
	rm -rf tmp