summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD49
-rw-r--r--flare-player.sh29
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..395cac4f6997
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = flare-player-bin
+ pkgdesc = An "unofficial" emulator based on Ruffle Flash Emulator. Created to provide a friendly interface and enhanced playing experience. It is a complete alternative to Adobe Flash Player. Run Flash Safely Anywhere.(Prebuilt version.Use system-wide electron)
+ pkgver = 1.15.0
+ pkgrel = 1
+ url = https://github.com/jooy2/flaru
+ arch = x86_64
+ license = LicenseRef-custom
+ depends = electron35
+ provides = flare-player=1.15.0
+ conflicts = flare-player
+ source = flare-player-1.15.0.rpm::https://github.com/jooy2/flaru/releases/download/1.15.0/Flare.Player.1.15.0_x86_64.rpm
+ source = LICENSE-1.15.0::https://raw.githubusercontent.com/jooy2/flaru/1.15.0/LICENSE
+ source = flare-player.sh
+ sha256sums = 97e88b1e1f048e8d98ea8a3968d575b8f90eb6689ff735a21bedf0d15a368c85
+ sha256sums = 73e127f0f0a4e9035191cd3a5036a3d9e360523c66892449830ee0bf44ea511b
+ sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980
+
+pkgname = flare-player-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2d507a4a6f3c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+_appname=flare
+pkgname="${_appname}-player-bin"
+_pkgname="Flare Player"
+pkgver=1.15.0
+_electronversion=35
+pkgrel=1
+pkgdesc='An "unofficial" emulator based on Ruffle Flash Emulator. Created to provide a friendly interface and enhanced playing experience. It is a complete alternative to Adobe Flash Player. Run Flash Safely Anywhere.(Prebuilt version.Use system-wide electron)'
+arch=('x86_64')
+url="https://github.com/jooy2/flaru"
+license=("LicenseRef-custom")
+conflicts=("${pkgname%-bin}")
+provides=("${pkgname%-bin}=${pkgver}")
+depends=(
+ "electron${_electronversion}"
+)
+source=(
+ "${pkgname%-bin}-${pkgver}.rpm::${url}/releases/download/${pkgver}/${_pkgname// /.}.${pkgver}_${CARCH}.rpm"
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/jooy2/flaru/${pkgver}/LICENSE"
+ "${pkgname%-bin}.sh"
+)
+sha256sums=('97e88b1e1f048e8d98ea8a3968d575b8f90eb6689ff735a21bedf0d15a368c85'
+ '73e127f0f0a4e9035191cd3a5036a3d9e360523c66892449830ee0bf44ea511b'
+ '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
+prepare() {
+ sed -i -e "
+ s/@electronversion@/${_electronversion}/g
+ s/@appname@/${pkgname%-bin}/g
+ s/@runname@/app.asar/g
+ s/@cfgdirname@/${pkgname%-bin}/g
+ s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
+ " "${srcdir}/${pkgname%-bin}.sh"
+ sed -i -e "
+ s/\"\/opt\/${_pkgname}\/${_appname}\"/${pkgname%-bin}/g
+ s/=${_pkgname}/=${pkgname%-bin}/g
+ s/Game/Utility/g
+ " "${srcdir}/usr/share/applications/${_appname}.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" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/usr/share/applications/${_appname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512;do
+ install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_appname}.png" \
+ "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png"
+ done
+ install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+} \ No newline at end of file
diff --git a/flare-player.sh b/flare-player.sh
new file mode 100644
index 000000000000..40e422ca2ee7
--- /dev/null
+++ b/flare-player.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