add a hook to control package building in a RAM