File: rules

package info (click to toggle)
monotone 1.1-4+deb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 20,664 kB
  • ctags: 8,113
  • sloc: cpp: 86,443; sh: 6,906; perl: 924; makefile: 838; python: 517; lisp: 379; sql: 118; exp: 91; ansic: 52
file content (127 lines) | stat: -rwxr-xr-x 4,944 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-
#
# debian/rules for monotone, by Richard Levitte
# based on the dh7 template provided by dh_make(1)

# put this up top so it's the default rule.
#
# Policy (version 3.9.1.0, 2010-07-26, section 4.9) says that when
# different binary packages are produced in different ways, it doesn't
# make sense to have a build target that builds it all.  Quoted:
#
#   or some packages, notably ones where the same source tree is
#   compiled in different ways to produce two binary packages, the
#   build target does not make much sense. For these packages it is
#   good enough to provide two (or more) targets (build-a and build-b
#   or whatever) for each of the ways of building the package, and a
#   build target that does nothing. The binary target will have to
#   build the package in each of the possible ways and make the binary
#   package out of each.
#
#   ...
#
#   When a package has a configuration and build routine which takes a
#   long time, or when the makefiles are poorly designed, or when
#   build needs to run clean first, it is a good idea to touch build
#   when the build process is complete. This will ensure that if
#   debian/rules build is run again it will not rebuild the whole
#   program.
#
# We definitely have this situation, as we have -indep packages and
# -arch packages, and we need to treat them separately, because the
# buildds will build with -B after having installed only the Build-
# Depends (for they are ignorant of B-D-I.  All die, O the
# embarrassment)
#
# However, it also means that we're having configuring, building and
# testing done via fakeroot, which isn't a good idea.  However, that's
# easy to deal with with a little hack (see the file 'nofakeroot' in
# this directory) and overrides for those cases.
#
# So, we disable the build target entirely and let the binary targets
# take care of building as well (which dh provides support for, so we
# really need nothing extra here).
build:
	@echo 'The build target is disabled, please use the appropriate binary target.'

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

# It is desirable to be able to pass the "--parallel" option to dh.
# Unfortunately, parallel builds of monotone currently cause make to
# enter an infinite loop. When the cause has been determined and
# resolved, this option should be re-enabled.
%:
	dh $@ --with=bash_completion,autoreconf

override_dh_auto_configure:
	debian/nofakeroot dh_auto_configure

# To enable documentation to only be built for the monotone-doc
# package (really, any -indep target), we need to make sure all
# relevant dh_auto_* calls behave differently for arch and indep
# calls.
override_dh_auto_build:
	LANG=POSIX debian/nofakeroot \
	    dh_auto_build -pmonotone-doc -- info pdf html
	LANG=POSIX debian/nofakeroot \
	    dh_auto_build --remaining-packages -- INFO_DEPS=''

# Thanks to buildd configuration decisions that no one will explain to
# me in sufficient detail to detect reliably, we have to disable all
# netsync tests until upstream gets around to converting them to local
# network sockets.
export DISABLE_NETWORK_TESTS = 1

# This is a hack to get more detail out of the alpha and sparc testsuite
# crashes.
export MTN_STACKTRACE_ON_CRASH = 1

override_dh_auto_test:
#	While dh_auto_test checks for 'nocheck', running it through
#	nofakeroot seems to confuse it. So we do the check, here.
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	debian/nofakeroot dh_auto_test -pmonotone -- INFO_DEPS='' || \
	    sh extra/building/dump-test-logs.sh
endif

override_dh_auto_install:
	dh_auto_install -Nmonotone-doc -- INFO_DEPS=''
	dh_auto_install -pmonotone-doc

#	monotone-server uses these
	mkdir -p debian/tmp/usr/share/monotone
	for x in read-permissions write-permissions server-setup/serverrc; do \
		cp -p examples/$$x debian/tmp/usr/share/monotone/$${x##*/}.base; \
	done

# Finally, there are a few overrides needed for the install phase.

# Targets where we rely entirely on the upstream installation
override_dh_install:
	dh_install --sourcedir=debian/tmp

# Upstream file "ChangeLog" is not actually a change log
override_dh_installchangelogs:
	dh_installchangelogs -X ChangeLog

# colorize seems to compress to something weird, Lintian keeps warning
# about it. PDFs should generally not be compressed.
override_dh_compress:
	dh_compress -Xcolorize -X.pdf

# For now, we link /usr/share/doc/monotone-doc to /usr/share/doc/monotone.
#
# Note that the monotone-server postinst script relies on
# /usr/share/doc/monotone-server being a symlink (or an empty
# directory after removal).
override_dh_installdocs:
	dh_installdocs --link-doc=monotone

# Install init for monotone-server, but with the name monotone
override_dh_installinit:
	dh_installinit --name=monotone
# we should have logrotate support for monotone-server, but currently we don't
#override_dh_installlogrotate:
#	dh_installlogrotate --name=monotone