#!/usr/bin/make -f # export DH_VERBOSE=1 include /usr/share/openstack-pkg-tools/pkgos.make export OSLO_PACKAGE_VERSION=$(VERSION) include /usr/share/python/python.mk debroot = debian/tmp site_packages_dir=$(debroot)$(call py_libdir,$(shell pyversions -d)) %: dh $@ --buildsystem=python_distutils --with python2,sphinxdoc 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 -rf nova.egg-info rm -f po/nova.pot rm -rf .autogenerated rm -f debian/nova-common.config debian/nova-common.postinst debian/nova-compute-xen.postinst \ debian/nova-api.config debian/nova-api.postinst rm -f debian/*.upstart override_dh_auto_build: dh_auto_build /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-common.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-common.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-api.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-api.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-compute-xen.postinst override_dh_sphinxdoc: echo skipping docs override_dh_installman: echo skipping man override_dh_install: python setup.py install -f --install-layout=deb --root=$(debroot) mkdir -p $(debroot)/usr/share # mv $(site_packages_dir)/nova/locale $(debroot)/usr/share rm debian/tmp/usr/bin/nova-api-os-compute rm debian/tmp/usr/bin/nova-api-metadata rm debian/tmp/usr/bin/nova-api-ec2 dh_install --fail-missing -Xbin/nova-all -Xbin/nova-objectstore install -D -m 0440 $(CURDIR)/debian/nova-common.sudoers $(CURDIR)/debian/nova-common/etc/sudoers.d/nova-common install -D -m 0644 $(CURDIR)/etc/nova/logging_sample.conf $(CURDIR)/debian/nova-common/usr/share/nova-common/logging.conf set -e ; for hypervisor in qemu kvm uml lxc; do \ install -D -m 0600 $(CURDIR)/debian/nova-compute-$${hypervisor}.conf $(CURDIR)/debian/nova-compute-$${hypervisor}/etc/nova/nova-compute.conf; \ done install -D -m 0600 $(CURDIR)/debian/nova-compute-baremetal.conf $(CURDIR)/debian/nova-baremetal/etc/nova/nova-compute.conf install -D -m 0600 $(CURDIR)/debian/nova-compute-xen.conf.dist $(CURDIR)/debian/nova-compute-xen/usr/share/nova-compute-xen/nova-compute.conf find $(CURDIR)/debian -name .gitignore -delete override_dh_fixperms: dh_fixperms -Xnova_sudoers dh_fixperms -Xnova_tgt 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 # Make sure all our plugins are executable # set -e ; for i in $(CURDIR)/debian/nova-xcp-plugins/usr/lib/xcp/plugins/* ; do \ # chmod +x $$i ; \ # done # # Don't ask, that's as stupid as it seems... (and it wouldn't work without this!) # mkdir -p $(CURDIR)/debian/nova-xcp-plugins/etc/xcp # echo "{}" >$(CURDIR)/debian/nova-xcp-plugins/etc/xcp/xenhost.conf # chmod 0440 $(CURDIR)/debian/nova-common/etc/sudoers.d/nova-common ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) override_dh_auto_test: ./run_tests.sh -N -P || true #python setup.py testr --slowest --testr-args='--subunit ' || true endif # We use override_dh_installmenu because it's done in the sequence with dh, # and we already override dh_installinit in pkgos.make. # Obviously, we will never use a Desktop menu in such a package, so that's # not a problem. override_dh_installmenu: #dh_installinit -pnova-console --name=nova-consoleauth dh_installinit --name=nova-novncproxy dh_installinit --name=nova-spicehtml5proxy dh_installinit --name=nova-xenvncproxy install -D -m 0644 $(CURDIR)/debian/nova-consoleproxy.mydefault $(CURDIR)/debian/nova-consoleproxy/usr/share/nova-consoleproxy/default override_dh_python2: dh_python2 # This is needed for the XCP plugins, which have to be installed in # a non-standard directory. This is a problem upstream which isn't # fixable in Debian easily (though it isn't a policy violation). dh_python2 /usr/lib/xcp