#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

include /usr/share/dpkg/architecture.mk

%:
	dh $@

override_dh_install:
	./debian/build_headers.sh
	dh_install
ifeq (armhf,$(DEB_BUILD_ARCH))
	rm debian/libraspberrypi0/opt/vc/lib/libEGL.so
	rm debian/libraspberrypi0/opt/vc/lib/libGLESv2.so
	rm debian/libraspberrypi0/opt/vc/lib/libOpenVG.so
	rm debian/libraspberrypi0/opt/vc/lib/libWFC.so
	rm debian/libraspberrypi0/opt/vc/lib/libGLESv1_CM.so
endif

override_dh_installudev:
	dh_installudev --name=local-rpi --priority=10

override_dh_fixperms:
	dh_fixperms
ifeq (armhf,$(DEB_BUILD_ARCH))
	chown -R :users debian/libraspberrypi-doc/opt/vc/src/hello_pi
	chmod -R g+w debian/libraspberrypi-doc/opt/vc/src/hello_pi
endif

override_dh_strip:
	# don't strip anything

override_dh_shlibdeps:
	# this is not happy on armhf, let's just skip it
