#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v
INSTALL_DIR=debian/apulse
%:
	dh $@ --parallel

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(CURDIR)/CMakeFiles
	rm -f $(CURDIR)/CMakeCache.txt
	rm -f $(CURDIR)/Makefile
	rm -f $(CURDIR)/cmake_install.cmake
	rm -rf $(CURDIR)/tests/CMakeFiles
	rm -f $(CURDIR)/tests/cmake_install.cmake
	rm -f $(CURDIR)/tests/Makefile
	rm -f $(CURDIR)/apulse
	rm -f $(CURDIR)/tests/CTestTestfile.cmake
	rm -f $(CURDIR)/install_manifest.txt
	rm -f $(CURDIR)/tests/Testing/Temporary/CTestCostData.txt
	rm -f $(CURDIR)/tests/Testing/Temporary/LastTest.log

override_dh_auto_configure:
	cmake -DCMAKE_USE_BUNDLED_PULSEAUDIO_HEADERS=true -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .

override_dh_auto_install:
	dh_auto_install
	dh_installman $(CURDIR)/debian/apulse.1
