#!/usr/bin/make -f

# Copyright (C) 2015, 2016 Sergio Benjamim

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. */

# Fix hardening-no-bindnow and hardening-no-pie
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow,+pie

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@ --buildsystem=cmake --parallel

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) -DCMAKE_SKIP_RPATH=ON -DBUILD_LIBRETRO=ON

override_dh_installchangelogs:
	dh_installchangelogs -k CHANGES
