~gandelman-a/nova/libvirt_refresh_2

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Chuck Short
  • Date: 2012-02-29 20:08:26 UTC
  • mfrom: (312.1.5 debian-merge)
  • Revision ID: zulcss@ubuntu.com-20120229200826-3s2nektpbonk1dfs
* debain/control: Fix nova-compute-$flavor Depends
* debian/rules: Fix FTBFS.
* Merge Ubuntu/Debian packaging:
  - Thanks to Julien Danjou, Ghe Rivero, and Thomas Goirand
  - debian/copyright: Update copyright file.
  - debian/nova-api.init, debian/nova-compute.init,
    debian/nova-network.init, debian/nova-objectstore,
    debian/nova-scheduler, debian/nova-volume.init:
    Synchronize init scripts.
  - nova-common.install, debian/rules: Install policy.json
  - debian/rules, debian/nova-xcp-network.install,
    debian/nova-xcp-plugins.install, nova-xcp-plugins.postrm,
    debian/nova-xcp-plugins.doc, debian/nova-xcp-plugins.postinst,
    debian/README.xcp_and_openstack, debian/control,
    debian/ubuntu_xen-openvswitch-nova.rules,
    debian/patches/path-to-the-xenhost.conf-fixup.patch:
    Add Xen XCP support.
  - debian/control,
    debian/nova-compute-{kvm,lxc,qemu,xen,uml}.postinst: Make
    nova-compute a virtual package.
  - Dropped ubuntu_ubuntu_control_vars: We dont use it
* New upstream release.
* Dropped python-babel, it will be handled by langpacks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Verbose mode
4
4
#export DH_VERBOSE=1
5
5
 
6
 
include /usr/share/python/python.mk
7
 
 
8
 
PACKAGE_NAME=python-nova
9
 
debroot = debian/tmp
10
 
site_packages_dir=$(debroot)$(call py_libdir,$(shell pyversions -d))
11
6
 
12
7
# Lucid does not have dh_python2, but we would like to be able to use this
13
8
# rules file to build on lucid as well. Thus the branching logic.
18
13
 
19
14
override_dh_auto_clean:
20
15
        dh_auto_clean
21
 
        rm -rf doc/doc/build tests.sqlite clean.sqlite
22
 
        rm -rf debian/*.upstart
23
 
        rm -f debian/nova-common.manpages
24
 
        rm -f doc/doc/build/man/nova-manage.1
 
16
        rm -rf doc/doc doc/source/api doc/.autogenerated
 
17
        rm -rf tests.sqlite clean.sqlite run_tests.log
 
18
        rm -rf CA
 
19
        rm -rf nova.egg-info
 
20
        rm -f po/nova.pot
25
21
 
26
22
debian/nova-compute.postinst: debian/nova-compute.postinst.in
27
23
        if dpkg-vendor --derives-from ubuntu ; then \
33
29
 
34
30
override_dh_auto_build: debian/nova-compute.postinst
35
31
        dh_auto_build
36
 
        echo "HELLO"
37
32
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
38
33
        python setup.py build_sphinx
39
 
        cp $(CURDIR)/debian/nova-common.manpages.in $(CURDIR)/debian/nova-common.manpages
40
 
        cp $(CURDIR)/doc/doc/build/man/novamanage.1 $(CURDIR)/doc/doc/build/man/nova-manage.1
41
34
else
42
35
        mkdir -p $(CURDIR)/doc/doc/build/html
43
36
endif
57
50
                        --output=../$(DEBIAN_NAME)_$(DEBIAN_VERSION).orig.tar.gz \
58
51
                        --prefix=$(DEBIAN_NAME)-$(DEBIAN_VERSION)/
59
52
 
60
 
 
61
 
override_dh_auto_install:
62
 
        # python-nova
63
 
        python setup.py install -f --install-layout=deb --root=$(debroot)
64
 
        mkdir -p $(debroot)/usr/share
65
 
        mv $(site_packages_dir)/nova/locale $(debroot)/usr/share
66
 
        mkdir -p $(debroot)/usr/share/apport/package-hooks
67
 
 
68
 
        # nova-common
69
 
        install -D -m 440 $(CURDIR)/debian/nova_sudoers $(CURDIR)/debian/nova-common/etc/sudoers.d/nova_sudoers
 
53
override_dh_install:
 
54
        dh_install
 
55
        chmod 440 $(CURDIR)/debian/nova-common/etc/sudoers.d/nova_sudoers
70
56
        install -D -m 0664 $(CURDIR)/debian/nova-volume.default $(CURDIR)/debian/nova-volume/etc/default/nova-volume
71
57
        for hypervisor in qemu kvm xen uml lxc; do \
72
58
                install -D -m 0600 $(CURDIR)/debian/nova-compute-$${hypervisor}.conf $(CURDIR)/debian/nova-compute-$${hypervisor}/etc/nova/nova-compute.conf; \
93
79
        fi
94
80
        dh_installinit --error-handler=true
95
81
 
96
 
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
97
 
override_dh_installdocs:
98
 
        dh_installdocs
99
 
        rm -f $(CURDIR)/debian/nova-doc/usr/share/doc/nova-doc/html/_static/jquery.js
100
 
        ln -s ../../../../javascript/jquery/jquery.js $(CURDIR)/debian/nova-doc/usr/share/doc/nova-doc/html/_static/jquery.js
101
 
endif
102
 
 
103
 
override_dh_gencontrol:
104
 
        if dpkg-vendor --derives-from ubuntu ; then \
105
 
                dh_gencontrol -- -T$(CURDIR)/debian/ubuntu_control_vars ; \
106
 
        else \
107
 
                dh_gencontrol -- -T$(CURDIR)/debian/debian_control_vars ; \
108
 
        fi
 
82
override_dh_python2:
 
83
        dh_python2
 
84
        dh_python2  /usr/lib/xcp