Skip to content

Commit 134bf7a

Browse files
committed
Try a portmaster integration thing
1 parent 2e9bdd4 commit 134bf7a

9 files changed

Lines changed: 375 additions & 55 deletions

File tree

.github/workflows/collect_ports.yml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
mkdir -p temp_ports
4949
[ -f docs/ports.json ] || echo "[]" > docs/ports.json
5050
51-
# ────────────────────── DETERMINE PORTS ──────────────────────
51+
# ---------------------- DETERMINE PORTS ----------------------
5252
- name: Determine ports to process
5353
id: ports
5454
run: |
@@ -149,7 +149,7 @@ jobs:
149149
# lifetime_downloads is only updated when a port is re-uploaded (Process ports step).
150150
# The frontend adds the live GitHub download_count on top for the current period.
151151

152-
# ────────────────────── PROCESS PORTS ──────────────────────
152+
# ---------------------- PROCESS PORTS ----------------------
153153
- name: Process ports
154154
if: steps.ports.outputs.ports != ''
155155
run: |
@@ -266,7 +266,7 @@ jobs:
266266
mv "$PORTS_JSON.tmp" "$PORTS_JSON"
267267
done
268268
269-
# ────────────────────── SYNC DISK, JSON, AND RELEASE ──────────────────────
269+
# ---------------------- SYNC DISK, JSON, AND RELEASE ----------------------
270270
- name: Purge deleted or invalid ports
271271
run: |
272272
set -euo pipefail
@@ -328,13 +328,17 @@ jobs:
328328
329329
[[ "$ASSET_NAME" == *.zip ]] || continue
330330
331+
# images.zip belongs to the PortMaster catalog, not a port --
332+
# leave it alone.
333+
[[ "$ASSET_NAME" == "images.zip" ]] && continue
334+
331335
if ! printf '%s\n' "${VALID_NAMES[@]}" | grep -iqx "$ASSET_NAME"; then
332336
echo "Deleting orphaned asset: $ASSET_NAME"
333337
gh api -X DELETE "repos/${GITHUB_REPOSITORY}/releases/assets/$ASSET_ID" || echo "Failed to delete $ASSET_NAME"
334338
fi
335339
done
336340
337-
# ────────────────────── RELEASE ──────────────────────
341+
# ---------------------- RELEASE ----------------------
338342
- name: Ensure release exists
339343
run: |
340344
gh release view ports-latest >/dev/null 2>&1 || \
@@ -353,6 +357,36 @@ jobs:
353357
gh release upload ports-latest "$f" --clobber
354358
done
355359
360+
# ---------------------- PORTMASTER CATALOG ----------------------
361+
# PortMasterV3 ports.json + images.zip (buildtools/generate_pm_catalog.py).
362+
# Unchanged assets keep their ids -- Pharos caches images by asset id+size.
363+
- name: Publish PortMaster catalog
364+
run: |
365+
set -euo pipefail
366+
python3 buildtools/generate_pm_catalog.py --output temp_pm
367+
368+
# The images.zip md5 is baked into ports.json, so if the catalog
369+
# didn't change, the images didn't either.
370+
if curl -sfL -o current_catalog.json \
371+
"https://github.com/${GITHUB_REPOSITORY}/releases/download/ports-latest/ports.json"; then
372+
if cmp -s current_catalog.json temp_pm/ports.json; then
373+
echo "PortMaster catalog unchanged; skipping upload."
374+
exit 0
375+
fi
376+
OLD_MD5=$(jq -r '.utils["images.zip"].md5 // empty' current_catalog.json || true)
377+
NEW_MD5=$(md5sum temp_pm/images.zip | awk '{print $1}')
378+
if [[ -n "$OLD_MD5" && "$OLD_MD5" == "$NEW_MD5" ]]; then
379+
echo "images.zip unchanged; uploading catalog only."
380+
gh release upload ports-latest temp_pm/ports.json docs/030_rhh.source.json --clobber
381+
exit 0
382+
fi
383+
fi
384+
gh release upload ports-latest \
385+
temp_pm/ports.json \
386+
temp_pm/images.zip \
387+
docs/030_rhh.source.json \
388+
--clobber
389+
356390
- name: Commit ports.json
357391
run: |
358392
git config user.name github-actions

.github/workflows/collect_screenshots.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ If you use Pharos, autoinstall is performed for you.
2525

2626
You should use the **BETA** branch of the PortMaster application to ensure you have all the included tools (e.g. 7zzs).
2727

28+
### Adding this repository to the PortMaster app
29+
PortMaster's own app can browse and install these ports directly. Download [030_rhh.source.json](https://github.com/JeodC/RHH-Ports/releases/download/ports-latest/030_rhh.source.json) and place it in the `config` folder inside your PortMaster installation (next to `020_portmaster.source.json`), commonly:
30+
31+
- `/roms/ports/PortMaster/config/` (ArkOS and similar)
32+
- `.local/share/PortMaster/config/` (ROCKNIX, muOS, Knulli, and similar)
33+
34+
On the next launch PortMaster will fetch this repository's catalog alongside its own. Note that a handful of ports here share names with entries in the official PortMaster or Multiverse catalogs; for those, PortMaster shows the official entry instead of mine.
35+
2836
## Port Capability Requirements
2937
Some of the ports in this repository have minimum requirements. Be sure to check the `port.json` file for a port to see if it lists any of the following requirements:
3038

0 commit comments

Comments
 (0)