summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 85cef40abad7a5de25911944dacf602271da528e (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
# Maintainer: Yubo Cao <cao2006721@gmail.com>

pkgname=parallel-code-bin
_pkgname='Parallel Code'
pkgver=1.10.0
pkgrel=1
pkgdesc='Dispatch AI coding agents in parallel, each in its own git worktree (Claude Code, Codex, Gemini, ...)'
arch=('x86_64')
url='https://github.com/johannesjo/parallel-code'
license=('MIT')
depends=('gtk3' 'libnotify' 'nss' 'libxss' 'libxtst' 'xdg-utils' 'at-spi2-core' 'util-linux-libs' 'libsecret')
optdepends=('libappindicator-gtk3: tray icon support')
provides=('parallel-code')
conflicts=('parallel-code')
options=('!strip' '!debug')
source=("https://github.com/johannesjo/parallel-code/releases/download/v${pkgver}/parallel-code_${pkgver}_amd64.deb")
sha256sums=('8db5c07d306aa9bbd5fa6f4d9573c691c85b010db596c3b71307d3a33b03e787')

package() {
    # The .deb is an `ar` archive containing data.tar.xz; unpack the payload
    # straight into $pkgdir. bsdtar reads the ar member transparently.
    bsdtar -xf "parallel-code_${pkgver}_amd64.deb" -C "$srcdir" data.tar.xz
    bsdtar -xf "$srcdir/data.tar.xz" -C "$pkgdir"

    # Provide a launcher on PATH
    install -dm755 "$pkgdir/usr/bin"
    ln -s "/opt/$_pkgname/parallel-code" "$pkgdir/usr/bin/parallel-code"

    # Fix permissions (electron sandbox helper needs setuid)
    chmod 4755 "$pkgdir/opt/$_pkgname/chrome-sandbox" 2>/dev/null || true

    # Ship the MIT license
    install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
    if [ -f "$pkgdir/opt/$_pkgname/LICENSE.electron.txt" ]; then
        install -Dm644 "$pkgdir/opt/$_pkgname/LICENSE.electron.txt" \
            "$pkgdir/usr/share/licenses/$pkgname/LICENSE.electron.txt"
    fi
}