#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

ARCH = $(shell dpkg --print-architecture)

%:
	dh $@ --parallel --with autotools-dev

# 1. simplescreenrecorder is configured to use libav libraries
#    here as libav is currently still default on Debian
#
# 2. glinjectlib is disabled on non-x86 systems as it
#    requires the x86-only elfhacks code (see README.source)

override_dh_auto_configure:
ifeq ($(ARCH),$(filter $(ARCH),amd64 i386))
		dh_auto_configure -- \
		--disable-assert
else
		dh_auto_configure -- \
		--disable-assert \
		--disable-glinjectlib
endif

override_dh_auto_install:
	dh_auto_install
	rm -f $(CURDIR)/debian/simplescreenrecorder/usr/lib/*/*.la
