summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-08-04 12:26:08 +0800
committerzxp198210052023-08-04 12:26:08 +0800
commit39963b5d704fb8cef39cff6fca962bb25bce8c56 (patch)
tree75fab1895c2c39f2ded99dc653e0628fcb147175
parent5070b0a412d876eb3f6ec606b7f263770d9093f9 (diff)
downloadaur-39963b5d704fb8cef39cff6fca962bb25bce8c56.tar.gz
optimized PKGBUILD
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD14
-rw-r--r--frosch.sh6
3 files changed, 15 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e3c870205dbe..a25413d6a3e5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = frosch-bin
pkgdesc = Frosch, software para juego de rana electrónica o rana digital.
pkgver = 2.0.2
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/ivanrey/Frosch
arch = i686
arch = x86_64
@@ -9,11 +9,12 @@ pkgbase = frosch-bin
makedepends = asar
depends = electron11
depends = bash
+ provides = frosch
conflicts = frosch
source = LICENSE::https://raw.githubusercontent.com/ivanrey/Frosch/master/LICENSE
source = frosch.sh
sha256sums = 70d564391aa89ca77317a0716d27d450d939c41d0554a66da392b28784d6fa7d
- sha256sums = e57e0959b9cfc7c7fc863991ce487e865020e369b757a0438bf5b4fe55a1a424
+ sha256sums = 3645e814b95471b0f8ae979a5c4567bf977e85ef544cebdbed257f9bdc934168
source_i686 = frosch-2.0.2-i686.zip::https://github.com/ivanrey/Frosch/releases/download/v2.0.2/Frosch-linux-ia32.zip
sha256sums_i686 = 78ca0dbd64a0e6e1155632219d3990a76358abd8c385ef88a7094edc1a8aa8b6
source_x86_64 = frosch-2.0.2-x86_64.zip::https://github.com/ivanrey/Frosch/releases/download/v2.0.2/Frosch-linux-x64.zip
diff --git a/PKGBUILD b/PKGBUILD
index 7e8f63154100..07fddca36620 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,29 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=frosch-bin
+_appname=Frosch
pkgver=2.0.2
-pkgrel=2
+pkgrel=3
pkgdesc="Frosch, software para juego de rana electrónica o rana digital."
arch=('i686' 'x86_64')
url="https://github.com/ivanrey/Frosch"
license=('MIT')
+provides=("${pkgname%-bin}")
+conflicts=("${pkgname%-bin}")
depends=('electron11' 'bash')
makedepends=('asar')
-conflicts=("${pkgname%-bin}")
-source_i686=("${pkgname%-bin}-${pkgver}-i686.zip::${url}/releases/download/v${pkgver}/Frosch-linux-ia32.zip")
-source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.zip::${url}/releases/download/v${pkgver}/Frosch-linux-x64.zip")
+source_i686=("${pkgname%-bin}-${pkgver}-i686.zip::${url}/releases/download/v${pkgver}/${_appname}-linux-ia32.zip")
+source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.zip::${url}/releases/download/v${pkgver}/${_appname}-linux-x64.zip")
source=("LICENSE::https://raw.githubusercontent.com/ivanrey/Frosch/master/LICENSE"
"${pkgname%-bin}.sh")
sha256sums=('70d564391aa89ca77317a0716d27d450d939c41d0554a66da392b28784d6fa7d'
- 'e57e0959b9cfc7c7fc863991ce487e865020e369b757a0438bf5b4fe55a1a424')
+ '3645e814b95471b0f8ae979a5c4567bf977e85ef544cebdbed257f9bdc934168')
sha256sums_i686=('78ca0dbd64a0e6e1155632219d3990a76358abd8c385ef88a7094edc1a8aa8b6')
sha256sums_x86_64=('16841565eecd5b9946711cfafdf9a0959c60fada1870c624f5d65f31cc31252f')
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}"
asar pack "${srcdir}/resources/app" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}.asar"
install -Dm644 "${srcdir}/resources/app/icono.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
- gendesk -f -n --icon "${pkgname%-bin}" --categories "Game" --name "Frosch" --exec "/opt/${pkgname%-bin}/${pkgname%-bin}"
+ gendesk -f -n --icon "${pkgname%-bin}" --categories "Game" --name "${_appname}" --exec "/opt/${pkgname%-bin}/${pkgname%-bin}"
install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
} \ No newline at end of file
diff --git a/frosch.sh b/frosch.sh
index 162843cef01c..8b870d6f3ae5 100644
--- a/frosch.sh
+++ b/frosch.sh
@@ -1,6 +1,8 @@
#!/bin/bash
+_ELECTRON=/usr/bin/electron11
+_ASAR="/opt/frosch/frosch.asar"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec electron11 /opt/frosch/frosch.asar "$@"
+ exec ${_ELECTRON} ${_ASAR} "$@"
else
- exec electron11 --no-sandbox /opt/frosch/frosch.asar "$@"
+ exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
fi \ No newline at end of file