#!/usr/bin/make -f

#DEB_KDE_LINK_WITH_AS_NEEDED := yes

override_dh_auto_configure:
	dh_auto_configure -Skde -- -DCMAKE_USE_RELATIVE_PATHS=ON

override_dh_bugfiles:
	dh_bugfiles -A

override_dh_install:
	dh_install
ifeq (,$(filter armel armhf,$(DEB_HOST_ARCH)))
	dh_install -pamarok --ignore debian/amarok.install usr/lib/kde4/amarok_context_applet_analyzer.so
	dh_install -pamarok-common --ignore debian/amarok-common.install usr/share/kde4/services/amarok-context-applet-analyzer.desktop
endif
	# Copy English errmsg.sys from mysql-server-core package
	if [ -d debian/amarok-common ]; then \
	    cp -a /usr/share/mysql/english/errmsg.sys debian/amarok-common/usr/share/kde4/apps/amarok/mysqle/; \
	fi

override_dh_makeshlibs:
	dh_makeshlibs "-Xusr/lib/kde4/*"

%:
	dh $@ --with kde --parallel --dbg-package=amarok-dbg

.PHONY: override_dh_auto_test
