Add --with-build-number configure argument and support in debian/rules.