NEWVERSION := $(shell sh -c "LC_ALL=C svn info |grep 'Revision' |sed -e 's/Revision: //' -e 's/\(.*\)/1.\1-1/' |grep '1.[0-9][0-9]*-1'")

packages: 
	if [ `svn st |wc -l` != 0 ]; then echo "\nworking copy has unversioned files\n"; svn st ; exit 1 ; fi
	cd yandex-du-ppcmoddev-dependencies && \
	if [ -z "$(NEWVERSION)" ]; then echo '\n\nempty $$NEWVERSION, stop\n';  exit 1; fi && \
	dch --create -v $(NEWVERSION) --package yandex-du-ppcmoddev-dependencies --force-distribution --distribution unstable "next auto build" && \
	dpkg-buildpackage -rfakeroot
	mkdir -p deb
	mv yandex-du-ppcmoddev-dependencies_$(NEWVERSION)* deb

clean:
	cd yandex-du-ppcmoddev-dependencies && \
	rm -rf \
    debian/changelog \
    debian/copyright \
    debian/files \
    debian/yandex-du-ppcmoddev-dependencies* \
    debian/debhelper.log \
    debian/substvars \
    debian/tmp

