Automatic package generation