3 # Uncomment this to turn on verbose mode.
6 GNT_USERGROUP_PREFIX="gnt-"
9 dh $@ --with python2,sphinxdoc,bash_completion
11 override_dh_auto_configure:
14 --localstatedir=/var \
16 --with-export-dir=/var/lib/ganeti/export \
17 --with-iallocator-search-path=/usr/local/lib/ganeti/iallocators,/usr/lib/ganeti/iallocators \
18 --with-os-search-path=/srv/ganeti/os,/usr/local/lib/ganeti/os,/usr/lib/ganeti/os,/usr/share/ganeti/os \
19 --with-extstorage-search-path=/srv/ganeti/extstorage,/usr/local/lib/ganeti/extstorage,/usr/lib/ganeti/extstorage,/usr/share/ganeti/extstorage \
20 --docdir=/usr/share/doc/ganeti \
21 --enable-htools-rapi --enable-restricted-commands \
22 --with-user-prefix=$(GNT_USERGROUP_PREFIX) \
23 --with-group-prefix=$(GNT_USERGROUP_PREFIX)
25 override_dh_auto_clean:
26 [ ! -f Makefile ] || $(MAKE) distclean
27 # this is not removed by make distclean :(
30 rm -f debian/ganeti.init
31 rm -f debian/ganeti.cron.d
32 rm -f debian/ganeti.default
33 rm -f debian/ganeti.postinst
34 rm -f debian/ganeti.postrm
35 if [ -d doc/html.orig ]; then \
37 mv doc/html.orig doc/html; \
41 override_dh_auto_build:
43 mv doc/html doc/html.orig
45 $(CURDIR)/debian/genscript.py postinst "$(CURDIR)" | \
46 sed -f "$(CURDIR)/autotools/replace_vars.sed" >"$(CURDIR)/debian/ganeti.postinst"
47 $(CURDIR)/debian/genscript.py postrm "$(CURDIR)" >"$(CURDIR)/debian/ganeti.postrm"
49 # Add missing bits to ganeti and python-ganeti-rapi. We do not use
50 # override_dh_install (plain) because it will fail in binary-arch builds.
51 override_dh_install-indep:
52 dh_install -i -Xganeti-confd -Xmon-collector -Xhail -Xganeti-mond -Xganeti-luxid --fail-missing
53 cp $(CURDIR)/doc/examples/ganeti.initd $(CURDIR)/debian/ganeti.init
54 cp $(CURDIR)/doc/examples/ganeti.cron $(CURDIR)/debian/ganeti.cron.d
55 cp $(CURDIR)/doc/examples/ganeti.default $(CURDIR)/debian/ganeti.default
57 # Dummy Python module for the RAPI client
58 touch $(CURDIR)/debian/python-ganeti-rapi/usr/share/pyshared/ganeti/__init__.py
59 touch $(CURDIR)/debian/python-ganeti-rapi/usr/share/pyshared/ganeti/rapi/__init__.py
61 override_dh_installinit:
62 dh_installinit --error-handler=true -i -- defaults 20 80
64 # Disable dh_sphinxdoc for binary-arch, as it will raise an error
65 override_dh_sphinxdoc-arch:
67 # Disable the test suite, as it requires the daemon users to be present
69 override_dh_auto_test:
72 .PHONY: override_dh_auto_configure override_dh_auto_clean override_dh_auto_build \
73 override_dh_installinit override_dh_install-indep override_dh_sphinxdoc-arch \