summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-05 10:31:15 +0800
committerzxp198210052024-01-05 10:31:15 +0800
commit7e6832fcc4c0b083ab0660950eeb01222c1931f1 (patch)
tree264aa76c591f57a9caffb686e7ff3b1dac1cc5a6
parenta94c211a6be33482a08cd06761d4ddc7926ae4f1 (diff)
downloadaur-7e6832fcc4c0b083ab0660950eeb01222c1931f1.tar.gz
fix errors
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD17
-rw-r--r--pennywise.sh22
3 files changed, 28 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c4d200ec286e..492fa8695f58 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pennywise-bin
pkgdesc = Cross-platform application to open any website or media in a floating window
pkgver = 0.8.0
- pkgrel = 7
+ pkgrel = 8
url = https://github.com/kamranahmedse/pennywise
arch = i686
arch = x86_64
@@ -15,10 +15,10 @@ pkgbase = pennywise-bin
optdepends = flashplugin: for Adobe Flash support in Firefox
provides = pennywise=0.8.0
conflicts = pennywise
- source = LICENSE.md::https://raw.githubusercontent.com/kamranahmedse/pennywise/v0.8.0/license.md
+ source = LICENSE-0.8.0.md::https://raw.githubusercontent.com/kamranahmedse/pennywise/v0.8.0/license.md
source = pennywise.sh
sha256sums = b41ccd76edcf9e9af64581622b1d6dc1de7ed55a96548c4af8c43d32cd764b0b
- sha256sums = 7f81f1416ca73154a28fba4e00d98e3d28aea93771e6de8e449ddbf8e6d65363
+ sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf
source_i686 = pennywise-0.8.0-i686.deb::https://github.com/kamranahmedse/pennywise/releases/download/v0.8.0/pennywise_0.8.0_i386.deb
sha256sums_i686 = df794adfb3fd28cb68beabe59cadfc000c0b20c83bb38f064d9409a7951b6799
source_x86_64 = pennywise-0.8.0-x86_64.deb::https://github.com/kamranahmedse/pennywise/releases/download/v0.8.0/pennywise_0.8.0_amd64.deb
diff --git a/PKGBUILD b/PKGBUILD
index 31594a546057..8fe5859bc55b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,8 @@
pkgname=pennywise-bin
_pkgname=Pennywise
pkgver=0.8.0
-pkgrel=7
+_electronversion=5
+pkgrel=8
pkgdesc="Cross-platform application to open any website or media in a floating window"
arch=('i686' 'x86_64')
url="https://github.com/kamranahmedse/pennywise"
@@ -12,7 +13,7 @@ provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
'hicolor-icon-theme'
- 'electron5'
+ "electron${_electronversion}"
)
optdepends=(
'chromium: for Open with Pennywise Chrome extension'
@@ -24,16 +25,20 @@ optdepends=(
source_i686=("${pkgname%-bin}-${pkgver}-i686.deb::${url}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_i386.deb")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${url}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb")
source=(
- "LICENSE.md::https://raw.githubusercontent.com/kamranahmedse/pennywise/v${pkgver}/license.md"
+ "LICENSE-${pkgver}.md::https://raw.githubusercontent.com/kamranahmedse/pennywise/v${pkgver}/license.md"
"${pkgname%-bin}.sh"
)
sha256sums=('b41ccd76edcf9e9af64581622b1d6dc1de7ed55a96548c4af8c43d32cd764b0b'
- '7f81f1416ca73154a28fba4e00d98e3d28aea93771e6de8e449ddbf8e6d65363')
+ '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf')
sha256sums_i686=('df794adfb3fd28cb68beabe59cadfc000c0b20c83bb38f064d9409a7951b6799')
sha256sums_x86_64=('02d5f5ea3bf0b934d650cbb75c3cb43ab62b3d1c48c733b2f85816ccc8736191')
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}\" %U|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ 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}"
@@ -45,5 +50,5 @@ package() {
-t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
done
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
- install -Dm644 "${srcdir}/LICENSE.md" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/LICENSE-${pkgver}.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
} \ No newline at end of file
diff --git a/pennywise.sh b/pennywise.sh
index b9c96f8f17f4..c77c53567639 100644
--- a/pennywise.sh
+++ b/pennywise.sh
@@ -1,11 +1,17 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron5
-APPDIR="/usr/lib/pennywise"
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app.asar"
+#!/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