diff options
author | zxp19821005 | 2024-01-05 13:01:40 +0800 |
---|---|---|
committer | zxp19821005 | 2024-01-05 13:01:40 +0800 |
commit | d741d68613f1fd2ec64015c59304b8e1b1ba5cd2 (patch) | |
tree | 5484a04ea2da9587f5a9edd6433ff3b41b9673cd | |
download | aur-d741d68613f1fd2ec64015c59304b8e1b1ba5cd2.tar.gz |
update to 1.1.2
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 42 | ||||
-rw-r--r-- | electron-calculator.sh | 17 |
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9781f744bc94 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = electron-calculator-bin + pkgdesc = Simple electron calculator app + pkgver = 1.1.2 + pkgrel = 1 + url = https://github.com/Alex313031/electron-calculator + arch = x86_64 + license = BSD + depends = electron22 + depends = hicolor-icon-theme + provides = electron-calculator + conflicts = electron-calculator + source = electron-calculator-1.1.2.deb::https://github.com/Alex313031/electron-calculator/releases/download/1.1.2/electron-calculator_1.1.2_amd64.deb + source = LICENSE-1.1.2::https://raw.githubusercontent.com/Alex313031/electron-calculator/1.1.2/LICENSE + source = electron-calculator.sh + sha256sums = ac91977fb127e39364703456ce79c08c4d469f62676b762f0bc4d72afbe148eb + sha256sums = 0971f64facd7071ec5e71edbac78a59937e0a82e1b1599ee45e5ce0e4735623e + sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf + +pkgname = electron-calculator-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..96c001b4dbee --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +pkgname=electron-calculator-bin +_pkgname="Electron Calculator" +pkgver=1.1.2 +_electronversion=22 +pkgrel=1 +pkgdesc="Simple electron calculator app" +arch=('x86_64') +url="https://github.com/Alex313031/electron-calculator" +license=('BSD') +provides=("${pkgname%-bin}") +conflicts=("${pkgname%-bin}") +depends=( + "electron${_electronversion}" + 'hicolor-icon-theme' +) +source=( + "${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/Alex313031/electron-calculator/${pkgver}/LICENSE" + "${pkgname%-bin}.sh" +) +sha256sums=('ac91977fb127e39364703456ce79c08c4d469f62676b762f0bc4d72afbe148eb' + '0971f64facd7071ec5e71edbac78a59937e0a82e1b1599ee45e5ce0e4735623e' + '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf') +build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@appasar@|app.asar|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" + bsdtar -xf "${srcdir}/data.tar.xz" + sed "s|\"/opt/${_pkgname}/${pkgname%-bin}\"|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" +} +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm644 "${srcdir}/opt/${_pkgname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + for _icons in 16x16 24x24 32x32 48x48 64x64 96x96 128x128 256x256;do + install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png"\ + -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps" + done + install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" +}
\ No newline at end of file diff --git a/electron-calculator.sh b/electron-calculator.sh new file mode 100644 index 000000000000..c77c53567639 --- /dev/null +++ b/electron-calculator.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -e +_APPDIR="/usr/lib/@appname@" +_ASAR="${_APPDIR}/@appasar@" +export PATH="${_APPDIR}:${PATH}" +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +export ELECTRON_IS_DEV=0 +export NODE_ENV=production +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" "$@" + exit +else + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" + exit +fi
\ No newline at end of file |