$ pkgutil --expand GoogleDrive.pkg GoogleDrive.unpkg
$ rm -rf GoogleDrive.unpkg/GARBAGE.pkg
- Remove unnecessary entries:
<installer-gui-script><choices-outline><line>
<installer-gui-script><choice>
<installer-gui-script><pkg-ref>
$ vim GoogleDrive.unpkg/DESIRED.pkg/Scripts/[postinstall|preinstall]
$ pkgutil --flatten GoogleDrive.unpkg GoogleDrive.pkg