Commit 37790911 authored by Boris Yumankulov's avatar Boris Yumankulov Committed by Vitaly Lipatov

epm play: added Throne (eterbug #18873)

parent a052dc83
Pipeline #16947 passed with stage
in 16 seconds
#!/bin/sh
TAR="$1"
RETURNTARNAME="$2"
VERSION="$3"
URL="$4"
. $(dirname $0)/common.sh
[ -n "$VERSION" ] || VERSION="$(echo "$URL" | grep -oP '\d+(\.\d+)+' | head -n1)"
[ -n "$VERSION" ] || fatal "Can't get package version"
PKGNAME=$PRODUCT-$VERSION
mkdir opt/
mkdir -p usr/bin
mkdir -p usr/share/pixmaps
erc $TAR || fatal
mv -v Throne opt/$PRODUCT
mv -v opt/$PRODUCT/$PRODUCT.png usr/share/pixmaps/
cat <<EOF | create_file /usr/share/applications/Throne.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Throne
Comment=Cross-platform GUI proxy utility (Empowered by sing-box)
Exec=throne
Icon=Throne
Terminal=false
StartupNotify=false
StartupWMClass=Throne
Categories=Network;
EOF
cat <<EOF > usr/bin/throne
#!/bin/sh
# Correctly handle non-standard config directory
confdir=\${XDG_CONFIG_HOME:-\$HOME/.config}
datadir=\$confdir/Throne
appdir=/opt/Throne
# Prepare appdata
if [ ! -d \$datadir ]; then
nekoray_datadir=\$confdir/nekoray
if [ -d \$nekoray_datadir ]; then
# Migrate appdata from nekoray
cp -a \$nekoray_datadir $datadir
else
mkdir -p \$datadir
fi
fi
# Remove broken (since 1.0.2-beta.1) links to geo assets
if [ -L \$datadir/geoip.db ] || [ -L $datadir/geosite.db ]; then
rm -f \$datadir/geo{ip,site}.db
fi
# Run application
\$appdir/Throne -- -appdata
EOF
chmod 755 usr/bin/throne
erc pack $PKGNAME.tar usr opt
return_tar $PKGNAME.tar
#!/bin/sh
PKGNAME=Throne
SUPPORTEDARCHES="x86_64 aarch64"
VERSION="$2"
DESCRIPTION="Cross-platform GUI proxy utility (Empowered by sing-box)"
URL=" https://github.com/throneproj/Throne "
. $(dirname $0)/common.sh
arch="$(epm print info --debian-arch)"
PKGURL=$(get_github_url "https://github.com/throneproj/Throne/" "${PKGNAME}-${VERSION}-linux-$arch.zip")
install_pack_pkgurl
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment