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:
15 --localstatedir=/var \
17 --with-export-dir=/var/lib/ganeti/export \
18 --with-iallocator-search-path=/usr/local/lib/ganeti/iallocators,/usr/lib/ganeti/iallocators \
19 --with-os-search-path=/srv/ganeti/os,/usr/local/lib/ganeti/os,/usr/lib/ganeti/os,/usr/share/ganeti/os \
20 --with-extstorage-search-path=/srv/ganeti/extstorage,/usr/local/lib/ganeti/extstorage,/usr/lib/ganeti/extstorage,/usr/share/ganeti/extstorage \
21 --docdir=/usr/share/doc/ganeti \
22 --enable-htools-rapi --enable-restricted-commands \
23 --with-user-prefix=$(GNT_USERGROUP_PREFIX) \
24 --with-group-prefix=$(GNT_USERGROUP_PREFIX)
26 override_dh_auto_clean:
27 [ ! -f Makefile ] || $(MAKE) distclean
28 # this is not removed by make distclean :(
31 rm -f debian/ganeti.init
32 rm -f debian/ganeti.cron.d
33 rm -f debian/ganeti.default
34 rm -f debian/ganeti.postinst
35 rm -f debian/ganeti.postrm
36 if [ -d doc/html.orig ]; then \
38 mv doc/html.orig doc/html; \
42 override_dh_auto_build:
44 mv doc/html doc/html.orig
46 $(CURDIR)/debian/genscript.py postinst "$(CURDIR)" | \
47 sed -f "$(CURDIR)/autotools/replace_vars.sed" >"$(CURDIR)/debian/ganeti.postinst"
48 $(CURDIR)/debian/genscript.py postrm "$(CURDIR)" >"$(CURDIR)/debian/ganeti.postrm"
50 # Add missing bits to ganeti and python-ganeti-rapi. We do not use
51 # override_dh_install (plain) because it will fail in binary-arch builds.
52 override_dh_install-indep:
53 dh_install -i -Xganeti-confd -Xmon-collector -Xhail -Xganeti-mond -Xganeti-luxid --fail-missing
54 cp $(CURDIR)/doc/examples/ganeti.initd $(CURDIR)/debian/ganeti.init
55 cp $(CURDIR)/doc/examples/ganeti.cron $(CURDIR)/debian/ganeti.cron.d
56 cp $(CURDIR)/doc/examples/ganeti.default $(CURDIR)/debian/ganeti.default
58 # Dummy Python module for the RAPI client
59 touch $(CURDIR)/debian/python-ganeti-rapi/usr/share/pyshared/ganeti/__init__.py
60 touch $(CURDIR)/debian/python-ganeti-rapi/usr/share/pyshared/ganeti/rapi/__init__.py
62 override_dh_installinit:
63 dh_installinit --error-handler=true -i -- defaults 20 80
65 # Disable dh_sphinxdoc for binary-arch, as it will raise an error
66 override_dh_sphinxdoc-arch:
68 # Disable the test suite, as it requires the daemon users to be present
70 override_dh_auto_test:
73 .PHONY: override_dh_auto_configure override_dh_auto_clean override_dh_auto_build \
74 override_dh_installinit override_dh_install-indep override_dh_sphinxdoc-arch \