#!/usr/bin/make -f

export DH_VERBOSE=1

%:
	dh $@

override_dh_auto_build:
	# Makefile is only for constructing the RPM packaging
	echo "building is a noop"

override_dh_auto_install:
	# Ship only the Red Hat Ceph Storage config
	# (overwrite upstream settings)
	cp group_vars/rhcs.yml.sample group_vars/all.yml.sample
	# Strip coreos files.
	# These are unneeded on DEB-based distros, and the playbooks download
	# random things from around the internet.
	rm -r roles/ceph-common-coreos
	rm group_vars/common-coreoss.yml.sample
	# These untested playbooks are too unstable for users.
	rm -r infrastructure-playbooks/untested-by-ci
	dh_auto_install

override_dh_auto_test:
	# Borrowed from upstream's .travis.yml:
	HOME=/tmp/buildd ansible-playbook -i dummy-ansible-hosts test.yml --syntax-check
