#!/usr/bin/make -f

LDFLAGS+=-Wl,--as-needed

%:
	dh $@ --parallel --with=autoreconf

override_dh_auto_install:
	dh_auto_install
	# Remove rpath
	chrpath -d $(CURDIR)/debian/sineshaper/usr/lib/*/dssi/sineshaper/sineshaper_gtk
	# Install desktop file and icon
	mkdir -p $(CURDIR)/debian/sineshaper/usr/share/applications
	mkdir -p $(CURDIR)/debian/sineshaper/usr/share/pixmaps
	cp debian/sineshaper.desktop $(CURDIR)/debian/sineshaper/usr/share/applications/
	cp debian/sineshaper32x32.xpm $(CURDIR)/debian/sineshaper/usr/share/pixmaps/
	cd $(CURDIR)/debian/sineshaper/usr/bin && \
		mv sineshaper.sh sineshaper
