summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-09-12 15:41:35 +0800
committerzxp198210052023-09-12 15:41:35 +0800
commit881699149277581a96ddc50516639c991e3b7277 (patch)
tree89bd9d26702cd6cacd7c2252e67732179e1132ba
parentf912f44c815164ad7aad127ad29e7f30d5fa78b1 (diff)
downloadaur-881699149277581a96ddc50516639c991e3b7277.tar.gz
fix errors
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD21
-rw-r--r--eusoft-ting-es.sh2
3 files changed, 19 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7a622a70756d..b3f74ef9e1ae 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,17 @@
pkgbase = eusoft-ting-es-bin
pkgdesc = 听力统计、笔记同步、语音高亮跟随,让您轻松愉快学西班牙语
pkgver = 9.6.2.114
- pkgrel = 1
+ pkgrel = 2
url = https://www.esdict.cn/ting
arch = x86_64
license = custom
+ makedepends = asar
depends = hicolor-icon-theme
depends = bash
depends = electron13
conflicts = eusoft-ting-es
- conflicts = eudic-ting_es
- conflicts = ting_es
+ conflicts = eudic-ting-es
+ conflicts = ting-es
source = eusoft-ting-es-9.6.2.114.deb::https://static.frdic.com/pkg/ting_es/ting_es.deb
source = LICENSE.html
source = eusoft-ting-es.sh
diff --git a/PKGBUILD b/PKGBUILD
index 0ec10945c647..1d293fca9bb1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,33 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
-pkgname=eusoft-ting-es-bin
_appname=ting_es
+pkgname="eusoft-${_appname//_/-}-bin"
+_zhname="每日西语听力"
pkgver=9.6.2.114
-pkgrel=1
+pkgrel=2
pkgdesc="听力统计、笔记同步、语音高亮跟随,让您轻松愉快学西班牙语"
arch=('x86_64')
url="https://www.esdict.cn/ting"
license=('custom')
-conflicts=("${pkgname%-bin}" "eudic-${_appname}" "${_appname}")
+conflicts=("${pkgname%-bin}" "eudic-${_appname//_/-}" "${_appname//_/-}")
depends=('hicolor-icon-theme' 'bash' 'electron13')
+makedepends=('asar')
source=("${pkgname%-bin}-${pkgver}.deb::https://static.frdic.com/pkg/${_appname}/${_appname}.deb"
"LICENSE.html"
"${pkgname%-bin}.sh")
sha256sums=('73e57df6718460a282ec4bd3d6aea59f78d6097b829b8516f8ab7075e81e981f'
'bb199c3faf0e1155a5bc43512e1898e6604034a67d9e2f4d16840b3b359cc432'
'3420da4b46178952b73d7b4ec1023e3005490269158ea5066e1a6709db5714ff')
-package() {
+prepare() {
bsdtar -xf "${srcdir}/data.tar.xz"
- install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}"
- cp -r "${srcdir}/opt/每日西语听力/resources/"* "${pkgdir}/opt/${pkgname%-bin}"
- sed "s|\"/opt/每日西语听力/${_appname}\" %U|/opt/${pkgname%-bin}/${pkgname%-bin}|g;s|Icon=${_appname}|Icon=${pkgname%-bin}|g" \
+ asar e "${srcdir}/opt/${_zhname}/resources/app.asar" "${srcdir}/app.asar.unpacked"
+ cp -r "${srcdir}/opt/${_zhname}/resources/app.asar.unpacked" "${srcdir}"
+ asar p "${srcdir}/app.asar.unpacked" "${srcdir}/${pkgname%-bin}.asar"
+ sed "s|\"/opt/${_zhname}/${_appname}\" %U|${pkgname%-bin}|g;s|Icon=${_appname}|Icon=${pkgname%-bin}|g" \
-i "${srcdir}/usr/share/applications/${_appname}.desktop"
+}
+package() {
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/${pkgname%-bin}.asar" -t "${pkgdir}/opt/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/applications/${_appname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
for _icons in 32x32 128x128 256x256;do
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_appname}.png" \
diff --git a/eusoft-ting-es.sh b/eusoft-ting-es.sh
index 54ceaf322419..232c40e51119 100644
--- a/eusoft-ting-es.sh
+++ b/eusoft-ting-es.sh
@@ -1,6 +1,6 @@
#!/bin/bash
_ELECTRON=/usr/bin/electron13
-_ASAR="/opt/eusoft-ting-es/app.asar"
+_ASAR="/opt/eusoft-ting-es/eusoft-ting-es.asar"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
exec ${_ELECTRON} ${_ASAR} "$@"
else