#!/usr/bin/make -f

DEBDIR=$(CURDIR)/debian

%:
	dh $@ --with python3

# Add here any variable or target overrides you need.

override_dh_clean:
	debian/fzp2copyright
	dh_clean

override_dh_install:
	dh_install
	find $(DEBDIR)/fritzing-parts/ -type d -empty -delete
	find $(DEBDIR)/fritzing-parts/usr/share/fritzing/parts/ \
		-type f -exec chmod -c -x {} \;
	find $(DEBDIR)/fritzing-parts/usr/share/fritzing/parts/svg/core/ \
		-name LICENSE.txt -delete

update-upstream-changelog:
	w3m -dump http://fritzing.org/download/history-changes/ \
	| sed '/^History of changes/,/First preview release/!d' > $(DEBDIR)/docs/changelog

get-packaged-orig-source:
	uscan --download-current-version
