summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5c4b2ecab43674719f5d2e26aa8752169e1245e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Maintainer: VanillaGreen <ai1@vanillagreen.com>
pkgname=kendex-bin
# kendex 1.0.0 follows 5.0.1, so the version number goes backwards. pacman
# compares versions, and without an epoch it reads 1.0.0 as older than the
# 5.x a machine already holds and refuses the upgrade. Every kendex package
# carries the same epoch so the four stay comparable with each other.
epoch=1
pkgver=1.22.1
pkgrel=1
pkgdesc='Package manager for AI coding agents, skills, and hooks (prebuilt desktop app and CLI)'
arch=('x86_64' 'aarch64')
url='https://kendex.ai'
license=('MIT')
# kendex shells out to git to materialize a catalog, and 2.41 is the
# first that takes `--attr-source` — below it every install of a
# package from a git repository is refused.
depends=(
  'git>=2.41'
  # The released command links libdbus-1 directly, through the keyring
  # crate sync-secret-service backend, so the name is a runtime need here
  # rather than a build one.
  'dbus'
  # The released desktop app is an AppImage, which needs FUSE to mount.
  'fuse2'
  'hicolor-icon-theme'
  # The app makes itself the `kendex://` handler on first launch, through
  # `update-desktop-database` (desktop-file-utils) and `xdg-mime`
  # (xdg-utils). Without them on PATH a `kendex://` link opens a browser.
  'desktop-file-utils'
  'xdg-utils'
)
# The other three install the same `kendex` command and cannot be
# co-installed with this one. No `replaces`: every name here already exists
# under its own recipe, and a `replaces` would swap a person's chosen
# variant for another one during an ordinary system upgrade.
provides=('kendex')
conflicts=('kendex' 'kendex-git' 'kendex-cli-git')
options=('!strip')
# The icons and the license are the same files whatever the machine, so
# they are fetched once here rather than per architecture.
source=(
  "kendex-32.png::https://raw.githubusercontent.com/vanillagreencom/kendex/v$pkgver/crates/app/icons/32x32.png"
  "kendex.png::https://raw.githubusercontent.com/vanillagreencom/kendex/v$pkgver/crates/app/icons/128x128.png"
  "kendex-256.png::https://raw.githubusercontent.com/vanillagreencom/kendex/v$pkgver/crates/app/icons/128x128@2x.png"
  "kendex-512.png::https://raw.githubusercontent.com/vanillagreencom/kendex/v$pkgver/crates/app/icons/icon.png"
  "kendex-LICENSE-$pkgver::https://raw.githubusercontent.com/vanillagreencom/kendex/v$pkgver/LICENSE"
)
source_x86_64=(
  "kendex-app-$pkgver.AppImage::https://github.com/vanillagreencom/kendex/releases/download/v$pkgver/kendex_${pkgver}_amd64.AppImage"
  "kendex-$pkgver::https://github.com/vanillagreencom/kendex/releases/download/v$pkgver/kendex-x86_64-unknown-linux-gnu"
)
source_aarch64=(
  "kendex-app-$pkgver.AppImage::https://github.com/vanillagreencom/kendex/releases/download/v$pkgver/kendex_${pkgver}_aarch64.AppImage"
  "kendex-$pkgver::https://github.com/vanillagreencom/kendex/releases/download/v$pkgver/kendex-aarch64-unknown-linux-gnu"
)
sha256sums=(
  '7a07078ec5d8fc8cb941833864e7a89f8cafb4986bfa711a5ae01ad4196a4981'
  '52932bde27a1ca3307d170e581742d3100f4d3bf32445b949b5da62ca42a55b6'
  'c305a76e0637c8d087ec347a2c66940b1174a8c37f25ae5508398eaa3bcb87b4'
  '2515f6d5e2d311b18baffee276dd21ab58c45082b87573528763c39f969868b4'
  '1097d93034e32eaa55c2a08e73960a886a62394691f8c3456617336c458dfc36'
)
sha256sums_x86_64=(
  '34c056754aba8f26b02da698e702479055c0ef834675b6c3794a9354b66a8fb1'
  '297ac2c48f29b0e8db4e7590f050c659e7e865ddfb0cb15cd06357cab6fd7e63'
)
sha256sums_aarch64=(
  'acbfa8a74b29e769c050e48c9544286d5f7d2095cc95f05e6d25f408fe5f3b34'
  'fd5c5212b52d4fd1a7cd74934ff5a3d17e51517633212b03e1d7ee5522e00d49'
)

package() {
  # The desktop app stays off PATH so the `kendex` command is the CLI.
  # This entry has to match the one install.sh writes, field for field
  # apart from Exec — the same launcher reads whichever one is installed.
  install -Dm755 "$srcdir/kendex-app-$pkgver.AppImage" "$pkgdir/usr/lib/kendex/kendex.AppImage"
  install -Dm755 "$srcdir/kendex-$pkgver" "$pkgdir/usr/bin/kendex"
  install -Dm644 "$srcdir/kendex-32.png" "$pkgdir/usr/share/icons/hicolor/32x32/apps/kendex.png"
  install -Dm644 "$srcdir/kendex.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/kendex.png"
  install -Dm644 "$srcdir/kendex-256.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/kendex.png"
  install -Dm644 "$srcdir/kendex-512.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/kendex.png"
  install -Dm644 "$srcdir/kendex-LICENSE-$pkgver" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/kendex.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=kendex
Comment=Manage AI coding agents, skills, and hooks
Exec=/usr/lib/kendex/kendex.AppImage
Icon=kendex
StartupWMClass=kendex-app
Categories=Development;Utility;
Terminal=false
DESKTOP
}