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
|
#!/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
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:
debian/nofakeroot dh_auto_test -pmonotone -- INFO_DEPS='' || \
sh extra/building/dump-test-logs.sh
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
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
|