]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - misc/debian_helpers/sid/debian/rules
Makefile: remove targets that used misc/debian[_helpers] which no longer exist. Also...
[tahoe-lafs/tahoe-lafs.git] / misc / debian_helpers / sid / debian / rules
1 #! /usr/bin/make -f
2 # Uncomment this to turn on verbose mode.
3 #export DH_VERBOSE=1
4
5 DEB_PYTHON_SYSTEM=pycentral
6
7 include /usr/share/cdbs/1/rules/debhelper.mk
8 include /usr/share/cdbs/1/class/python-distutils.mk
9
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))
14
15 STAGING_DIR := $(CURDIR)/debian/$(DEBNAME)
16
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
20
21
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 .
27 #
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.
31
32 install/$(DEBNAME)::
33         mkdir -pm755 $(STAGING_DIR)
34         python setup.py install --root=$(STAGING_DIR)
35
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
41
42         dh_install misc/operations_helpers/munin/* usr/share/$(DEBNAME)/munin
43         chmod +x $(STAGING_DIR)/usr/share/$(DEBNAME)/munin/*
44
45         dh_pycentral
46
47 clean::
48         -rm -rf build