diff -ur debian/debian/changelog latest-upstream-fixes-rrdtool/debian/changelog
--- debian/debian/changelog	2010-07-28 15:18:06.247665000 -0700
+++ latest-upstream-fixes-rrdtool/debian/changelog	2010-07-28 15:10:47.924299000 -0700
@@ -1,3 +1,10 @@
+libdbi (0.8.3-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+  * debian/rules: make upstream version dynamic for /usr/share/doc clearing
+
+ -- Clint Byrum <clint@ubuntu.com>  Wed, 28 Jul 2010 12:44:39 -0700
+
 libdbi (0.8.2-3) unstable; urgency=low
 
   * New maintainer (Closes: #444424)
diff -ur debian/debian/rules latest-upstream-fixes-rrdtool/debian/rules
--- debian/debian/rules	2010-07-28 15:18:06.247665000 -0700
+++ latest-upstream-fixes-rrdtool/debian/rules	2010-07-28 09:21:55.382615000 -0700
@@ -9,6 +9,8 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
+UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')
+
 CFLAGS = -Wall -g
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -57,7 +59,7 @@
 	# Add here commands to install the package into debian/libdbi0.
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/libdbi0
 	# Remove the doc as we are producing a separate package
-	rm -r debian/libdbi0/usr/share/doc/libdbi-0.8.2/
+	rm -r debian/libdbi0/usr/share/doc/libdbi-$(UPSTREAM_VERSION)/
 	# Remove the header files as we are production a separate package
 	rm -r debian/libdbi0/usr/include
 	# Remove the symlink as it should go in the -dev package
