Refactor to support both rpm and deb versioning