feat: Add ARM64 (aarch64) support to AUR package
- Update PKGBUILD to support both x86_64 and aarch64 architectures - Use architecture-specific sources and checksums - Update AUR workflow to download and checksum both tarballs - Add smart wait logic for both release assets (max 10 minutes) - Homologize workflow naming for consistency - Package function now detects architecture and uses correct tarball AUR users on ARM64 devices (Raspberry Pi, etc.) can now install qbz-bin.
This commit is contained in:
1 parent
43ed44daf7
commit
25aa16cbff
3 files changed
+66
-18
No files matched your search
@@ -13,6 +13,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
update-aur:
|
update-aur:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: []
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -30,21 +31,57 @@ jobs:
|
|||||||
|
|
||||||
- name: Wait for release assets
|
- name: Wait for release assets
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
VERSION: ${{ steps.version.outputs.version }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
echo "Waiting 60s for release assets to be available..."
|
echo "Waiting for release assets to be available..."
|
||||||
sleep 60
|
MAX_WAIT=600
|
||||||
|
INTERVAL=30
|
||||||
|
ELAPSED=0
|
||||||
|
|
||||||
- name: Download release tarball and get checksum
|
while [ $ELAPSED -lt $MAX_WAIT ]; do
|
||||||
id: checksum
|
echo "Checking for release assets (${ELAPSED}s elapsed)..."
|
||||||
|
|
||||||
|
# Check if both tarballs exist
|
||||||
|
AMD64_EXISTS=$(curl -sI "https://github.com/vicrodh/qbz/releases/download/v${VERSION}/qbz_${VERSION}_amd64.tar.gz" | head -n 1 | grep -q "200 OK" && echo "true" || echo "false")
|
||||||
|
AARCH64_EXISTS=$(curl -sI "https://github.com/vicrodh/qbz/releases/download/v${VERSION}/qbz_${VERSION}_aarch64.tar.gz" | head -n 1 | grep -q "200 OK" && echo "true" || echo "false")
|
||||||
|
|
||||||
|
if [ "$AMD64_EXISTS" = "true" ] && [ "$AARCH64_EXISTS" = "true" ]; then
|
||||||
|
echo "Both release assets are available!"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Waiting for assets... (amd64: $AMD64_EXISTS, aarch64: $AARCH64_EXISTS)"
|
||||||
|
sleep $INTERVAL
|
||||||
|
ELAPSED=$((ELAPSED + INTERVAL))
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $ELAPSED -ge $MAX_WAIT ]; then
|
||||||
|
echo "Timeout waiting for release assets"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Download release tarballs and get checksums
|
||||||
|
id: checksums
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ steps.version.outputs.version }}
|
VERSION: ${{ steps.version.outputs.version }}
|
||||||
run: |
|
run: |
|
||||||
TARBALL_URL="https://github.com/vicrodh/qbz/releases/download/v${VERSION}/qbz_${VERSION}_amd64.tar.gz"
|
# Download x86_64 tarball
|
||||||
echo "Downloading: $TARBALL_URL"
|
AMD64_URL="https://github.com/vicrodh/qbz/releases/download/v${VERSION}/qbz_${VERSION}_amd64.tar.gz"
|
||||||
curl -fsSL -o /tmp/qbz.tar.gz "$TARBALL_URL"
|
echo "Downloading: $AMD64_URL"
|
||||||
SHA256=$(sha256sum /tmp/qbz.tar.gz | cut -d' ' -f1)
|
curl -fsSL -o /tmp/qbz_amd64.tar.gz "$AMD64_URL"
|
||||||
echo "sha256=$SHA256" >> "$GITHUB_OUTPUT"
|
SHA256_AMD64=$(sha256sum /tmp/qbz_amd64.tar.gz | cut -d' ' -f1)
|
||||||
echo "Checksum: $SHA256"
|
echo "sha256_amd64=$SHA256_AMD64" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "x86_64 Checksum: $SHA256_AMD64"
|
||||||
|
|
||||||
|
# Download aarch64 tarball
|
||||||
|
AARCH64_URL="https://github.com/vicrodh/qbz/releases/download/v${VERSION}/qbz_${VERSION}_aarch64.tar.gz"
|
||||||
|
echo "Downloading: $AARCH64_URL"
|
||||||
|
curl -fsSL -o /tmp/qbz_aarch64.tar.gz "$AARCH64_URL"
|
||||||
|
SHA256_AARCH64=$(sha256sum /tmp/qbz_aarch64.tar.gz | cut -d' ' -f1)
|
||||||
|
echo "sha256_aarch64=$SHA256_AARCH64" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "aarch64 Checksum: $SHA256_AARCH64"
|
||||||
|
|
||||||
- name: Setup SSH for AUR
|
- name: Setup SSH for AUR
|
||||||
env:
|
env:
|
||||||
@@ -65,7 +102,8 @@ jobs:
|
|||||||
- name: Update PKGBUILD
|
- name: Update PKGBUILD
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ steps.version.outputs.version }}
|
VERSION: ${{ steps.version.outputs.version }}
|
||||||
SHA256: ${{ steps.checksum.outputs.sha256 }}
|
SHA256_AMD64: ${{ steps.checksums.outputs.sha256_amd64 }}
|
||||||
|
SHA256_AARCH64: ${{ steps.checksums.outputs.sha256_aarch64 }}
|
||||||
run: |
|
run: |
|
||||||
cd /tmp/aur-qbz-bin
|
cd /tmp/aur-qbz-bin
|
||||||
|
|
||||||
@@ -78,9 +116,11 @@ jobs:
|
|||||||
# Reset pkgrel to 1 for new version
|
# Reset pkgrel to 1 for new version
|
||||||
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
|
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
|
||||||
|
|
||||||
# Update checksum
|
# Update checksums for both architectures
|
||||||
sed -i "s/^sha256sums=.*/sha256sums=('${SHA256}')/" PKGBUILD
|
sed -i "s/^sha256sums_x86_64=.*/sha256sums_x86_64=('${SHA256_AMD64}')/" PKGBUILD
|
||||||
|
sed -i "s/^sha256sums_aarch64=.*/sha256sums_aarch64=('${SHA256_AARCH64}')/" PKGBUILD
|
||||||
|
|
||||||
|
echo "=== Updated PKGBUILD ==="
|
||||||
cat PKGBUILD
|
cat PKGBUILD
|
||||||
|
|
||||||
- name: Generate .SRCINFO
|
- name: Generate .SRCINFO
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux-aarch64:
|
build-linux-aarch64:
|
||||||
name: Build Linux aarch64
|
name: Build Linux ARM64
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
+12
-4
@@ -3,7 +3,7 @@ pkgname=qbz-bin
|
|||||||
pkgver=1.0.0
|
pkgver=1.0.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Native Qobuz client for Linux with bit-perfect hi-res audio, DAC passthrough, Last.fm scrobbling, and Chromecast/DLNA casting"
|
pkgdesc="Native Qobuz client for Linux with bit-perfect hi-res audio, DAC passthrough, Last.fm scrobbling, and Chromecast/DLNA casting"
|
||||||
arch=('x86_64')
|
arch=('x86_64' 'aarch64')
|
||||||
url="https://github.com/vicrodh/qbz"
|
url="https://github.com/vicrodh/qbz"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('webkit2gtk-4.1' 'gtk3' 'alsa-lib' 'libappindicator-gtk3' 'libxkbcommon' 'openssl')
|
depends=('webkit2gtk-4.1' 'gtk3' 'alsa-lib' 'libappindicator-gtk3' 'libxkbcommon' 'openssl')
|
||||||
@@ -15,11 +15,19 @@ optdepends=(
|
|||||||
provides=('qbz')
|
provides=('qbz')
|
||||||
conflicts=('qbz')
|
conflicts=('qbz')
|
||||||
options=('!strip')
|
options=('!strip')
|
||||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/vicrodh/qbz/releases/download/v${pkgver}/qbz_${pkgver}_amd64.tar.gz")
|
source_x86_64=("${pkgname}-${pkgver}-x86_64.tar.gz::https://github.com/vicrodh/qbz/releases/download/v${pkgver}/qbz_${pkgver}_amd64.tar.gz")
|
||||||
sha256sums=('7803ee50d63b1759f6fbd2f62749b62990bf75bfd5ffe0709a9269dc3af0e254')
|
source_aarch64=("${pkgname}-${pkgver}-aarch64.tar.gz::https://github.com/vicrodh/qbz/releases/download/v${pkgver}/qbz_${pkgver}_aarch64.tar.gz")
|
||||||
|
sha256sums_x86_64=('SKIP')
|
||||||
|
sha256sums_aarch64=('SKIP')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "${srcdir}/qbz_${pkgver}_amd64"
|
if [ "$CARCH" = "x86_64" ]; then
|
||||||
|
_arch="amd64"
|
||||||
|
elif [ "$CARCH" = "aarch64" ]; then
|
||||||
|
_arch="aarch64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${srcdir}/qbz_${pkgver}_${_arch}"
|
||||||
|
|
||||||
# Install binary
|
# Install binary
|
||||||
install -Dm755 "qbz" "${pkgdir}/usr/bin/qbz"
|
install -Dm755 "qbz" "${pkgdir}/usr/bin/qbz"
|
||||||
|
|||||||
Reference in new issue
Block a user