#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_CMAKE_OPTIONS = \
	-DALSOFT_UTILS=ON \
	-DALSOFT_EXAMPLES=OFF \
	-DALSOFT_TESTS=OFF \
	-DALSOFT_UPDATE_BUILD_VERSION=OFF

ifeq ($(DEB_HOST_ARCH_CPU),i386)
DEB_CMAKE_OPTIONS += -DALSOFT_CPUEXT_SSE3=OFF
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CMAKE_OPTIONS)

execute_after_dh_auto_install:
	install -d debian/tmp/etc/openal
	install -m644 \
		debian/tmp/usr/share/openal/alsoftrc.sample \
		debian/tmp/etc/openal/alsoft.conf
