#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

# resolve if release is experimental or backports
EXP_RELEASE = $(filter experimental% UNRELEASED %-backports,\
 $(shell dpkg-parsechangelog -S Distribution))

export LIBSASS_VERSION = $(DEB_VERSION_UPSTREAM)

# relax symbols check when targeting experimental and backports
export DPKG_GENSYMBOLS_CHECK_LEVEL=$(if $(EXP_RELEASE),0,1)

# Let d-shlibs calculate development package dependencies
#  and handle shared library install
execute_after_dh_install:
	d-shlibmove --commit \
		--devunversioned \
		--exclude-la \
		--multiarch \
		--movedev "debian/tmp/usr/include/*" usr/include/ \
		--movedev "debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*" \
			usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/$(DEB_SOURCE).so

%:
	dh $@ --with pkgkde_symbolshelper
