#!/usr/bin/make -f

ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)

ifeq ($(ARCH),armhf)
	PLATFORM=platform="armv hardfloat"
endif

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- $(PLATFORM) SYSTEM_ZLIB=1

override_dh_auto_install:
	dh_auto_install -- \
	libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_install:
	dh_install debian/mednafen_pce_fast.libretro		usr/lib/${DEB_HOST_MULTIARCH}/libretro
	dh_install debian/libretro-beetle-pce-fast.metainfo.xml	usr/share/metainfo/
