#!/usr/bin/make -f

%:
	dh $@ --buildsystem=phppear --with phppear

DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')

get-orig-source:
	wget http://download.pear.php.net/package/DB-${DEB_UPSTREAM_VERSION}.tgz -O php-db_${DEB_UPSTREAM_VERSION}.orig.tar.gz
