mirror of
https://github.com/foss42/apidash.git
synced 2025-07-03 06:27:26 +08:00
Add ARM64 support
This commit is contained in:
53
.github/workflows/aur-publish.yml
vendored
53
.github/workflows/aur-publish.yml
vendored
@ -23,17 +23,22 @@ jobs:
|
|||||||
- name: Get checksums
|
- name: Get checksums
|
||||||
id: get_checksums
|
id: get_checksums
|
||||||
run: |
|
run: |
|
||||||
# Download the .deb file
|
# Download the x86_64 .deb
|
||||||
wget https://github.com/foss42/apidash/releases/download/v${{ steps.get_version.outputs.version }}/apidash-linux-amd64.deb
|
wget https://github.com/foss42/apidash/releases/download/v${{ steps.get_version.outputs.version }}/apidash-linux-amd64.deb
|
||||||
|
|
||||||
# Download the LICENSE file
|
# Download the arm64 .deb
|
||||||
|
wget https://github.com/foss42/apidash/releases/download/v${{ steps.get_version.outputs.version }}/apidash-linux-arm64.deb
|
||||||
|
|
||||||
|
# Download the LICENSE
|
||||||
wget https://raw.githubusercontent.com/foss42/apidash/main/LICENSE
|
wget https://raw.githubusercontent.com/foss42/apidash/main/LICENSE
|
||||||
|
|
||||||
# Generate SHA512 checksums
|
# Generate SHA512 checksums
|
||||||
DEB_CHECKSUM=$(sha512sum apidash-linux-amd64.deb | awk '{print $1}')
|
DEB_X86_64_CHECKSUM=$(sha512sum apidash-linux-amd64.deb | awk '{print $1}')
|
||||||
|
DEB_ARM64_CHECKSUM=$(sha512sum apidash-linux-arm64.deb | awk '{print $1}')
|
||||||
LICENSE_CHECKSUM=$(sha512sum LICENSE | awk '{print $1}')
|
LICENSE_CHECKSUM=$(sha512sum LICENSE | awk '{print $1}')
|
||||||
|
|
||||||
echo "deb_checksum=$DEB_CHECKSUM" >> $GITHUB_OUTPUT
|
echo "deb_x86_64_checksum=$DEB_X86_64_CHECKSUM" >> $GITHUB_OUTPUT
|
||||||
|
echo "deb_arm64_checksum=$DEB_ARM64_CHECKSUM" >> $GITHUB_OUTPUT
|
||||||
echo "license_checksum=$LICENSE_CHECKSUM" >> $GITHUB_OUTPUT
|
echo "license_checksum=$LICENSE_CHECKSUM" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Publish AUR package
|
- name: Publish AUR package
|
||||||
@ -47,29 +52,37 @@ jobs:
|
|||||||
pkgver=${{ steps.get_version.outputs.version }}
|
pkgver=${{ steps.get_version.outputs.version }}
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Beautiful open-source cross-platform API Client"
|
pkgdesc="Beautiful open-source cross-platform API Client"
|
||||||
arch=('x86_64')
|
arch=('x86_64' 'aarch64')
|
||||||
url="https://apidash.dev"
|
url="https://apidash.dev"
|
||||||
license=('Apache-2.0')
|
license=('Apache-2.0')
|
||||||
depends=()
|
depends=()
|
||||||
options=('!emptydirs' '!strip')
|
options=('!emptydirs' '!strip')
|
||||||
source=("https://github.com/foss42/apidash/releases/download/v${pkgver}/apidash-linux-amd64.deb"
|
source=("LICENSE::https://raw.githubusercontent.com/foss42/apidash/main/LICENSE")
|
||||||
'LICENSE')
|
source_x86_64=("apidash-linux-amd64.deb::https://github.com/foss42/apidash/releases/download/v${{ steps.get_version.outputs.version }}/apidash-linux-amd64.deb")
|
||||||
sha512sums=('${{ steps.get_checksums.outputs.deb_checksum }}'
|
source_aarch64=("apidash-linux-arm64.deb::https://github.com/foss42/apidash/releases/download/v${{ steps.get_version.outputs.version }}/apidash-linux-arm64.deb")
|
||||||
'${{ steps.get_checksums.outputs.license_checksum }}')
|
sha512sums=('${{ steps.get_checksums.outputs.license_checksum }}')
|
||||||
|
sha512sums_x86_64=('${{ steps.get_checksums.outputs.deb_x86_64_checksum }}')
|
||||||
|
sha512sums_aarch64=('${{ steps.get_checksums.outputs.deb_arm64_checksum }}')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
bsdtar -xf data.tar.zst -C "$pkgdir/"
|
if [ "$CARCH" = "x86_64" ]; then
|
||||||
|
_debfile="$srcdir/apidash-linux-amd64.deb"
|
||||||
# Fix permissions of directories.
|
elif [ "$CARCH" = "aarch64" ]; then
|
||||||
find "$pkgdir/" -type d -exec chmod 755 {} \;
|
_debfile="$srcdir/apidash-linux-arm64.deb"
|
||||||
|
fi
|
||||||
# Create a symlink inside the /usr/bin directory.
|
ar -x "${_debfile}" data.tar.zst
|
||||||
mkdir -p "${pkgdir}/usr/bin"
|
bsdtar -xf data.tar.zst -C "$pkgdir/"
|
||||||
ln -s /usr/share/apidash/apidash "$pkgdir/usr/bin/apidash"
|
|
||||||
|
# Fix permissions of directories
|
||||||
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/apidash/LICENSE
|
find "$pkgdir/" -type d -exec chmod 755 {} \;
|
||||||
|
|
||||||
|
# Create a symlink inside /usr/bin
|
||||||
|
mkdir -p "${pkgdir}/usr/bin"
|
||||||
|
ln -s /usr/share/apidash/apidash "$pkgdir/usr/bin/apidash"
|
||||||
|
|
||||||
|
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
}
|
}
|
||||||
commit_username: ${{ secrets.AUR_USERNAME }}
|
commit_username: ${{ secrets.AUR_USERNAME }}
|
||||||
commit_email: ${{ secrets.AUR_EMAIL }}
|
commit_email: ${{ secrets.AUR_EMAIL }}
|
||||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||||
commit_message: "Update to version ${{ steps.get_version.outputs.version }}"
|
commit_message: "Update to version ${{ steps.get_version.outputs.version }}"
|
Reference in New Issue
Block a user