#!/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
	mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/ debian/tmp/usr/bin
	cp opt/vc/lib/libelftoolchain.so debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
	patchelf hardfp/opt/vc/bin/vcdbg \
		--replace-needed libdebug_sym.so libdebug_sym.so.0 \
		--replace-needed libvcos.so libvcos.so.0 \
		--output debian/tmp/usr/bin/vcdbg
	dh_install

override_dh_fixperms:
	dh_fixperms

override_dh_strip:
	# don't strip anything
