Skip to content

Commit fd42d30

Browse files
dsward2claude
andcommitted
Strip submission-notes header from Portfile, document workflow in README
Reviewer at macports-ports PR #32834 asked for the meta-commentary block to be removed from the published Portfile. The workflow notes that were embedded in the Portfile header now live in MacPorts/README.md as a release runbook. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 5b1bad0 commit fd42d30

2 files changed

Lines changed: 83 additions & 13 deletions

File tree

MacPorts/Portfile

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
22

3-
# LiveAudioServer — https://github.com/dsward2/LiveAudioServer
4-
#
5-
# Submission notes (for macports.org):
6-
# * Place this file at audio/liveaudioserver/Portfile in the macports-ports
7-
# tree.
8-
# * After tagging a release on GitHub (e.g. `git tag v0.1.0 && git push --tags`),
9-
# replace the rmd160/sha256/size placeholders below with the actual values
10-
# reported by `port checksum liveaudioserver`.
11-
# * The build invokes `swift build`, which relies on Xcode or the Command Line
12-
# Tools being installed on the user's machine. The Swift toolchain itself is
13-
# not a MacPorts dependency, matching how other Swift CLI ports
14-
# (e.g. swiftlint, swiftformat) ship today.
15-
163
PortSystem 1.0
174
PortGroup github 1.0
185

MacPorts/README.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# MacPorts packaging
2+
3+
This directory holds the canonical [MacPorts](https://www.macports.org)
4+
[Portfile](Portfile) for LiveAudioServer. The published port lives in
5+
[`macports/macports-ports`](https://github.com/macports/macports-ports) at
6+
`audio/liveaudioserver/Portfile`; the copy here is the source of truth that
7+
gets mirrored upstream at release time.
8+
9+
## Toolchain assumption
10+
11+
The build invokes `swift build`, which relies on Xcode or the Command Line
12+
Tools being installed on the user's machine. The Swift toolchain itself is
13+
not a MacPorts dependency, matching how other Swift CLI ports (e.g.
14+
`swiftlint`, `swiftformat`) ship today.
15+
16+
## Cutting a new release
17+
18+
1. Tag the upstream release on GitHub:
19+
```bash
20+
git tag v0.2.0 && git push --tags
21+
```
22+
2. Bump the version in [Portfile](Portfile) (`github.setup` line — the third
23+
field).
24+
3. Recompute the distfile checksums against the new tarball. Easiest path is
25+
to let MacPorts do it:
26+
```bash
27+
sudo /opt/local/bin/port clean liveaudioserver
28+
sudo /opt/local/bin/port -v checksum liveaudioserver
29+
```
30+
Or hash the tarball directly:
31+
```bash
32+
url="https://github.com/dsward2/LiveAudioServer/archive/refs/tags/v0.2.0.tar.gz"
33+
curl -sLo /tmp/las.tgz "$url"
34+
echo "size: $(wc -c < /tmp/las.tgz | tr -d ' ')"
35+
echo "sha256: $(shasum -a 256 /tmp/las.tgz | awk '{print $1}')"
36+
echo "rmd160: $(openssl dgst -rmd160 /tmp/las.tgz | awk '{print $NF}')"
37+
```
38+
4. Paste the three values into [Portfile](Portfile) replacing the previous
39+
release's checksums.
40+
5. Verify the port still builds end-to-end:
41+
```bash
42+
sudo /opt/local/bin/port -v install liveaudioserver
43+
/opt/local/bin/liveaudioserver --version
44+
sudo /opt/local/bin/port lint --nitpick liveaudioserver
45+
```
46+
47+
## Local-test setup (one-time)
48+
49+
To make `port` recognize this Portfile by name, register a local ports tree
50+
with MacPorts. The setup is described in detail in the project root README;
51+
the short version:
52+
53+
```bash
54+
mkdir -p ~/macports-local/audio/liveaudioserver
55+
ln -sf "$PWD/Portfile" ~/macports-local/audio/liveaudioserver/Portfile
56+
57+
# Add `file:///Users/<you>/macports-local` above the rsync line in
58+
# /opt/local/etc/macports/sources.conf, then:
59+
cd ~/macports-local && /opt/local/bin/portindex
60+
```
61+
62+
The symlink means edits in this directory flow into the local ports tree
63+
automatically — no re-copy needed when iterating.
64+
65+
## Submitting / updating the upstream port
66+
67+
The upstream copy at `macports/macports-ports` is a plain file, not a
68+
symlink. After updating [Portfile](Portfile) here:
69+
70+
```bash
71+
cd ~/macports-ports # your fork of macports/macports-ports
72+
git checkout -b liveaudioserver-0.2.0
73+
cp /path/to/LiveAudioServer/MacPorts/Portfile \
74+
audio/liveaudioserver/Portfile
75+
git add audio/liveaudioserver/Portfile
76+
git commit -m "liveaudioserver: update to 0.2.0"
77+
git push origin liveaudioserver-0.2.0
78+
gh pr create --repo macports/macports-ports \
79+
--base master \
80+
--title "liveaudioserver: update to 0.2.0"
81+
```
82+
83+
The macports-ports CI will re-run `port lint` and a sandboxed build on the PR.

0 commit comments

Comments
 (0)