2 # Uncomment this to turn on verbose mode.
5 DEB_PYTHON_SYSTEM=pycentral
7 include /usr/share/cdbs/1/rules/debhelper.mk
8 include /usr/share/cdbs/1/class/python-distutils.mk
10 # this ought to be the name of the package that we're building, which is
11 # different on each tahoe branch. debian/control is the master: whatever
12 # package is listed in there will be built.
13 DEBNAME := $(firstword $(DEB_PACKAGES))
15 STAGING_DIR := $(CURDIR)/debian/$(DEBNAME)
17 DEB_INSTALL_DOCS_ALL := COPYING.GPL COPYING.TGPPL.html CREDITS \
18 NEWS.rst README.txt relnotes.txt docs misc/operations_helpers/spacetime misc/operations_helpers/cpu-watcher.tac
19 DEB_COMPRESS_EXCLUDE := .tac
22 # we overwrite the setuptools-generated /usr/bin/tahoe (located in
23 # support/bin/tahoe after a 'make build') with a different version, because
24 # the setuptools form (using "entry points") insists upon .egg-info -visible
25 # forms of dependent packages to be installed. For a debian package, we rely
26 # upon the dependencies that are declared in debian/control .
28 # To make sure the #! line matches the version of python that we're using for
29 # this build, we copy it from the setuptools-generated /usr/bin/tahoe, then
30 # add other code to the generated file.
33 mkdir -pm755 $(STAGING_DIR)
34 python setup.py install --root=$(STAGING_DIR)
36 head -1 $(STAGING_DIR)/usr/bin/tahoe >$(STAGING_DIR)/usr/bin/tahoe.new
37 echo "from allmydata.scripts import runner" >>$(STAGING_DIR)/usr/bin/tahoe.new
38 echo "runner.run()" >>$(STAGING_DIR)/usr/bin/tahoe.new
39 chmod +x $(STAGING_DIR)/usr/bin/tahoe.new
40 mv $(STAGING_DIR)/usr/bin/tahoe.new $(STAGING_DIR)/usr/bin/tahoe
42 dh_install misc/operations_helpers/munin/* usr/share/$(DEBNAME)/munin
43 chmod +x $(STAGING_DIR)/usr/share/$(DEBNAME)/munin/*