diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | frosch.sh | 22 |
3 files changed, 31 insertions, 17 deletions
@@ -1,7 +1,7 @@ pkgbase = frosch-bin pkgdesc = Frosch, software para juego de rana electrónica o rana digital. pkgver = 2.0.2 - pkgrel = 6 + pkgrel = 7 url = https://github.com/ivanrey/Frosch arch = i686 arch = x86_64 @@ -10,10 +10,10 @@ pkgbase = frosch-bin depends = electron11 provides = frosch=2.0.2 conflicts = frosch - source = LICENSE::https://raw.githubusercontent.com/ivanrey/Frosch/v2.0.2/LICENSE + source = LICENSE-2.0.2::https://raw.githubusercontent.com/ivanrey/Frosch/v2.0.2/LICENSE source = frosch.sh sha256sums = 70d564391aa89ca77317a0716d27d450d939c41d0554a66da392b28784d6fa7d - sha256sums = 7d31e6c20fc5010a1e58d6579301c378608a4b5ba9c8f58d989735392d439d03 + sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf 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 @@ -2,15 +2,19 @@ pkgname=frosch-bin _appname=Frosch pkgver=2.0.2 -pkgrel=6 +_electronversion=11 +pkgrel=7 pkgdesc="Frosch, software para juego de rana electrónica o rana digital." -arch=('i686' 'x86_64') +arch=( + 'i686' + 'x86_64' +) url="https://github.com/ivanrey/Frosch" license=('MIT') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - 'electron11' + "electron${_electronversion}" ) makedepends=( 'gendesk' @@ -18,14 +22,18 @@ makedepends=( 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/v${pkgver}/LICENSE" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/ivanrey/Frosch/v${pkgver}/LICENSE" "${pkgname%-bin}.sh" ) sha256sums=('70d564391aa89ca77317a0716d27d450d939c41d0554a66da392b28784d6fa7d' - '7d31e6c20fc5010a1e58d6579301c378608a4b5ba9c8f58d989735392d439d03') + '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf') sha256sums_i686=('78ca0dbd64a0e6e1155632219d3990a76358abd8c385ef88a7094edc1a8aa8b6') sha256sums_x86_64=('16841565eecd5b9946711cfafdf9a0959c60fada1870c624f5d65f31cc31252f') build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@appasar@|app|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" gendesk -q -f -n --categories "Game" --name "${_appname}" --exec "${pkgname%-bin}" } package() { @@ -35,5 +43,5 @@ package() { install -Dm644 "${srcdir}/swiftshader/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/swiftshader" install -Dm644 "${srcdir}/resources/app/icono.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png" install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" - install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }
\ No newline at end of file diff --git a/frosch.sh b/frosch.sh index 11647f052013..c77c53567639 100644 --- a/frosch.sh +++ b/frosch.sh @@ -1,11 +1,17 @@ -#!/bin/bash -_ELECTRON=/usr/bin/electron11 -APPDIR="/usr/lib/frosch" -export PATH="${APPDIR}:${PATH}" -export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}" -_ASAR="${APPDIR}/app" +#!/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 - exec ${_ELECTRON} ${_ASAR} "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" "$@" + exit else - exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" + exit fi
\ No newline at end of file |