Skip to content

Commit a1ecb1a

Browse files
leaanthonyclaude
andcommitted
feat: Add distribution-specific dependencies using nfpm overrides
Implements feature #4339 by enhancing the nfpm.yaml.tmpl to use nfpm's built-in overrides feature for different Linux distributions and package formats. ## Changes Made: ### Enhanced nfpm configuration with overrides: - **Default**: Debian 12/Ubuntu 22.04+ with WebKit 4.1 dependencies - Uses libgtk-3-dev, libwebkit2gtk-4.1-dev, build-essential, pkg-config - **RPM override**: RHEL/CentOS/AlmaLinux/Rocky Linux with WebKit 4.0 dependencies - Uses gtk3-devel, webkit2gtk3-devel, gcc-c++, pkg-config - **Arch override**: Arch Linux with WebKit 4.1 dependencies - Uses gtk3, webkit2gtk-4.1, base-devel, pkgconf This approach uses nfpm's native override system to automatically select the correct dependencies based on the target package format, ensuring that each distribution gets the appropriate WebKit version and package names. ### How it works: - DEB packages get WebKit 4.1 dependencies (default) - RPM packages get WebKit 4.0 dependencies (RHEL/CentOS compatibility) - Arch packages get WebKit 4.1 dependencies with Arch-specific package names Fixes #4339 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent fe29d14 commit a1ecb1a

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

v3/internal/commands/updatable_build_assets/linux/nfpm/nfpm.yaml.tmpl

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,30 @@ contents:
2424
- src: "./build/linux/{{.BinaryName}}.desktop"
2525
dst: "/usr/share/applications/{{.BinaryName}}.desktop"
2626

27+
# Default dependencies for Debian 12/Ubuntu 22.04+ with WebKit 4.1
2728
depends:
28-
- gtk3
29-
- libwebkit2gtk
29+
- libgtk-3-dev
30+
- libwebkit2gtk-4.1-dev
31+
- build-essential
32+
- pkg-config
33+
34+
# Distribution-specific overrides for different package formats and WebKit versions
35+
overrides:
36+
# RPM packages for RHEL/CentOS/AlmaLinux/Rocky Linux (WebKit 4.0)
37+
rpm:
38+
depends:
39+
- gtk3-devel
40+
- webkit2gtk3-devel
41+
- gcc-c++
42+
- pkg-config
43+
44+
# Arch Linux packages (WebKit 4.1)
45+
archlinux:
46+
depends:
47+
- gtk3
48+
- webkit2gtk-4.1
49+
- base-devel
50+
- pkgconf
3051

3152
# replaces:
3253
# - foobar

0 commit comments

Comments
 (0)