add Ledger Live

This commit is contained in:
Anders Rytter Hansen 2023-11-07 09:14:12 +01:00
commit 2eaecf94f6
9 changed files with 283 additions and 0 deletions

View file

@ -0,0 +1,19 @@
FROM ghcr.io/andersrh/containers/cachyos/base-gui:main
WORKDIR /app
COPY containers/cachyos/ledgerlive/ledger-live-bin /app/ledger-live-bin
COPY containers/cachyos/ledgerlive/ledger-udev /app/ledger-udev
RUN chown -R build /app
USER build
RUN cd ledger-udev \
&& makepkg -si --noconfirm
RUN cd ledger-live-bin \
&& makepkg -si --noconfirm \
&& rm -rf /app/*
USER root

View file

@ -0,0 +1,17 @@
pkgbase = ledger-live-bin
pkgdesc = Maintain your Ledger devices
pkgver = 2.69.0
pkgrel = 1
url = https://www.ledger.com/ledger-live
arch = x86_64
license = MIT
depends = ledger-udev
provides = ledger-live
conflicts = ledger-live
options = !strip
source = ledger-live-desktop-2.69.0-linux-x86_64.AppImage::https://download.live.ledger.com/ledger-live-desktop-2.69.0-linux-x86_64.AppImage
source = LICENSE::https://raw.githubusercontent.com/LedgerHQ/ledger-live/%40ledgerhq/live-desktop%402.69.0/apps/ledger-live-desktop/LICENSE
sha512sums = 914a783be7f542113362d7ae45d6d27973447e3f2d04771dd3dc8167f69abebb3a2753e8db7cef6584ff94cc2d65876b2e7c57904024e4415688025274240b40
sha512sums = 915edd51fe7732af57f5a4ca8f4c61c4f435de6357e34ed0733cac8d950d80b3a9e513deac0a3672a07f38ff871a57032a221b3aa27edae8e42cc00586fe3318
pkgname = ledger-live-bin

View file

@ -0,0 +1,58 @@
# Maintainer: Serge K <arch@phnx47.net>
# Contributor: Stephen Argent <steve [at] tuxcon [dot] com>
# For Issues, Pull Requests
# https://github.com/phnx47/pkgbuilds
_pkgbin=ledger-live-desktop
_pkgname=ledger-live
pkgname="${_pkgname}-bin"
pkgdesc='Maintain your Ledger devices'
license=('MIT')
url='https://www.ledger.com/ledger-live'
pkgver=2.69.0
pkgrel=1
arch=('x86_64')
depends=('ledger-udev')
options=(!strip)
provides=("${_pkgname}")
conflicts=("${_pkgname}")
_appimg="ledger-live-desktop-${pkgver}-linux-${arch[0]}.AppImage"
source=("${_appimg}::https://download.live.ledger.com/${_appimg}"
"LICENSE::https://raw.githubusercontent.com/LedgerHQ/ledger-live/%40ledgerhq/live-desktop%40${pkgver}/apps/ledger-live-desktop/LICENSE")
sha512sums=('914a783be7f542113362d7ae45d6d27973447e3f2d04771dd3dc8167f69abebb3a2753e8db7cef6584ff94cc2d65876b2e7c57904024e4415688025274240b40'
'915edd51fe7732af57f5a4ca8f4c61c4f435de6357e34ed0733cac8d950d80b3a9e513deac0a3672a07f38ff871a57032a221b3aa27edae8e42cc00586fe3318')
prepare() {
# Extract files
chmod +x "${_appimg}"
"./${_appimg}" --appimage-extract
cd squashfs-root
# Correct .desktop
sed -e "s/AppRun --no-sandbox/${_pkgbin}/g" -i "${_pkgbin}.desktop"
sed -e "/X-AppImage-Version/d" -i "${_pkgbin}.desktop"
# Remove unnecessary files
rm "AppRun" "resources/app-update.yml"
}
package() {
install -d "${pkgdir}/opt/${_pkgname}"
cp -a "squashfs-root/." "${pkgdir}/opt/${_pkgname}/"
install -d "${pkgdir}/usr/bin"
ln -s "/opt/${_pkgname}/${_pkgbin}" "${pkgdir}/usr/bin/${_pkgbin}"
install -d "${pkgdir}/usr/share/applications"
ln -s "/opt/${_pkgname}/${_pkgbin}.desktop" "${pkgdir}/usr/share/applications/${_pkgbin}.desktop"
for i in 128 256 512 1024; do
install -d "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps"
ln -s "/opt/${_pkgname}/usr/share/icons/hicolor/${i}x${i}/apps/${_pkgbin}.png" "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${_pkgbin}.png"
done
find "${pkgdir}" -type d -exec chmod 755 {} +
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View file

@ -0,0 +1,13 @@
pkgbase = ledger-udev
pkgdesc = Udev rules to connect a ledger wallet to your linux box
pkgver = 1
pkgrel = 8
url = https://www.ledgerwallet.com
install = ledger-udev.install
arch = any
license = Apache
depends = udev
source = https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/20-hw1.rules
sha256sums = e6d262beeb5ce40804ad90ce99716617e3fe046afa85a7b8c24e83362b653221
pkgname = ledger-udev

View file

@ -0,0 +1,18 @@
# Maintainer: Josh Ellithorpe <quest@mac.com>
pkgname=ledger-udev
pkgver=1
pkgrel=8
pkgdesc='Udev rules to connect a ledger wallet to your linux box'
arch=(any)
url='https://www.ledgerwallet.com'
license=(Apache)
depends=(udev)
install='ledger-udev.install'
source=(https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/20-hw1.rules)
sha256sums=('e6d262beeb5ce40804ad90ce99716617e3fe046afa85a7b8c24e83362b653221')
package() {
install -Dm 644 20-hw1.rules "$pkgdir"/usr/lib/udev/rules.d/20-hw1.rules
}

View file

@ -0,0 +1,12 @@
post_install() {
udevadm trigger
udevadm control --reload-rules
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}