diff options
author | zxp19821005 | 2024-11-12 16:31:47 +0800 |
---|---|---|
committer | zxp19821005 | 2024-11-12 16:31:47 +0800 |
commit | 0a6938ee166f006a5cd1f6b86b3cfd624128261f (patch) | |
tree | e9b45add407b7d417697250abe17aa51c287721f | |
download | aur-0a6938ee166f006a5cd1f6b86b3cfd624128261f.tar.gz |
update to 17.5.0
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | megacubo.sh | 29 |
3 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0b1f631f3a57 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = megacubo-bin + pkgdesc = 📺 A intuitive, multi-language and cross-platform IPTV player.(Prebuild version.Use system-wide electron) + pkgver = 17.5.0 + pkgrel = 1 + url = https://megacubo.tv/ + arch = aarch64 + arch = i686 + arch = x86_64 + license = GPL-3.0-only + makedepends = gendesk + depends = electron9 + depends = nodejs + depends = python + depends = perl + conflicts = megacubo + options = !strip + options = !emptydirs + source = megacubo.sh + sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980 + source_aarch64 = megacubo-17.5.0-aarch64.tar.gz::https://github.com/EdenwareApps/Megacubo/releases/download/v17.5.0/Megacubo_17.5.0_linux_arm64.tar.gz + sha256sums_aarch64 = 4a6d75ecb12a956dd456bf0a90b1065f63eb2a3f5f7dbd57ad0e4108617d0d93 + source_i686 = megacubo-17.5.0-i686.tar.gz::https://github.com/EdenwareApps/Megacubo/releases/download/v17.5.0/Megacubo_17.5.0_linux_x86.tar.gz + sha256sums_i686 = 8838a49b6d2f2ac2b5d6dd4ea261f9542e905b0bbe1eb7fef0bed4002e5bcb15 + source_x86_64 = megacubo-17.5.0-x86_64.tar.gz::https://github.com/EdenwareApps/Megacubo/releases/download/v17.5.0/Megacubo_17.5.0_linux_x64.tar.gz + sha256sums_x86_64 = d9754779c0675df54d2aec393d34a51aca369392a776754232c272864383a08e + +pkgname = megacubo-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2cf44b9936d9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +pkgname=megacubo-bin +_pkgname=Megacubo +pkgver=17.5.0 +_electronversion=9 +pkgrel=1 +pkgdesc="📺 A intuitive, multi-language and cross-platform IPTV player.(Prebuild version.Use system-wide electron)" +arch=( + 'aarch64' + 'i686' + 'x86_64' +) +url="https://megacubo.tv/" +_ghurl="https://github.com/EdenwareApps/Megacubo" +license=('GPL-3.0-only') +conflicts=("${pkgname%-bin}") +prodives=("${pkgname%-bin}=${pkgver}") +depends=( + "electron${_electronversion}" + 'nodejs' + 'python' + 'perl' +) +makedepends=( + 'gendesk' +) +options=( + '!strip' + '!emptydirs' +) +source=("${pkgname%-bin}.sh") +source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.tar.gz::${_ghurl}/releases/download/v${pkgver}/${_pkgname}_${pkgver}_linux_arm64.tar.gz") +source_i686=("${pkgname%-bin}-${pkgver}-i686.tar.gz::${_ghurl}/releases/download/v${pkgver}/${_pkgname}_${pkgver}_linux_x86.tar.gz") +source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.tar.gz::${_ghurl}/releases/download/v${pkgver}/${_pkgname}_${pkgver}_linux_x64.tar.gz") +sha256sums=('291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980') +sha256sums_aarch64=('4a6d75ecb12a956dd456bf0a90b1065f63eb2a3f5f7dbd57ad0e4108617d0d93') +sha256sums_i686=('8838a49b6d2f2ac2b5d6dd4ea261f9542e905b0bbe1eb7fef0bed4002e5bcb15') +sha256sums_x86_64=('d9754779c0675df54d2aec393d34a51aca369392a776754232c272864383a08e') +build() { + sed -e " + s/@electronversion@/${_electronversion}/g + s/@appname@/${pkgname%-bin}/g + s/@runname@/app.asar/g + s/@cfgdirname@/${pkgname%-bin}/g + s/@options@//g + " -i "${srcdir}/${pkgname%-bin}.sh" + gendesk -q -f -n --pkgname="${pkgname%-bin}" --pkgdesc="${pkgdesc}" --categories="AudioVideo" --name="${_pkgname}" --exec="${pkgname%-bin} %U" + find "${srcdir}/resources/app" -type f -name "*.js" -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-bin}\'/g" {} + +} +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm755 "${srcdir}/resources/ffmpeg" -t "${pkgdir}/usr/lib/${pkgname%-bin}" + cp -Pr --no-preserve=ownership "${srcdir}/resources/app" "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm644 "${srcdir}/resources/app/default_icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png" + install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" +}
\ No newline at end of file diff --git a/megacubo.sh b/megacubo.sh new file mode 100644 index 000000000000..40e422ca2ee7 --- /dev/null +++ b/megacubo.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 |