#!/usr/bin/make -f

THEMES_DIR=$(CURDIR)/debian/metacity-themes/usr/share/themes

%:
	dh $@

override_dh_clean:
	rm -f TWEAK-*.tar.gz
	dh_clean

override_dh_installdirs:
	dh_installdirs
	# The extract script does what the name suggest, also it
	# simplyfies the tree of some themes.
	perl -I. debian/extract.pl
	# dh_fixperms ignores /usr/share/themes
	chmod -R 0644 $(THEMES_DIR);
	chmod -R +X $(THEMES_DIR);
	# The makedoc scripts generates documentation for each theme and the 
	# package, removes duplicate licenses and copy any documentation provided
	# with the theme to the correct location
	perl -I. debian/makedoc.pl

override_dh_missing:
	dh_missing --fail-missing
