From 5f4f5312d8c40f8d22135f4d756d468452a4f275 Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Tue, 28 Dec 2021 00:06:11 -0600 Subject: [PATCH] Add dex shebang to desktop file, and symlink it to /usr/bin/onlykey-gui --- .SRCINFO | 3 ++- PKGBUILD | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index c283b58..0644df2 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,10 +1,11 @@ pkgbase = onlykey-gui pkgdesc = OnlyKey Chrome Desktop App pkgver = 5.3.3 - pkgrel = 2 + pkgrel = 3 url = https://onlykey.io/ arch = x86_64 license = custom + depends = dex source = https://github.com/trustcrypto/OnlyKey-App/releases/download/v5.3.3/OnlyKey_5.3.3_amd64.deb sha256sums = 10611139e7cb601e49453dd9297aa8be767956c8ff37ebebeae1ac9076008e63 diff --git a/PKGBUILD b/PKGBUILD index a97b06b..3a50feb 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,14 +3,24 @@ pkgname=onlykey-gui pkgver=5.3.3 -pkgrel=2 +pkgrel=3 pkgdesc="OnlyKey Chrome Desktop App" arch=('x86_64') url="https://onlykey.io/" license=('custom') +depends=('dex') source=("https://github.com/trustcrypto/OnlyKey-App/releases/download/v${pkgver}/OnlyKey_${pkgver}_amd64.deb") sha256sums=('10611139e7cb601e49453dd9297aa8be767956c8ff37ebebeae1ac9076008e63') package() { bsdtar -C "${pkgdir}" -xf "${srcdir}/data.tar.xz" + + local desktopfile="/usr/share/applications/OnlyKey.desktop" + + # Add shebang to desktop file + sed -i '1 i\#!/usr/bin/env dex' "${pkgdir}/${desktopfile}" + + # Add symlink to /usr/bin + mkdir -p "${pkgdir}/usr/bin/" + ln -s "${desktopfile}" "${pkgdir}/usr/bin/onlykey-gui" }