phase1: run package/cleanup before package/compile