Rewrite the install rules to be saner