Build LM Studio for aarch64 (#885)
Co-authored-by: Jim Martin <jimmartin@gmail.com>
This commit is contained in:
1 parent
ae5eac6532
commit
2684cc04c7
1 file changed
+20
-8
@@ -1,11 +1,11 @@
|
||||
# Maintainer: noureddinex
|
||||
pkgname=lmstudio-bin
|
||||
pkgver=0.4.25
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
_build=1
|
||||
_pkgver=${pkgver}-${_build}
|
||||
pkgdesc="LM Studio - A desktop app for exploring and running large language models locally"
|
||||
arch=('x86_64')
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://lmstudio.ai"
|
||||
license=('EULA')
|
||||
depends=('fuse2' 'zlib' 'hicolor-icon-theme' 'gtk3' 'nss' 'libxcrypt-compat')
|
||||
@@ -13,13 +13,25 @@ options=('!strip')
|
||||
install=lmstudio-bin.install
|
||||
provides=(lmstudio)
|
||||
conflicts=(lmstudio)
|
||||
source=("https://installers.lmstudio.ai/linux/x64/${_pkgver}/LM-Studio-${_pkgver}-x64.AppImage"
|
||||
"lmstudio.png"
|
||||
"lmstudio.desktop")
|
||||
sha256sums=('eca467446c833824697e8befab300fe5269fdf984e3ee4385fcbad8502f07c53' '9f791789c959a11316328692807737a5f1bc1c170ae99ec04c56bfd8ee8263e5' '16b67b6cd672a05b9a0e012c8b9a91187ceda8f85b3391db471298c54e002bcd')
|
||||
source=("lmstudio.png"
|
||||
"lmstudio.desktop")
|
||||
source_x86_64=("https://installers.lmstudio.ai/linux/x64/${_pkgver}/LM-Studio-${_pkgver}-x64.AppImage")
|
||||
source_aarch64=("https://installers.lmstudio.ai/linux/arm64/${_pkgver}/LM-Studio-${_pkgver}-arm64.AppImage")
|
||||
sha256sums=('9f791789c959a11316328692807737a5f1bc1c170ae99ec04c56bfd8ee8263e5' '16b67b6cd672a05b9a0e012c8b9a91187ceda8f85b3391db471298c54e002bcd')
|
||||
sha256sums_x86_64=('eca467446c833824697e8befab300fe5269fdf984e3ee4385fcbad8502f07c53')
|
||||
sha256sums_aarch64=('e3ef32a37656e7e4e5cdadf52e72fa929d5f26eb6007be1666c76e4fdba8e084')
|
||||
|
||||
# LM Studio names its AppImages by a vendor architecture suffix. Resolve it in the
|
||||
# functions so sourcing the PKGBUILD without CARCH still reads the version.
|
||||
_appimage() {
|
||||
case "$CARCH" in
|
||||
x86_64) echo "LM-Studio-${_pkgver}-x64.AppImage" ;;
|
||||
aarch64) echo "LM-Studio-${_pkgver}-arm64.AppImage" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
prepare() {
|
||||
chmod +x "${srcdir}/${source[0]##*/}"
|
||||
chmod +x "${srcdir}/$(_appimage)"
|
||||
}
|
||||
|
||||
package() {
|
||||
@@ -27,7 +39,7 @@ package() {
|
||||
install -dm755 "$pkgdir/opt/lm-studio"
|
||||
|
||||
# Install AppImage
|
||||
install -Dm755 "${srcdir}/${source[0]##*/}" "$pkgdir/opt/lm-studio/lm-studio.AppImage"
|
||||
install -Dm755 "${srcdir}/$(_appimage)" "$pkgdir/opt/lm-studio/lm-studio.AppImage"
|
||||
|
||||
# Install static icon
|
||||
install -Dm644 "${srcdir}/lmstudio.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/lmstudio-bin.png"
|
||||
|
||||
Reference in new issue
Block a user