Bin To Pkg Direct
Apple’s pkgbuild command-line utility (part of the Xcode Command Line Tools) is the correct, modern way to build packages.
Steps:
my_game/
├── USRDIR/
│ ├── EBOOT.BIN
│ └── (other assets, libraries)
└── ICON0.PNG
Navigate to the extracted folder. You will likely see a payload or data folder. Use pkgbuild (as shown in Scenario 1) to wrap that folder into a deployable PKG. bin to pkg
Example:
pkgbuild --root ./extracted_data \
--identifier com.oracle.oldjdk \
--version 1.6.0_23 \
--install-location /Library/Java/JavaVirtualMachines/ \
legacy_jdk.pkg
| Platform | Tool | Command Example |
| :--- | :--- | :--- |
| macOS | pkgbuild, productbuild | pkgbuild --root ./binaries ... |
| Solaris | pkgmk | pkgmk -f prototype -r / |
| Linux (RPM) | rpmbuild | Converts binaries to .rpm (not .pkg) |
| Windows | WiX Toolset | Converts binaries to .msi | Apple’s pkgbuild command-line utility (part of the Xcode
Converting a single executable into a package format (like Debian’s .deb or Red Hat’s .rpm):
Example with fpm (Effing Package Management): my_game/
├── USRDIR/
│ ├── EBOOT
fpm -s dir -t deb -n myapp -v 1.0 \
/path/to/binary=/usr/local/bin/myapp
This wraps your binary into a .deb package, handling dependencies, metadata, and installation paths.
Use ps3sys or SFO Editor to generate PARAM.SFO inside my_game/:
Title ID: MYGAME00001
Title: My Game
Version: 01.00
Category: HG (Homebrew Game)
This is the most common reason for searching "bin to pkg". You have an old CD-ROM (e.g., Adobe Creative Suite 3, a legacy game, or an archive of old shareware) which has been ripped to .bin/.cue. Inside this disc image is an installer that should have been a .pkg, or you want to deploy its contents as a modern macOS package.