Skip to content

Add Arch/Manjaro (pacman) bundling target#53

Open
thfaix wants to merge 3 commits into
doctly:mainfrom
thfaix:feat/arch-linux-pacman-bundling
Open

Add Arch/Manjaro (pacman) bundling target#53
thfaix wants to merge 3 commits into
doctly:mainfrom
thfaix:feat/arch-linux-pacman-bundling

Conversation

@thfaix

@thfaix thfaix commented May 23, 2026

Copy link
Copy Markdown

Summary

  • Adds pacman to the Linux electron-builder targets so the app can be packaged for Arch/Manjaro alongside AppImage and deb.
  • Declares Arch-native deps (gtk3, nss, libnotify, libxtst, libxss, xdg-utils, libsecret) so pacman -U can actually resolve — electron-builder's default deps shipped Debian-style names (http-parser, etc.) that don't exist in Arch repos.
  • Renames the pacman package to switchboard-doctly (with matching artifactName) to avoid a collision with extra/switchboard (elementary OS's Pantheon Control Center). The displayed app name stays "Switchboard" everywhere — only the package identity changes.
  • Ships hicolor-sized icons (16–512) so the launcher shows the app icon instead of a generic one. The previous single 472×472 PNG was installed at /usr/share/icons/hicolor/472x472/apps/, a non-standard size no desktop environment looks in.
  • CI: installs libarchive-tools on Ubuntu runners (provides bsdtar for fpm's pacman backend) and uploads dist/*.pacman with the other Linux artifacts.
  • README: documents the new target, the libxcrypt-compat requirement for building deb/pacman locally on Arch, and the package-name rationale.

Test plan

  • npm run build:linux on Manjaro produces dist/switchboard-doctly-0.0.30.pacman alongside AppImage + deb
  • bsdtar -xOf … .PKGINFO shows pkgname=switchboard-doctly, correct Arch deps, no http-parser
  • sudo pacman -U dist/switchboard-doctly-0.0.30.pacman installs cleanly (no unresolved deps, no name conflict)
  • Icons installed at standard hicolor paths (/usr/share/icons/hicolor/{16,32,48,64,128,256,512}/apps/switchboard.png); launcher displays the Switchboard icon
  • AppImage and deb targets still build (regression check)
  • CI run on this PR builds and uploads the .pacman artifact on the Linux job

Notes for reviewers

  • macOS .icns and Windows .ico build paths are untouched.
  • The new linux.icon: build/icons directory is committed; scripts/generate-icons.js regenerates it from build/icon.png if anyone re-runs npm run generate-icons.
  • Building deb or pacman locally on Arch requires libxcrypt-compat (the bundled fpm links against libcrypt.so.1 which Arch dropped). AppImage builds without it. Documented in the README's "Building on Arch / Manjaro" section.

thfaix added 3 commits May 24, 2026 00:18
Linux builds now produce a .pacman package alongside AppImage and deb,
installable via `sudo pacman -U`. CI installs libarchive-tools on the
Ubuntu runners (provides bsdtar, required by fpm's pacman backend) and
uploads dist/*.pacman with the other Linux artifacts.

README adds a Building on Arch / Manjaro note: building deb/pacman
locally on Arch requires libxcrypt-compat because the bundled fpm
links against libcrypt.so.1.
- pacman.depends: drop bogus deb-style defaults (http-parser etc.)
  and declare real Arch packages (gtk3, nss, libnotify, libxtst,
  libxss, xdg-utils, libsecret) so 'pacman -U' can resolve.

- pacman.packageName: rename to 'switchboard-doctly' to avoid
  conflict with extra/switchboard (Pantheon Control Center).

- linux.icon: point at build/icons/ so electron-builder installs
  PNGs at standard hicolor sizes (16-512). The single 472x472
  source was being installed at hicolor/472x472/apps/ which no
  desktop environment looks in, so the launcher fell back to a
  generic icon. generate-icons.js now also produces these sizes.
- pacman.artifactName: emit 'switchboard-doctly-<version>.pacman' so the
  released file matches the installed pkgname. Avoids confusion when users
  search release assets for the package they have installed.

- README: explain WHY the pacman package is renamed (collides with
  extra/switchboard, the Pantheon Control Center on elementary OS) and
  document the uninstall command 'sudo pacman -R switchboard-doctly'.

- scripts/generate-icons.js: hoist duplicate 'png2icons' and
  '@napi-rs/canvas' requires to the top. Node caches require(), so this
  was harmless duplication — just clearer this way.
@JeanBaptisteRenard

Copy link
Copy Markdown

+1 — clean separation between the Arch quirks and the existing deb/AppImage path. The hicolor icon set + CI artifact upload are nice housekeeping bonuses I'd want even on non-Arch builds. Tested-on note for AppImage/deb regressions in the PR body is reassuring. Not an Arch user myself but I'd merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants