generalize packer build process