monotone

monotone Mtn Source Tree

Root/rules

  • Property mtn:execute set to true
1#!/usr/bin/make -f
2# -*- makefile -*-
3#
4# debian/rules for monotone, by Richard Levitte
5# based on the dh7 template provided by dh_make(1)
6
7# put this up top so it's the default rule.
8#
9# Policy (version 3.9.1.0, 2010-07-26, section 4.9) says that when
10# different binary packages are produced in different ways, it doesn't
11# make sense to have a build target that builds it all. Quoted:
12#
13# or some packages, notably ones where the same source tree is
14# compiled in different ways to produce two binary packages, the
15# build target does not make much sense. For these packages it is
16# good enough to provide two (or more) targets (build-a and build-b
17# or whatever) for each of the ways of building the package, and a
18# build target that does nothing. The binary target will have to
19# build the package in each of the possible ways and make the binary
20# package out of each.
21#
22# ...
23#
24# When a package has a configuration and build routine which takes a
25# long time, or when the makefiles are poorly designed, or when
26# build needs to run clean first, it is a good idea to touch build
27# when the build process is complete. This will ensure that if
28# debian/rules build is run again it will not rebuild the whole
29# program.
30#
31# We definitely have this situation, as we have -indep packages and
32# -arch packages, and we need to treat them separately, because the
33# buildds will build with -B after having installed only the Build-
34# Depends (for they are ignorant of B-D-I. All die, O the
35# embarrassment)
36#
37# However, it also means that we're having configuring, building and
38# testing done via fakeroot, which isn't a good idea. However, that's
39# easy to deal with with a little hack (see the file 'nofakeroot' in
40# this directory) and overrides for those cases.
41#
42# So, we disable the build target entirely and let the binary targets
43# take care of building as well (which dh provides support for, so we
44# really need nothing extra here).
45build:
46@echo 'The build target is disabled, please use the appropriate binary target.'
47
48# Uncomment this to turn on verbose mode.
49export DH_VERBOSE=1
50
51# It is desirable to be able to pass the "--parallel" option to dh.
52# Unfortunately, parallel builds of monotone currently cause make to
53# enter an infinite loop. When the cause has been determined and
54# resolved, this option should be re-enabled.
55%:
56dh $@ --with=bash_completion
57
58override_dh_auto_configure:
59debian/nofakeroot dh_auto_configure
60# To enable documentation to only be built for the monotone-doc
61# package (really, any -indep target), we need to make sure all
62# relevant dh_auto_* calls behave differently for arch and indep
63# calls.
64override_dh_auto_build:
65LANG=POSIX debian/nofakeroot \
66 dh_auto_build -pmonotone-doc -- info pdf html
67LANG=POSIX debian/nofakeroot \
68 dh_auto_build --remaining-packages -- INFO_DEPS=''
69
70# Thanks to buildd configuration decisions that no one will explain to
71# me in sufficient detail to detect reliably, we have to disable all
72# netsync tests until upstream gets around to converting them to local
73# network sockets.
74export DISABLE_NETWORK_TESTS = 1
75
76# This is a hack to get more detail out of the alpha and sparc testsuite
77# crashes.
78export MTN_STACKTRACE_ON_CRASH = 1
79
80override_dh_auto_test:
81debian/nofakeroot dh_auto_test -pmonotone -- INFO_DEPS='' || \
82 sh extra/building/dump-test-logs.sh
83
84override_dh_auto_install:
85dh_auto_install -Nmonotone-doc -- INFO_DEPS=''
86dh_auto_install -pmonotone-doc
87
88# monotone-server uses these
89mkdir -p debian/tmp/usr/share/monotone
90for x in read-permissions write-permissions server-setup/serverrc; do \
91cp -p examples/$$x debian/tmp/usr/share/monotone/$${x##*/}.base; \
92done
93
94# Finally, there are a few overrides needed for the install phase.
95
96# Targets where we rely entirely on the upstream installation
97override_dh_install:
98dh_install --sourcedir=debian/tmp
99
100# Upstream file "ChangeLog" is not actually a change log
101override_dh_installchangelogs:
102dh_installchangelogs -X ChangeLog
103
104# colorize seems to compress to something weird, Lintian keeps warning about it
105# PDFs should generally not be compressed.
106override_dh_compress:
107dh_compress -Xcolorize -X.pdf
108
109# The upstream makefiles' install targets do nothing useful for these
110# packages. (In particular, we do not want the monolithic
111# monotone.html installed.) Annoyingly, at present we cannot simply
112# dh_installdocs the entire html directory, because it contains a
113# bunch of unwanted junk; instead we dh_installdirs the directory
114# hierarchy that is required and use cp -p to put all the files in
115# place. (Using globs in monotone-doc.docs would get everything dumped
116# directly into /usr/share/doc/monotone, which doesn't work.)
117override_dh_installdocs:
118dh_installdocs --link-doc=monotone
119
120# Install init for monotone-server, but with the name monotone
121override_dh_installinit:
122dh_installinit --name=monotone
123# we should have logrotate support for monotone-server, but currently we don't
124#override_dh_installlogrotate:
125#dh_installlogrotate --name=monotone

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status