summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052025-02-11 17:55:21 +0800
committerzxp198210052025-02-11 17:55:21 +0800
commit9fe7fe03503e7424804db3135c0036569e32db95 (patch)
tree7d8b4ef3bf68d6f4bbf743c4d793621b22c808b7
downloadaur-9fe7fe03503e7424804db3135c0036569e32db95.tar.gz
update to 1.5.2
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD43
-rw-r--r--video-subtitle-master.sh29
3 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..58209a93d904
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = video-subtitle-master-bin
+ pkgdesc = A powerful desktop application for batch generating subtitles for videos and translating them into other languages.(Prebuilt version.Use system-wide electron)
+ pkgver = 1.5.2
+ pkgrel = 1
+ url = https://github.com/buxuku/video-subtitle-master
+ arch = any
+ license = MIT
+ depends = electron30
+ depends = nodejs
+ provides = video-subtitle-master=1.5.2
+ conflicts = video-subtitle-master
+ source = video-subtitle-master-1.5.2.deb::https://github.com/buxuku/video-subtitle-master/releases/download/v1.5.2/Video-Subtitle-Master_Linux_1.5.2_amd64.deb
+ source = LICENSE-1.5.2::https://raw.githubusercontent.com/buxuku/video-subtitle-master/v1.5.2/LICENSE
+ source = video-subtitle-master.sh
+ sha256sums = f1d9cc2295a6af485b6b0120045ccbe7a92ff69df67b993b6f6cc995c7e10fe9
+ sha256sums = 324178aaf0ebe3ab663803d3a63439cd8cdf02c3a4a40609c9ac6f8af517faed
+ sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980
+
+pkgname = video-subtitle-master-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b43c4b391dc6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+pkgname=video-subtitle-master-bin
+_pkgname='Video Subtitle Master'
+pkgver=1.5.2
+_electronversion=30
+pkgrel=1
+pkgdesc="A powerful desktop application for batch generating subtitles for videos and translating them into other languages.(Prebuilt version.Use system-wide electron)"
+arch=('any')
+url="https://github.com/buxuku/video-subtitle-master"
+license=('MIT')
+conflicts=("${pkgname%-bin}")
+provides=("${pkgname%-bin}=${pkgver}")
+depends=(
+ "electron${_electronversion}"
+ 'nodejs'
+)
+source=(
+ "${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${_pkgname// /-}_Linux_${pkgver}_amd64.deb"
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/buxuku/video-subtitle-master/v${pkgver}/LICENSE"
+ "${pkgname%-bin}.sh"
+)
+sha256sums=('f1d9cc2295a6af485b6b0120045ccbe7a92ff69df67b993b6f6cc995c7e10fe9'
+ '324178aaf0ebe3ab663803d3a63439cd8cdf02c3a4a40609c9ac6f8af517faed'
+ '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
+prepare() {
+ sed -e "
+ s/@electronversion@/${_electronversion}/g
+ s/@appname@/${pkgname%-bin}/g
+ s/@runname@/app.asar/g
+ s/@cfgdirname@/${_pkgname}/g
+ s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
+ " -i "${srcdir}/${pkgname%-bin}.sh"
+ bsdtar -xf "${srcdir}/data."*
+ sed -i "s/\"\/opt\/${_pkgname}\/${pkgname%-bin}\"/${pkgname%-bin}/g" "${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}"
+ cp -Pr --no-preserve=ownership "${srcdir}/opt/${_pkgname}/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" "${pkgdir}/usr/share/pixmaps"
+ install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
+ install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+} \ No newline at end of file
diff --git a/video-subtitle-master.sh b/video-subtitle-master.sh
new file mode 100644
index 000000000000..40e422ca2ee7
--- /dev/null
+++ b/video-subtitle-master.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+set -o pipefail
+_APPDIR="/usr/lib/@appname@"
+_RUNNAME="${_APPDIR}/@runname@"
+_CFGDIR="@cfgdirname@/"
+_OPTIONS="@options@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export ELECTRON_IS_DEV=0
+export ELECTRON_FORCE_IS_PACKAGED=true
+export ELECTRON_DISABLE_SECURITY_WARNINGS=true
+export ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@"
+export NODE_ENV=production
+export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
+export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf"
+declare -a _USER_FLAGS
+if [[ -f "${_FLAGS_FILE}" ]]; then
+ while read -r line; do
+ if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
+ _USER_FLAGS+=("${line}")
+ fi
+ done < "${_FLAGS_FILE}"
+fi
+cd "${_APPDIR}" || { echo "Failed to change directory to ${_APPDIR}"; exit 1; }
+if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then
+ exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@"
+else
+ exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} --no-sandbox "${_USER_FLAGS[@]}" "$@"
+fi \ No newline at end of file