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 \
24 # --enable-restricted-commands \
25 # --with-user-prefix=$(GNT_USERGROUP_PREFIX) \
26 # --with-group-prefix=$(GNT_USERGROUP_PREFIX)
28 override_dh_auto_clean:
29 [ ! -f Makefile ] || $(MAKE) distclean
30 # this is not removed by make distclean :(
33 rm -f debian/snf-ganeti.ganeti.init
34 rm -f debian/snf-ganeti.ganeti.cron.d
35 rm -f debian/snf-ganeti.ganeti.default
36 rm -f debian/snf-ganeti.postinst
37 rm -f debian/snf-ganeti.postrm
38 if [ -d doc/html.orig ]; then \
40 mv doc/html.orig doc/html; \
44 override_dh_auto_build:
46 mv doc/html doc/html.orig
48 $(CURDIR)/debian/genscript.py postinst "$(CURDIR)" | \
49 sed -f "$(CURDIR)/autotools/replace_vars.sed" >"$(CURDIR)/debian/snf-ganeti.postinst"
50 $(CURDIR)/debian/genscript.py postrm "$(CURDIR)" >"$(CURDIR)/debian/snf-ganeti.postrm"
52 # Add missing bits to ganeti and python-ganeti-rapi. We do not use
53 # override_dh_install (plain) because it will fail in binary-arch builds.
54 override_dh_install-indep:
55 dh_install -i -Xganeti-confd -Xmon-collector -Xhail -Xganeti-mond -Xganeti-luxid --fail-missing
56 cp $(CURDIR)/doc/examples/ganeti.initd $(CURDIR)/debian/snf-ganeti.ganeti.init
57 cp $(CURDIR)/doc/examples/ganeti.cron $(CURDIR)/debian/snf-ganeti.ganeti.cron.d
58 cp $(CURDIR)/doc/examples/ganeti.default $(CURDIR)/debian/snf-ganeti.ganeti.default
60 # Dummy Python module for the RAPI client
61 touch $(CURDIR)/debian/python-ganeti-rapi/usr/share/pyshared/ganeti/__init__.py
62 touch $(CURDIR)/debian/python-ganeti-rapi/usr/share/pyshared/ganeti/rapi/__init__.py
64 override_dh_installinit:
65 dh_installinit --name=ganeti --error-handler=true -i -- defaults 20 80
67 override_dh_installcron:
68 dh_installcron --name=ganeti
70 # Disable dh_sphinxdoc for binary-arch, as it will raise an error
71 override_dh_sphinxdoc-arch:
73 # Disable the test suite, as it requires the daemon users to be present
75 override_dh_auto_test:
78 .PHONY: override_dh_auto_configure override_dh_auto_clean override_dh_auto_build \
79 override_dh_installinit override_dh_install-indep override_dh_sphinxdoc-arch \