#!/usr/bin/make -f

PKG := polyhedroncarousel-by-mrsbeanbag
EXE := debian/$(PKG)/usr/lib/x86_64-linux-gnu/$(PKG)/carousel_linux64

%:
	dh $@

# Prebuilt binary linked against SFML 2.4 and GLEW 2.0: these sonames only
# exist as compatibility links (see debian/*.links), so dpkg-shlibdeps cannot
# resolve them. Compute ${shlibs:Depends} on a copy without them; SFML and
# GLEW are listed by hand in debian/control.
override_dh_shlibdeps:
	cp $(EXE) debian/shlibs-check
	patchelf --remove-needed libsfml-window.so.2.4 \
		--remove-needed libsfml-system.so.2.4 \
		--remove-needed libGLEW.so.2.0 debian/shlibs-check
	dpkg-shlibdeps -Tdebian/$(PKG).substvars -edebian/shlibs-check
	rm -f debian/shlibs-check
