/[debian-med]/trunk/packages/mummer/trunk/debian/rules
ViewVC logotype

Contents of /trunk/packages/mummer/trunk/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6865 - (show annotations) (download)
Sat May 28 15:49:14 2011 UTC (23 months, 4 weeks ago) by malat-guest
File size: 3128 byte(s)
Make sure GZIP has option --best and --no-name
1 #!/usr/bin/make -f
2
3 include /usr/share/quilt/quilt.make
4
5 # Pasted from Policy §10.1
6 CC = gcc
7 CFLAGS = -O2 -g -Wall # sane warning options vary between programs
8 LDFLAGS = # none
9 INSTALL = install -s # (or use strip on the files in debian/tmp)
10
11 # Pasted from Policy §4.9.1
12 CFLAGS = -Wall -g
13 INSTALL = install
14 INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
15 INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
16 INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
17 INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
18
19 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
20 CFLAGS += -O0
21 else
22 CFLAGS += -O2
23 endif
24 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
25 INSTALL_PROGRAM += -s
26 endif
27 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
28 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
29 MAKEFLAGS += -j$(NUMJOBS)
30 endif
31
32 build:
33 # ...
34 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
35 # Code to run the package test suite.
36 endif
37
38 # 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:
39 CFLAGS += -DSTREEHUGE -I$(CURDIR)/src/kurtz/libbasedir -I$(CURDIR)/src/kurtz/streesrc
40
41 TMPDIR = $(CURDIR)/debian/tmp
42 BIN_DIR = $(TMPDIR)/usr/bin
43 AUX_BIN_DIR = $(TMPDIR)/usr/lib/mummer
44 FINAL_BIN_DIR = /usr/bin
45 FINAL_AUX_BIN_DIR = /usr/lib/mummer
46 FINAL_SCRIPT_DIR = /usr/share/perl5/
47
48 build: $(QUILT_STAMPFN) build-stamp
49 build-stamp:
50 # Unfortunately the upstream makefile does not separate the build and install steps.
51
52 install:
53 install: build
54 # Unfortunately the upstream makefile does not separate the build and install steps.
55 dh_testdir
56 dh_testroot
57 dh_prep
58 dh_installdirs
59 [ -d $(BIN_DIR) ] || mkdir -p $(BIN_DIR)
60 [ -d $(AUX_BIN_DIR) ] || mkdir -p $(AUX_BIN_DIR)
61 $(MAKE) BIN_DIR=$(BIN_DIR) AUX_BIN_DIR=$(AUX_BIN_DIR) \
62 FINAL_BIN_DIR=$(FINAL_BIN_DIR) FINAL_AUX_BIN_DIR=$(FINAL_AUX_BIN_DIR) \
63 FINAL_SCRIPT_DIR=$(FINAL_SCRIPT_DIR) \
64 CFLAGS="$(CFLAGS)"
65 $(MAKE) -C docs
66 $(MAKE) check
67 # /usr/bin/annotate renamed /usr/bin/mummer-annotate for namespace and license (Artistic) reasons.
68 mv $(CURDIR)/debian/tmp/usr/bin/annotate $(CURDIR)/debian/tmp/usr/bin/mummer-annotate
69 dh_install
70 touch build-stamp
71
72 clean: unpatch
73 dh clean
74
75 binary-indep: build install
76 dh binary-indep
77
78 binary-arch: build install
79 dh binary-arch
80
81 override_dh_install:
82 dh_install
83 [ -f $(BIN_DIR)/annotate ] && mv $(BIN_DIR)/annotate $(BIN_DIR)/mummer-annotate
84
85 override_dh_compress:
86 dh_compress -Xpdf
87
88 NAME = $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
89 VERSION = $(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | sed 's/~dfsg.*//')
90 TARBALL = MUMmer$(VERSION).tar.gz
91
92 get-orig-source:
93 wget http://downloads.sourceforge.net/sourceforge/$(NAME)/$(TARBALL)
94 rm -rf tmp
95 mkdir tmp
96 cd tmp ;\
97 tar -xzf ../$(TARBALL) ;\
98 rm -vf `find . -maxdepth 4 -name [MX]*.pdf` ;\
99 GZIP="--best --no-name" tar -czf ../$(NAME)_$(VERSION)~dfsg.orig.tar.gz *
100 rm -rf tmp
101
102 binary: binary-indep binary-arch
103 .PHONY: build clean binary-indep binary-arch binary install

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5