~ubuntu-branches/ubuntu/karmic/tahoe-lafs/karmic

« back to all changes in this revision

Viewing changes to misc/etch/debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Zooko O'Whielacronx (Hacker)
  • Date: 2009-09-24 00:00:05 UTC
  • Revision ID: james.westby@ubuntu.com-20090924000005-ixe2n4yngmk49ysz
Tags: upstream-1.5.0
ImportĀ upstreamĀ versionĀ 1.5.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 README relnotes.txt docs misc/spacetime misc/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/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