File: rules

package info (click to toggle)
mcl 1%3A06-021-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,276 kB
  • ctags: 2,975
  • sloc: ansic: 32,352; sh: 3,556; perl: 1,437; makefile: 338
file content (174 lines) | stat: -rwxr-xr-x 5,278 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#!/usr/bin/make -f

# $Id: rules,v 1.29 2006-02-07 20:06:43 joostvb Exp $
# $Source: /var/cvs/micans/mcl/packages/debian/debian/rules,v $

# based upon sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# allow bashism's in commandlines
SHELL = /bin/bash

# Debian Policy 10.1
CFLAGS = -g -Wall
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
INSTALL = install
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

# variables to be used in configure invocation. see
# autotools-dev/README.Debian.gz
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

# use autoconf 2.52 or newer
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  confflags += --build $(DEB_HOST_GNU_TYPE)
else
  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

## Build BLAST parsing script mcxdeblast and the pipeline script mclblastline
## (sources in src/alien/oxygen).  It encapsulates all the stages of parsing,
## matrix creation, running mcl, and formatting the result
## into a single application.
confflags += --enable-blast

## add --enable-tribe to confflags to add the upstreams supplied tribe tools
## (protein clustering stuff).  This builds and installs the tools
##
##  tribe-families  tribe-matrix  tribemcl  tribe-parse
##
## We're not doing it since tribe-matrix segfaults, and the tools lackproper
## manpages.  Furthermore, the BLAST parsing scripts can be used in place of
## the tribe module.

# confflags += --enable-tribe

## If you really want to suppress the citation reference printed by MCL (the
## one which looks like
##
##  Please cite:
##    Stijn van Dongen, Graph Clustering by Flow Simulation.  PhD thesis,
##    University of Utrecht, May 2000.
##       (  http://www.library.uu.nl/digiarchief/dip/diss/1895620/full.pdf
##       or  http://micans.org/mcl/lit/svdthesis.pdf.gz)
##  OR
##    Stijn van Dongen, A cluster algorithm for graphs. Technical
##    Report INS-R0010, National Research Institute for Mathematics
##    and Computer Science in the Netherlands, Amsterdam, May 2000.
##       (  http://www.cwi.nl/ftp/CWIreports/INS/INS-R0010.ps.Z
##       or  http://micans.org/mcl/lit/INS-R0010.ps.Z)
##
## ), then this is the place to do it.  Of course we honor the choice of
## upstream here, and build as suggested by upsteam.

# confflags += --disable-helpful-reminder


configure: configure-stamp
configure-stamp:
	dh_testdir

#	# see autotools-dev/README.Debian.gz on why we use confflags here
	./configure \
           $(confflags) \
           --prefix=/usr \
           --mandir=\$${prefix}/share/man \
           --infodir=\$${prefix}/share/info

	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir

#	# commands to compile the package.
	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

#	# commands to clean up after the build process.
	-$(MAKE) distclean

#       # Make sure we have fresh config.{sub,guess}, in order to make life
#       # more easy for porters to new architectures. See
#       # autotools-dev/README.Debian.gz
	-test -r /usr/share/misc/config.sub && \
          cp -f /usr/share/misc/config.sub autofoo/config.sub
	-test -r /usr/share/misc/config.guess && \
          cp -f /usr/share/misc/config.guess autofoo/config.guess

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

#	# commands to install the package into debian/mcl.
	$(MAKE) install DESTDIR=$(CURDIR)/debian/mcl
#	# install some extra stuff not installed by upstream
	install -c -m 644 $(CURDIR)/{AUTHORS,README,THANKS} $(CURDIR)/debian/mcl/usr/share/doc/mcl/
	mkdir $(CURDIR)/debian/mcl/usr/share/doc/mcl/scripts
	install -c -m 644 $(CURDIR)/scripts/clx* $(CURDIR)/debian/mcl/usr/share/doc/mcl/scripts/
#	# clean up unneeded docs
	rm $(CURDIR)/debian/mcl/usr/share/doc/mcl/*txt
#	# process mcl-doc.install
	dh_install --sourcedir=debian/mcl
	dh_installdocs
#	# clean up files just copied to mcl-doc
	rm $(CURDIR)/debian/mcl/usr/share/doc/mcl/{AUTHORS,README,THANKS}
	rm $(CURDIR)/debian/mcl/usr/share/doc/mcl/*{html,ps}
	rm -r $(CURDIR)/debian/mcl/usr/share/doc/mcl/examples
	rm -r $(CURDIR)/debian/mcl/usr/share/man/man[5,7]

## for some wacky reason, this fails:
## shopt -s extglob; rm $(CURDIR)/debian/mcl/usr/share/doc/mcl/examples/!(clx*)

# Build architecture-independent files
binary-indep: build install
	dh_installman
	dh_installchangelogs ChangeLog
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb -pmcl-doc


# Build architecture-dependent files
binary-arch: build install
#	no need to call dh_installexamples: upstream takes care of
#        this in 'make install'
	dh_installman
	dh_installchangelogs ChangeLog
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb -pmcl

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