Commit 623d1281 authored by CatSema's avatar CatSema Committed by Vitaly Lipatov

epm play: add karing

parent 9e4c639d
#!/bin/sh
PKGNAME=karing
VERSION="$2"
SUPPORTEDARCHES="x86_64"
DESCRIPTION="Simple & Powerful proxy utility - singbox GUI based on flutter"
URL="https://karing.app/"
. $(dirname $0)/common.sh
case "$(epm print info -p)" in
rpm)
pkgtype=rpm
;;
*)
pkgtype=deb
;;
esac
if [ "$VERSION" = "*" ]; then
PKGURL=$(get_github_url "https://github.com/KaringX/karing/" "karing_*_linux_amd64.$pkgtype")
else
PKGURL="https://github.com/KaringX/karing/releases/download/v${VERSION}/karing_${VERSION}_linux_amd64.$pkgtype"
fi
install_pkgurl
cat <<EOF
Note: For TUN mode functionality, sudo must be enabled in the system:
$ su -
# control sudowheel enabled
# exit
This allows Karing to create TUN interfaces for system-wide traffic routing.
EOF
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCT=karing
PRODUCTDIR=/opt/$PRODUCT
. $(dirname $0)/common.sh
move_to_opt /usr/share/karing
# Add dependency on libcurl4-openssl
add_requires "libcurl4-openssl"
# Create wrapper script instead of direct link for libcurl4-openssl compatibility
cat <<EOF | create_exec_file "/usr/bin/karing"
#!/bin/sh
export LD_LIBRARY_PATH="/usr/lib64/libcurl4-openssl:\$LD_LIBRARY_PATH"
exec "$PRODUCTDIR/karing" "\$@"
EOF
fix_desktop_file "Categories=Applications/Internet;" "Categories=Network;Internet;"
add_libs_requires
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