Files
nfpm/www/content/docs/arch-mapping.md
Dj GilcreaseandClaude Fable 5.2 410234f7ef feat(macos): add app, dmg and pkg packagers
Three packagers for macOS, built in pure Go on any platform:

- pkg: an installer package (.pkg) from contents and the preinstall and
  postinstall scripts, as a product archive that declares its
  architecture.
- app: an application bundle delivered as a zip (.app.zip), with a
  generated Info.plist.
- dmg: the same bundle in a disk image (.dmg) next to a link to the
  Applications folder.

app and dmg share the new "app" settings; pkg has its own. All three
take name, version, arch and contents from the shared fields, can be
signed with a PKCS#12 identity, and report the shared settings macOS has
no place for instead of dropping them silently.

Refs #535, #536.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 11:35:17 -08:00

177 lines
4.2 KiB
Markdown

---
title: Architecture Mapping
weight: 5
---
nFPM was branched out of [GoReleaser](https://goreleaser.com), so some of it
lean towards "the Go way" (whatever that means).
GoReleaser passes a string joining `GOARCH`, `GOARM`, etc as the package
architecture, and nFPM converts to the correct one for each packager.
nFPM also accepts common architecture names from `uname -m` (like `x86_64` and
`aarch64`) and translates them to the correct value for each packager.
Below is a list of the current conversions that are made.
Please, feel free to open an issue if you see anything wrong, or if you know the
correct value of some missing architecture.
Thank you!
---
{{< tabs items="Deb,RPM,APK,Arch Linux,IPK,MSI,MSIX,macOS" >}}
{{< tab >}}
| Input | Value |
| :--------: | :--------: |
| `amd64` | `amd64` |
| `x86_64` | `amd64` |
| `386` | `i386` |
| `arm64` | `arm64` |
| `aarch64` | `arm64` |
| `arm5` | `armel` |
| `arm6` | `armhf` |
| `arm7` | `armhf` |
| `mips` | `mips` |
| `mipsle` | `mipsel` |
| `mips64le` | `mips64el` |
| `ppc64le` | `ppc64el` |
| `s390` | `s390x` |
| `riscv64` | `riscv64` |
{{< /tab >}}
{{< tab >}}
| Input | Value |
| :--------: | :-----------: |
| `amd64` | `x86_64` |
| `386` | `i386` |
| `arm64` | `aarch64` |
| `arm5` | `armv5tel` |
| `arm6` | `armv6hl` |
| `arm7` | `armv7hl` |
| `mips` | `mips` |
| `mipsle` | `mipsel` |
| `mips64le` | `mips64el` |
| `loong64` | `loongarch64` |
| `riscv64` | `riscv64` |
{{< /tab >}}
{{< tab >}}
| Input | Value |
| :-------: | :-----------: |
| `amd64` | `x86_64` |
| `x86_64` | `x86_64` |
| `386` | `x86` |
| `i386` | `x86` |
| `i686` | `x86` |
| `arm64` | `aarch64` |
| `aarch64` | `aarch64` |
| `arm6` | `armhf` |
| `arm7` | `armv7` |
| `ppc64le` | `ppc64le` |
| `s390` | `s390x` |
| `loong64` | `loongarch64` |
| `riscv64` | `riscv64` |
{{< /tab >}}
{{< tab >}}
| Input | Value |
| :-------: | :-------: |
| `amd64` | `x86_64` |
| `x86_64` | `x86_64` |
| `386` | `i686` |
| `i386` | `i686` |
| `arm64` | `aarch64` |
| `aarch64` | `aarch64` |
| `arm5` | `arm` |
| `arm6` | `armv6h` |
| `arm7` | `armv7h` |
| `riscv64` | `riscv64` |
{{< /tab >}}
{{< tab >}}
| Input | Value |
| :--------: | :---------------: |
| `amd64` | `x86_64` |
| `x86_64` | `x86_64` |
| `386` | `i386` |
| `i386` | `i386` |
| `arm64` | `arm64` |
| `aarch64` | `arm64` |
| `arm5` | `armel` |
| `arm6` | `armhf` |
| `arm7` | `armhf` |
| `mipsle` | `mipsel` |
| `mips64le` | `mips64el` |
| `ppc64le` | `ppc64el` |
| `s390` | `s390x` |
| `riscv64` | `riscv64_generic` |
{{< /tab >}}
{{< tab >}}
Windows Installer targets exactly five architectures; any other input is an
error. `intel64` is Itanium, not x86-64.
| Input | Value |
| :-------: | :-------: |
| `amd64` | `x64` |
| `x86_64` | `x64` |
| `386` | `x86` |
| `i386` | `x86` |
| `i686` | `x86` |
| `arm64` | `arm64` |
| `aarch64` | `arm64` |
| `arm` | `arm` |
| `arm7` | `arm` |
| `ia64` | `intel64` |
{{< /tab >}}
{{< tab >}}
| Input | Value |
| :-------: | :-------: |
| `amd64` | `x64` |
| `x86_64` | `x64` |
| `386` | `x86` |
| `i386` | `x86` |
| `i686` | `x86` |
| `arm64` | `arm64` |
| `aarch64` | `arm64` |
| `arm` | `arm` |
| `arm7` | `arm` |
| `all` | `neutral` |
{{< /tab >}}
{{< tab >}}
The `app`, `dmg` and `pkg` packagers share this mapping. macOS runs on two
architectures; any other input is an error. A `universal` package supports
both.
| Input | Value |
| :---------: | :---------: |
| `amd64` | `x86_64` |
| `x86_64` | `x86_64` |
| `arm64` | `arm64` |
| `aarch64` | `arm64` |
| `all` | `universal` |
| `universal` | `universal` |
{{< /tab >}}
{{< /tabs >}}