Convert packages to the new template format (r).