Download a Mercury srcdist tarball, then run:
make_deb /path/to/mercury-srcdist-VERSION.tar.gz
You can customise the grades in debian/rules.
Download a Mercury srcdist tarball into ~/rpmbuild/SOURCES (or similar), then run:
make_rpm ~/rpmbuild/SOURCES/mercury-srcdist-VERSION.tar.gz
You can customise the grades in mercury-compiler.spec.