~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/make -f

# Verbose mode
#export DH_VERBOSE=1

%:
	dh $@ --with python2

override_dh_auto_clean:
	dh_auto_clean
	rm -rf doc/build/* doc/source/api doc/.autogenerated
	rm -rf tests.sqlite clean.sqlite run_tests.log
	rm -rf CA
	rm -f po/nova.pot
	rm -rf .autogenerated

debian/nova-compute.postinst: debian/nova-compute.postinst.in
	if dpkg-vendor --derives-from ubuntu ; then \
		LIBVIRTGRP=libvirtd; \
	else \
		LIBVIRTGRP=libvirt; \
	fi; \
	sed -e "s/%LIBVIRTGRP%/$$LIBVIRTGRP/" < $< > $@

override_dh_auto_build: debian/nova-compute.postinst
	dh_auto_build
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	python setup.py build_sphinx
else
	mkdir -p $(CURDIR)/doc/build/html
	mkdir -p $(CURDIR)/doc/build/man
	touch $(CURDIR)/doc/build/man/nova-manage.1
endif

get-orig-source:
	uscan --verbose --rename --destdir=../build-area

version_prefix := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
get-vcs-source:
	wget http://tarballs.openstack.org/nova/nova-master.tar.gz \
		 -O ../nova_$(version_prefix).orig.tar.gz

override_dh_install:
	dh_install --fail-missing -Xbin/nova-all
	chmod 440 $(CURDIR)/debian/nova-common/etc/sudoers.d/nova_sudoers
	install -D -m 644 debian/source_nova.py debian/php5-common/usr/share/apport/package-hooks/source_nova.py
	install -D -m 0644 $(CURDIR)/etc/nova/logging_sample.conf $(CURDIR)/debian/nova-common/etc/nova/logging.conf
	for hypervisor in qemu kvm xen uml lxc; do \
		install -D -m 0600 $(CURDIR)/debian/nova-compute-$${hypervisor}.conf $(CURDIR)/debian/nova-compute-$${hypervisor}/etc/nova/nova-compute.conf; \
	done

override_dh_fixperms:
	dh_fixperms -Xnova_sudoers
	dh_fixperms -Xnova_tgt.conf
	rm -f $(CURDIR)/debian/python-nova/usr/share/pyshared/nova/CA/.gitignore
	rm -f $(CURDIR)/debian/python-nova/usr/share/pyshared/nova/CA/projects/.gitignore
	rm -f $(CURDIR)/debian/python-nova/usr/share/pyshared/nova/CA/reqs/.gitignore

ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	testr init && testr run --parallel
endif

override_dh_python2:
	dh_python2
	dh_python2  /usr/lib/xcp

override_dh_installlogrotate:
	dh_installlogrotate
	dh_installlogrotate --name=nova-manage
	dh_installlogrotate --name=nova-dhcpbridge

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog