#!/usr/bin/make -f

DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')

%:
	dh $@

get-orig-source:
	git clone git://gitorious.org/ampache/contrib.git
	find ./contrib/themes -type d -exec chmod 755 {} \;
	find ./contrib/themes -type f -exec chmod 644 {} \;
	find ./contrib/themes -name "Thumbs.db" -exec rm {} \;
	mv ./contrib/themes ampache-themes-$(DEB_UPSTREAM_VERSION)
	rm -rf ./contrib
	GZIP=--best tar -cz --owner root --group root --mode a+rX -f \
		ampache-themes_$(DEB_UPSTREAM_VERSION).orig.tar.gz \
		ampache-themes-$(DEB_UPSTREAM_VERSION)
	rm -r ampache-themes-$(DEB_UPSTREAM_VERSION)

