#!/usr/bin/make -f

%:
	dh ${@}

create-icons:
	# requires inkscape to be installed
	@if [ ! -x /usr/bin/inkscape ]; then \
		echo "ERROR: inkscape not installed!" ; \
		false ; \
	fi
	
	# create XDG compatible icons from SVG
	for i in 16 22 32 48 64 128; do \
		mkdir -p "icons/hicolor/$${i}x$${i}/apps" ; \
		inkscape --export-width=$${i} \
			 --export-height=$${i} \
			 --export-png="$(CURDIR)/icons/hicolor/$${i}x$${i}/apps/sshactivate.png" \
				$(CURDIR)/icons/sshactivate.svg ; \
	done
	for i in 16 22 32 48 64 128; do \
		mkdir -p "icons/hicolor/$${i}x$${i}/apps" ; \
		inkscape --export-width=$${i} \
			 --export-height=$${i} \
			 --export-png="$(CURDIR)/icons/hicolor/$${i}x$${i}/apps/sshdeactivate.png" \
				$(CURDIR)/icons/sshdeactivate.svg ; \
	done


