summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 102a340e95334e3b9a2d19617b455e3bd08a60ca (plain)
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
#!/usr/bin/make -f

# Lucid does not have dh_python2, but we would like to be able to use
# this rules file to build on lucid as well.
WITH_PYTHON2 = $(shell test -f /usr/bin/dh_python2 && echo "--with python2")
WITH_SPHINXDOC = $(shell test -f /usr/bin/dh_sphinxdoc && echo "--with sphinxdoc")

%:
	dh $@ ${WITH_PYTHON2} ${WITH_SPHINXDOC}

override_dh_installinit:
	# Install bcfg2 initscript without starting it on postinst
	dh_installinit --package=bcfg2 --no-start
	# Install bcfg2-server initscript without starting it on postinst
	dh_installinit --package=bcfg2-server --no-start
	# Install bcfg2-report-collector initscript without starting it on postinst
	dh_installinit --package=bcfg2-server --name=bcfg2-report-collector --no-start

override_dh_auto_build:
	dh_auto_build
	python setup.py build_sphinx

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build

override_dh_auto_install:
	dh_auto_install
	install -m 644 -D tools/bcfg2-completion.bash debian/tmp/etc/bash_completion.d/bcfg2