2006-12-05 09:00:44 +00:00
|
|
|
#! /usr/bin/make -f
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
|
|
|
DEB_PYTHON_SYSTEM=pycentral
|
|
|
|
|
|
|
|
include /usr/share/cdbs/1/rules/debhelper.mk
|
|
|
|
include /usr/share/cdbs/1/class/python-distutils.mk
|
|
|
|
|
2008-07-16 01:47:41 +00:00
|
|
|
# this ought to be the name of the package that we're building, which is
|
|
|
|
# different on each tahoe branch. debian/control is the master: whatever
|
|
|
|
# package is listed in there will be built.
|
|
|
|
DEBNAME := $(firstword $(DEB_PACKAGES))
|
|
|
|
|
|
|
|
STAGING_DIR := $(CURDIR)/debian/$(DEBNAME)
|
|
|
|
|
|
|
|
DEB_INSTALL_DOCS_ALL := COPYING.GPL COPYING.TGPPL.html CREDITS \
|
2008-08-27 22:30:26 +00:00
|
|
|
NEWS README relnotes.txt docs misc/spacetime misc/cpu-watcher.tac
|
2008-08-07 06:00:03 +00:00
|
|
|
DEB_COMPRESS_EXCLUDE := .tac
|
2007-03-29 19:16:39 +00:00
|
|
|
|
2008-07-14 19:55:34 +00:00
|
|
|
|
2008-04-10 23:29:59 +00:00
|
|
|
# we overwrite the setuptools-generated /usr/bin/tahoe (located in
|
|
|
|
# support/bin/tahoe after a 'make build') with a different version, because
|
|
|
|
# the setuptools form (using "entry points") insists upon .egg-info -visible
|
|
|
|
# forms of dependent packages to be installed. For a debian package, we rely
|
|
|
|
# upon the dependencies that are declared in debian/control .
|
|
|
|
#
|
|
|
|
# To make sure the #! line matches the version of python that we're using for
|
|
|
|
# this build, we copy it from the setuptools-generated /usr/bin/tahoe, then
|
|
|
|
# add other code to the generated file.
|
|
|
|
|
2008-07-16 01:47:41 +00:00
|
|
|
install/$(DEBNAME)::
|
2007-09-27 00:55:24 +00:00
|
|
|
mkdir -pm755 $(STAGING_DIR)
|
|
|
|
python setup.py install --root=$(STAGING_DIR)
|
|
|
|
|
2008-04-10 23:29:59 +00:00
|
|
|
head -1 $(STAGING_DIR)/usr/bin/tahoe >$(STAGING_DIR)/usr/bin/tahoe.new
|
|
|
|
echo "from allmydata.scripts import runner" >>$(STAGING_DIR)/usr/bin/tahoe.new
|
|
|
|
echo "runner.run()" >>$(STAGING_DIR)/usr/bin/tahoe.new
|
|
|
|
chmod +x $(STAGING_DIR)/usr/bin/tahoe.new
|
|
|
|
mv $(STAGING_DIR)/usr/bin/tahoe.new $(STAGING_DIR)/usr/bin/tahoe
|
|
|
|
|
2008-07-16 01:47:41 +00:00
|
|
|
dh_install misc/munin/* usr/share/$(DEBNAME)/munin
|
|
|
|
chmod +x $(STAGING_DIR)/usr/share/$(DEBNAME)/munin/*
|
|
|
|
|
2007-09-27 00:55:24 +00:00
|
|
|
dh_pycentral
|
2006-12-05 09:00:44 +00:00
|
|
|
|
|
|
|
clean::
|
|
|
|
-rm -rf build
|