File: rules

package info (click to toggle)
mummer 3.22~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 5,152 kB
  • ctags: 2,067
  • sloc: cpp: 13,097; ansic: 7,537; perl: 4,158; makefile: 417; sh: 130; csh: 44; awk: 17
file content (103 lines) | stat: -rwxr-xr-x 3,112 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/make -f

include /usr/share/quilt/quilt.make

# Pasted from Policy §10.1
CC = gcc
CFLAGS = -O2 -g -Wall # sane warning options vary between programs
LDFLAGS = # none
INSTALL = install -s # (or use strip on the files in debian/tmp)

# Pasted from Policy §4.9.1
CFLAGS = -Wall -g
INSTALL = install
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755

ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
    CFLAGS += -O0
else
    CFLAGS += -O2
endif
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
    INSTALL_PROGRAM += -s
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    MAKEFLAGS += -j$(NUMJOBS)
endif

build:
	# ...
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Code to run the package test suite.
endif

# 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/

build: $(QUILT_STAMPFN) build-stamp
build-stamp:
# Unfortunately the upstream makefile does not separate the build and install steps.

install:
install: build
# Unfortunately the upstream makefile does not separate the build and install steps.
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	[ -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
	$(MAKE) check
# /usr/bin/annotate renamed /usr/bin/mummer-annotate for namespace and license (Artistic) reasons.
	mv $(CURDIR)/debian/tmp/usr/bin/annotate $(CURDIR)/debian/tmp/usr/bin/mummer-annotate
	dh_install
	touch build-stamp

clean: unpatch
	dh clean

binary-indep: build install
	dh binary-indep

binary-arch: build install
	dh binary-arch

override_dh_install:
	dh_install
	[ -f $(BIN_DIR)/annotate ] && 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=-9 tar -czf ../$(NAME)_$(VERSION)~dfsg.orig.tar.gz *
	rm -rf tmp

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install