Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/aur-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: AUR package check

# Builds and installs packaging/aur/agasthy-bin on real Arch Linux, the way an
# Omarchy or Manjaro user would with `yay -S agasthy-bin`, and checks that
# .SRCINFO matches the PKGBUILD (the AUR rejects pushes where it does not).

on:
pull_request:
paths:
- packaging/aur/**
- .github/workflows/aur-check.yml
workflow_dispatch:

jobs:
agasthy-bin:
name: agasthy-bin on Arch Linux
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Tools
run: pacman -Syu --noconfirm --needed base-devel git namcap
- uses: actions/checkout@v4
- name: Build and install as a normal user
run: |
useradd -m builder
echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builder
cp -r packaging/aur/agasthy-bin /home/builder/pkg
chown -R builder /home/builder/pkg
cd /home/builder/pkg
sudo -u builder makepkg -si --noconfirm
- name: .SRCINFO is current
working-directory: /home/builder/pkg
run: sudo -u builder makepkg --printsrcinfo | diff -u .SRCINFO -
- name: Installed and runs
run: |
agasthy --version
pacman -Ql agasthy-bin | grep -v '/$'
test -x /usr/bin/agasthy-desktop
test -f /usr/share/applications/AGASTHY.desktop
if ldd /usr/bin/agasthy-desktop | grep 'not found'; then exit 1; fi
- name: namcap
working-directory: /home/builder/pkg
run: |
namcap PKGBUILD
namcap agasthy-bin-*.pkg.tar.zst
37 changes: 37 additions & 0 deletions packaging/aur/agasthy-bin/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
pkgbase = agasthy-bin
pkgdesc = Maps a developer machine: repos, runtimes, packages, coding agents, MCP servers and what breaks if you remove something
pkgver = 0.1.10
pkgrel = 1
url = https://github.com/HMAKT99/Agasthy
arch = x86_64
arch = aarch64
license = Apache-2.0
depends = webkit2gtk-4.1
depends = gtk3
depends = libsoup3
depends = glib2
depends = cairo
depends = gdk-pixbuf2
depends = dbus
depends = libayatana-appindicator
depends = hicolor-icon-theme
depends = glibc
depends = libgcc
provides = agasthy
conflicts = agasthy
noextract = agasthy_0.1.10_amd64.deb
noextract = agasthy_0.1.10_arm64.deb
options = !strip
options = !debug
source = LICENSE-0.1.10::https://raw.githubusercontent.com/HMAKT99/Agasthy/v0.1.10/LICENSE
sha256sums = SKIP
source_x86_64 = https://github.com/HMAKT99/Agasthy/releases/download/v0.1.10/agasthy_0.1.10_amd64.deb
source_x86_64 = agasthy-cli-0.1.10-x86_64.tar.gz::https://github.com/HMAKT99/Agasthy/releases/download/v0.1.10/agasthy-cli-linux-x86_64.tar.gz
sha256sums_x86_64 = 9f38af58cd89f34e74aaefa3860cf9522148c4e833a7c9358bda0b964fdc8670
sha256sums_x86_64 = 44d6a7b8afa09c20b24e8fe3d2d04066ee5a198b7c30c794cef822a5d91c4d7c
source_aarch64 = https://github.com/HMAKT99/Agasthy/releases/download/v0.1.10/agasthy_0.1.10_arm64.deb
source_aarch64 = agasthy-cli-0.1.10-aarch64.tar.gz::https://github.com/HMAKT99/Agasthy/releases/download/v0.1.10/agasthy-cli-linux-aarch64.tar.gz
sha256sums_aarch64 = 741e835e5323f055bee9246267b52929d3fc048910a906face152d0a4c0fb40a
sha256sums_aarch64 = f11c73a3878656c2c4f799319ebc059d4e12c641b3a69d066d17a12cc4879880

pkgname = agasthy-bin
55 changes: 55 additions & 0 deletions packaging/aur/agasthy-bin/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Maintainer: Arun Kumar Thiagarajan (HMAKT99) <https://github.com/HMAKT99>
#
# Repackages the official release: the desktop app from the .deb and the
# `agasthy` command-line tool (CLI and read-only MCP server) from its tarball.
# Checksums are the ones published next to each release asset.

pkgname=agasthy-bin
pkgver=0.1.10
pkgrel=1
pkgdesc="Maps a developer machine: repos, runtimes, packages, coding agents, MCP servers and what breaks if you remove something"
arch=('x86_64' 'aarch64')
url="https://github.com/HMAKT99/Agasthy"
license=('Apache-2.0')
# libayatana-appindicator is loaded at run time for the tray icon, so namcap
# cannot see it.
depends=('webkit2gtk-4.1' 'gtk3' 'libsoup3' 'glib2' 'cairo' 'gdk-pixbuf2' 'dbus'
'libayatana-appindicator' 'hicolor-icon-theme' 'glibc' 'libgcc')
provides=('agasthy')
conflicts=('agasthy')
options=('!strip' '!debug')

_rel="https://github.com/HMAKT99/Agasthy/releases/download/v${pkgver}"
source=("LICENSE-${pkgver}::https://raw.githubusercontent.com/HMAKT99/Agasthy/v${pkgver}/LICENSE")
source_x86_64=("${_rel}/agasthy_${pkgver}_amd64.deb"
"agasthy-cli-${pkgver}-x86_64.tar.gz::${_rel}/agasthy-cli-linux-x86_64.tar.gz")
source_aarch64=("${_rel}/agasthy_${pkgver}_arm64.deb"
"agasthy-cli-${pkgver}-aarch64.tar.gz::${_rel}/agasthy-cli-linux-aarch64.tar.gz")
noextract=("agasthy_${pkgver}_amd64.deb" "agasthy_${pkgver}_arm64.deb")
sha256sums=('SKIP')
sha256sums_x86_64=('9f38af58cd89f34e74aaefa3860cf9522148c4e833a7c9358bda0b964fdc8670'
'44d6a7b8afa09c20b24e8fe3d2d04066ee5a198b7c30c794cef822a5d91c4d7c')
sha256sums_aarch64=('741e835e5323f055bee9246267b52929d3fc048910a906face152d0a4c0fb40a'
'f11c73a3878656c2c4f799319ebc059d4e12c641b3a69d066d17a12cc4879880')

prepare() {
local _deb
case "$CARCH" in
x86_64) _deb="agasthy_${pkgver}_amd64.deb" ;;
aarch64) _deb="agasthy_${pkgver}_arm64.deb" ;;
esac
rm -rf deb && mkdir deb
bsdtar -xf "$_deb" -C deb data.tar.gz
bsdtar -xf deb/data.tar.gz -C deb
}

package() {
install -Dm755 deb/usr/bin/agasthy-desktop "$pkgdir/usr/bin/agasthy-desktop"
install -Dm644 deb/usr/share/applications/AGASTHY.desktop "$pkgdir/usr/share/applications/AGASTHY.desktop"
local _icon
for _icon in deb/usr/share/icons/hicolor/*/apps/agasthy-desktop.png; do
install -Dm644 "$_icon" "$pkgdir/${_icon#deb/}"
done
install -Dm755 agasthy "$pkgdir/usr/bin/agasthy"
install -Dm644 "LICENSE-${pkgver}" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
42 changes: 42 additions & 0 deletions packaging/aur/agasthy-bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# agasthy-bin (AUR)

The Arch User Repository package for Arch-based systems (Omarchy, Manjaro, EndeavourOS). Once it is published, users install it with:

```sh
yay -S agasthy-bin # or: paru -S agasthy-bin
```

It installs the official release binaries, so nothing is compiled on the user's machine:
- the desktop app (`agasthy-desktop`, with its menu entry and icons), taken from the release `.deb`;
- the `agasthy` command-line tool and read-only MCP server, taken from the release CLI tarball.

It works on x86_64 and aarch64. CI (`.github/workflows/aur-check.yml`) builds and installs it on Arch Linux whenever this folder changes.

## Publishing (first time)

1. Create an account on https://aur.archlinux.org and add your SSH public key in *My Account*.
2. Run these commands:

```sh
git clone ssh://aur@aur.archlinux.org/agasthy-bin.git aur-agasthy-bin
cp PKGBUILD .SRCINFO aur-agasthy-bin/
cd aur-agasthy-bin
git add PKGBUILD .SRCINFO
git commit -m "agasthy-bin 0.1.10"
git push
```

The AUR repository must contain only `PKGBUILD` and `.SRCINFO`, so this README stays here.

## Updating for a new release

1. In `PKGBUILD`, set `pkgver` to the new version and reset `pkgrel=1`.
2. Replace the four `sha256sums_*` values with the ones from the release's `.sha256` files:
```sh
v=0.1.11
for f in agasthy_${v}_amd64.deb agasthy-cli-linux-x86_64.tar.gz agasthy_${v}_arm64.deb agasthy-cli-linux-aarch64.tar.gz; do
curl -fsSL "https://github.com/HMAKT99/Agasthy/releases/download/v$v/$f.sha256"
done
```
3. Regenerate `.SRCINFO` on an Arch system: `makepkg --printsrcinfo > .SRCINFO`. Otherwise edit the version and checksums in it by hand; CI fails if it doesn't match.
4. Open a PR here. Once CI passes, push both files to the AUR as described above.
Loading