-
Notifications
You must be signed in to change notification settings - Fork 1
Home
monekyx-net edited this page Mar 1, 2026
·
29 revisions
Welcome to the PortMaster-Build-Templates wiki!
This wiki is dedicated to explain how to build x86_64 and aarch64 games/ports for PortMaster using GitHub Actions.
Ports are built using Github Actions to produce binaries for aarch64/arm64 and x86_64.Using Github actions allows leveraging Github runners to compile and produce the ports on both architectures and builds them in parallel.
- Use almost any PC/device with git/browser installed for doing ports
- No need for a VM.
- All operating system and library files etc are pulled via GitHub Actions
- Does not clutter up your system with build files, libraries etc
- Building aarch64 and x86_64 binaries in parallel
- Unified build script for x86_64 and aarch64
- Build fully logged and documented
- Access to port json
- Automates parts of the PortMaster build by referencing the port.json file.
- Create a recipe file by running recipes/new_recipe.sh from the recipes folder. This will find an existing port or create a new template.
- Example json recipe shown below:-
{
"recipe_version": 1,
"name": "folder.zip",
"port_json": "new_ports/port/port/port/port.json",
"source": {
"date_updated": "",
"port_exe": "port",
"port_build": "make",
"port_checksum": "",
"port_url": "monkeyx-net/space_invaders_part_ii",
"port_version": ""
}
} - port_url is the path to repo.
- port.exe name of compiled binary to run
- port_build command to make can be used with && ie confifure && make
- port_build is used by the build.sh file
- The recipes are checked daily and downloaded to the github repo. See this action.
- This job check released version of commits and downloads latest source and PortMaster files if there is a newer version of source code.
- The example below shows a basic build that also copies lib files and assets
#!/bin/bash
set -e
PORT_FOLDER="$1"
PORT_BUILD="$2"
PORT_EXE="$3"
ARCH="$4"
DEST_DIR="dist/libs.${ARCH}"
FILES=(
"libfluidsynth.so.2"
"libinstpatch-1.0.so.2"
"libjack.so.0"
"libmad.so.0"
"libmikmod.so.3"
"libreadline.so.8"
"libSDL_mixer-1.2.so.0"
"libSDL-1.2.so.0"
"libtinfo.so.6"
"libFLAC.so.8"
)
if [[ ${ARCH} == "aarch64" ]]; then
SOURCE_DIR="/usr/lib/aarch64-linux-gnu/"
elif [[ ${ARCH} == "x86_64" ]]; then
SOURCE_DIR="/usr/lib/x86_64-linux-gnu/"
fi
cd "new_ports/${PORT_FOLDER}/source"
${PORT_BUILD}
mkdir -p dist/libs.${ARCH}
cp "${PORT_EXE}" "dist/${PORT_EXE}.${ARCH}"
strip "dist/${PORT_EXE}.${ARCH}" || true
# copy assets folder
cp -r data/ dist/
for file in "${FILES[@]}"; do
cp "${SOURCE_DIR}/${file}" "${DEST_DIR}/" 2>/dev/null || echo "Warning: ${file} not
found"
done
tar -czf "/workspace/${PORT_FOLDER}-linux-${ARCH}.tar.gz" -C dist .
pwd
ls -lha-
To build a port run the following Acttion https://github.com/monkeyx-net/PortMaster-Build-Templates/actions/workflows/build_recipe.yml
-
Run the workflow and then set a path the recipe file
recipes/ports/shamogu/recipe.json -
It will then build the latest version of the port and create a PM artifact zip file for testing.
-
Any errors can be viewed via the action.