mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-27 08:22:32 +00:00
36 lines
1.2 KiB
Makefile
36 lines
1.2 KiB
Makefile
#! /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
|
|
|
|
STAGING_DIR=$(CURDIR)/debian/allmydata-tahoe
|
|
|
|
# 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.
|
|
|
|
install/allmydata-tahoe::
|
|
mkdir -pm755 $(STAGING_DIR)
|
|
python setup.py install --root=$(STAGING_DIR)
|
|
|
|
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
|
|
|
|
dh_pycentral
|
|
|
|
clean::
|
|
-rm -rf build
|