Skip to content

Latest commit

 

History

History
138 lines (98 loc) · 3.38 KB

File metadata and controls

138 lines (98 loc) · 3.38 KB

Packaging OpenCarStream

Python CLI

Install from the repo:

python3 -m pip install .
opencarstream serve --port 33333 --config-dir ./config

The legacy entry point still works:

python3 server.py

Release Artifacts

Build the CLI package, menu-bar app DMG, and refresh cask SHA values:

scripts/build_release_artifacts.sh 0.1.0

Artifacts are written to dist/:

OpenCarStreamCLI-0.1.0.pkg
OpenCarStream-0.1.0.dmg

For local development, the app build is ad-hoc signed and the cask removes Homebrew's quarantine attribute after installation. For public distribution, use a Developer ID Application certificate and notarize the DMG:

export OPENCARSTREAM_SIGN_IDENTITY="Developer ID Application: Your Name (TEAMID)"
export OPENCARSTREAM_NOTARY_PROFILE="opencarstream-notary"
scripts/build_macos_app.sh 0.1.0
scripts/update_cask_shas.sh 0.1.0

Create the notary profile once with:

xcrun notarytool store-credentials opencarstream-notary \
  --apple-id "you@example.com" \
  --team-id "TEAMID" \
  --password "app-specific-password"

After notarization is working, remove the temporary quarantine-removal postflight block from Casks/opencarstream.rb.

Upload both files to the matching GitHub release:

https://github.com/trinityhades/opencarstream/releases/tag/v0.1.0

Homebrew Formula

The tap formula lives at Formula/opencarstream.rb.

Before publishing:

  1. Create and push a release tag, for example v0.1.0.
  2. Download the source tarball and calculate its SHA:
curl -L -o opencarstream-0.1.0.tar.gz \
  https://github.com/trinityhades/opencarstream/archive/refs/tags/v0.1.0.tar.gz
shasum -a 256 opencarstream-0.1.0.tar.gz
  1. Update Formula/opencarstream.rb if the source tarball SHA changed.
  2. Put the formula in the tap repo, usually homebrew-opencarstream.

Local test:

brew reinstall --build-from-source --formula trinityhades/opencarstream/opencarstream
/opt/homebrew/opt/opencarstream/bin/opencarstream serve --port 33333

The formula installs FFmpeg, Node, yt-dlp, the Python CLI, and OGV.js runtime assets. It also defines a brew services service:

brew services start opencarstream
brew services stop opencarstream

Homebrew Casks

The casks live in Casks/:

Casks/opencarstream-cli.rb
Casks/opencarstream.rb

opencarstream-cli installs the packaged command-line server. opencarstream installs the menu-bar app and depends on the CLI cask.

Prepare a sibling tap repo:

scripts/prepare_homebrew_tap.sh ../homebrew-opencarstream

Users install with:

brew tap trinityhades/opencarstream
brew trust trinityhades/opencarstream
brew install --cask opencarstream-cli
brew install --cask opencarstream

The tap also includes a formula:

brew install --formula trinityhades/opencarstream/opencarstream

Prefer the casks for end users. The formula is useful for source-style Homebrew installs and brew services, but it uses the same opencarstream command name as the CLI cask. If both are installed, Homebrew may report that one binary is shadowing the other.

macOS Menu-Bar App

The Swift source and bundle metadata live in macos/OpenCarStreamMenuBar/. The app starts/stops the CLI server, opens the dashboard, exposes basic settings, writes logs under the configured app support directory, and stays in the menu bar through LSUIElement.