Skip to content

Commit 0c93043

Browse files
committed
📦 Add AUR package for Arch Linux installation
Introduce an Arch User Repository package for Arch Linux users: - Create PKGBUILD with binary downloads for x86_64 and aarch64 - Add .SRCINFO metadata for AUR compatibility - Include update-aur.sh script to automate version bumps and SHA256 checksum calculation from GitHub releases - Exclude aur/ directory from crate package to reduce download size The package uses pre-built binaries from GitHub releases, avoiding the need for Rust compilation on end-user systems.
1 parent bda1718 commit 0c93043

File tree

4 files changed

+127
-0
lines changed

4 files changed

+127
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ exclude = [
1414
"docs/",
1515
"docker/",
1616
"homebrew/",
17+
"aur/",
1718
".github/",
1819
"*.md",
1920
"!README.md",

aur/.SRCINFO

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pkgbase = git-iris-bin
2+
pkgdesc = An intelligent agent that understands your code and crafts perfect Git artifacts
3+
pkgver = 2.0.0
4+
pkgrel = 1
5+
url = https://github.com/hyperb1iss/git-iris
6+
arch = x86_64
7+
arch = aarch64
8+
license = Apache-2.0
9+
provides = git-iris
10+
conflicts = git-iris
11+
depends = gcc-libs
12+
depends = openssl
13+
source_x86_64 = git-iris-bin-2.0.0-x86_64::https://github.com/hyperb1iss/git-iris/releases/download/v2.0.0/git-iris-linux-amd64
14+
source_aarch64 = git-iris-bin-2.0.0-aarch64::https://github.com/hyperb1iss/git-iris/releases/download/v2.0.0/git-iris-linux-arm64
15+
sha256sums_x86_64 = SKIP
16+
sha256sums_aarch64 = SKIP
17+
18+
pkgname = git-iris-bin

aur/PKGBUILD

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Maintainer: Stefanie Jane <[email protected]>
2+
pkgname=git-iris-bin
3+
pkgver=2.0.0
4+
pkgrel=1
5+
pkgdesc="An intelligent agent that understands your code and crafts perfect Git artifacts"
6+
arch=('x86_64' 'aarch64')
7+
url="https://github.com/hyperb1iss/git-iris"
8+
license=('Apache-2.0')
9+
provides=('git-iris')
10+
conflicts=('git-iris')
11+
depends=('gcc-libs' 'openssl')
12+
13+
source_x86_64=("${pkgname}-${pkgver}-x86_64::https://github.com/hyperb1iss/git-iris/releases/download/v${pkgver}/git-iris-linux-amd64")
14+
source_aarch64=("${pkgname}-${pkgver}-aarch64::https://github.com/hyperb1iss/git-iris/releases/download/v${pkgver}/git-iris-linux-arm64")
15+
16+
sha256sums_x86_64=('SKIP')
17+
sha256sums_aarch64=('SKIP')
18+
19+
package() {
20+
install -Dm755 "${srcdir}/${pkgname}-${pkgver}-${CARCH}" "${pkgdir}/usr/bin/git-iris"
21+
}

aur/update-aur.sh

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#!/bin/bash
2+
# Update AUR package for a new release
3+
# Usage: ./update-aur.sh v2.0.0
4+
5+
set -e
6+
7+
VERSION="${1:-$(gh release view --repo hyperb1iss/git-iris --json tagName -q .tagName 2>/dev/null)}"
8+
if [ -z "$VERSION" ]; then
9+
echo "Usage: $0 <version>"
10+
echo "Example: $0 v2.0.0"
11+
exit 1
12+
fi
13+
14+
VERSION_NUM="${VERSION#v}"
15+
REPO="hyperb1iss/git-iris"
16+
17+
echo "Updating AUR package to ${VERSION}..."
18+
19+
# Calculate SHA256 checksums
20+
echo "Calculating checksums..."
21+
SHA_X86_64=$(curl -fsSL "https://github.com/${REPO}/releases/download/${VERSION}/git-iris-linux-amd64" | sha256sum | cut -d' ' -f1)
22+
SHA_AARCH64=$(curl -fsSL "https://github.com/${REPO}/releases/download/${VERSION}/git-iris-linux-arm64" | sha256sum | cut -d' ' -f1)
23+
24+
echo " x86_64: ${SHA_X86_64}"
25+
echo " aarch64: ${SHA_AARCH64}"
26+
27+
# Update PKGBUILD
28+
cat > PKGBUILD << EOF
29+
# Maintainer: Stefanie Jane <[email protected]>
30+
pkgname=git-iris-bin
31+
pkgver=${VERSION_NUM}
32+
pkgrel=1
33+
pkgdesc="An intelligent agent that understands your code and crafts perfect Git artifacts"
34+
arch=('x86_64' 'aarch64')
35+
url="https://github.com/hyperb1iss/git-iris"
36+
license=('Apache-2.0')
37+
provides=('git-iris')
38+
conflicts=('git-iris')
39+
depends=('gcc-libs' 'openssl')
40+
41+
source_x86_64=("\${pkgname}-\${pkgver}-x86_64::https://github.com/hyperb1iss/git-iris/releases/download/v\${pkgver}/git-iris-linux-amd64")
42+
source_aarch64=("\${pkgname}-\${pkgver}-aarch64::https://github.com/hyperb1iss/git-iris/releases/download/v\${pkgver}/git-iris-linux-arm64")
43+
44+
sha256sums_x86_64=('${SHA_X86_64}')
45+
sha256sums_aarch64=('${SHA_AARCH64}')
46+
47+
package() {
48+
install -Dm755 "\${srcdir}/\${pkgname}-\${pkgver}-\${CARCH}" "\${pkgdir}/usr/bin/git-iris"
49+
}
50+
EOF
51+
52+
# Update .SRCINFO
53+
cat > .SRCINFO << EOF
54+
pkgbase = git-iris-bin
55+
pkgdesc = An intelligent agent that understands your code and crafts perfect Git artifacts
56+
pkgver = ${VERSION_NUM}
57+
pkgrel = 1
58+
url = https://github.com/hyperb1iss/git-iris
59+
arch = x86_64
60+
arch = aarch64
61+
license = Apache-2.0
62+
provides = git-iris
63+
conflicts = git-iris
64+
depends = gcc-libs
65+
depends = openssl
66+
source_x86_64 = git-iris-bin-${VERSION_NUM}-x86_64::https://github.com/hyperb1iss/git-iris/releases/download/v${VERSION_NUM}/git-iris-linux-amd64
67+
source_aarch64 = git-iris-bin-${VERSION_NUM}-aarch64::https://github.com/hyperb1iss/git-iris/releases/download/v${VERSION_NUM}/git-iris-linux-arm64
68+
sha256sums_x86_64 = ${SHA_X86_64}
69+
sha256sums_aarch64 = ${SHA_AARCH64}
70+
71+
pkgname = git-iris-bin
72+
EOF
73+
74+
echo ""
75+
echo "Updated PKGBUILD and .SRCINFO for ${VERSION}"
76+
echo ""
77+
echo "Next steps:"
78+
echo " 1. Clone the AUR repo (first time only):"
79+
echo " git clone ssh://[email protected]/git-iris-bin.git ~/dev/aur-git-iris"
80+
echo ""
81+
echo " 2. Copy files and push:"
82+
echo " cp PKGBUILD .SRCINFO ~/dev/aur-git-iris/"
83+
echo " cd ~/dev/aur-git-iris"
84+
echo " git add PKGBUILD .SRCINFO"
85+
echo " git commit -m \"Update to ${VERSION_NUM}\""
86+
echo " git push"
87+
echo ""

0 commit comments

Comments
 (0)