summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-04-02 13:35:18 +0800
committerzxp198210052024-04-02 13:35:18 +0800
commit340619c82e4a638184d744a3238e0794513d235b (patch)
tree792be54c8d25c68b435364ede28fa38c82b85f17
downloadaur-yts-streaming-bin.tar.gz
update to 4.0.0
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD43
-rw-r--r--yts-streaming.sh16
3 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ee4962731ee2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = yts-streaming-bin
+ pkgdesc = An electronJS based desktop app to stream or play yts and torrent movies in desktop without downloading.
+ pkgver = 4.0.0
+ pkgrel = 1
+ url = https://www.yts-streaming.com/
+ arch = x86_64
+ license = LicenseRef-unknown
+ makedepends = fuse2
+ depends = electron29
+ provides = yts-streaming=4.0.0
+ conflicts = yts-streaming
+ source = yts-streaming-4.0.0.AppImage::https://github.com/iambpn/YTS-Streaming/releases/download/4.0.1/yts-streaming-4.0.0.AppImage
+ source = yts-streaming.sh
+ sha256sums = 5b413be87da4fcff4643cfaaf55c700f693d1ef0fad613456fb07078433aea49
+ sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
+
+pkgname = yts-streaming-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6b66f94736c0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+pkgname=yts-streaming-bin
+_pkgname=YTS-Streaming
+pkgver=4.0.0
+_electronversion=29
+pkgrel=1
+pkgdesc="An electronJS based desktop app to stream or play yts and torrent movies in desktop without downloading."
+arch=('x86_64')
+url="https://www.yts-streaming.com/"
+_ghurl="https://github.com/iambpn/YTS-Streaming"
+license=('LicenseRef-unknown')
+provides=("${pkgname%-bin}=${pkgver}")
+conflicts=("${pkgname%-bin}")
+depends=(
+ "electron${_electronversion}"
+)
+makedepends=(
+ 'fuse2'
+)
+source=(
+ "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/4.0.1/${pkgname%-bin}-${pkgver}.AppImage"
+ "${pkgname%-bin}.sh"
+)
+sha256sums=('5b413be87da4fcff4643cfaaf55c700f693d1ef0fad613456fb07078433aea49'
+ 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
+build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@runname@|app.asar|g" \
+ -e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
+ chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
+ "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
+ sed "s|AppRun --no-sandbox|${pkgname%-bin}|g;s|Video;|Video;AudioVideo;|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
+}
+package() {
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib"
+ install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
+ install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
+ install -Dm644 "${srcdir}/squashfs-root/LICENSE"* -t "${pkgdir}/usr/share/licenses/${pkgname}"
+} \ No newline at end of file
diff --git a/yts-streaming.sh b/yts-streaming.sh
new file mode 100644
index 000000000000..7ddcaab8d734
--- /dev/null
+++ b/yts-streaming.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+_APPDIR="/usr/lib/@appname@"
+_RUNNAME="${_APPDIR}/@runname@"
+_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 NODE_ENV=production
+cd "${_APPDIR}"
+if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $?
+else
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $?
+fi \ No newline at end of file