Commit 40d2074c authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: added FluffyChat (Matrix messenger)

parent f1d8e07d
#!/bin/sh
TAR="$1"
RETURNTARNAME="$2"
#VERSION="$3"
URL="$4"
. $(dirname $0)/common.sh
VERSION=$(echo "$URL" | grep -oP 'v\K[0-9]+\.[0-9]+\.[0-9]+')
[ -n "$VERSION" ] || fatal "Can't get package version"
PKGNAME=$PRODUCT-$VERSION
mkdir -p opt/
erc unpack $TAR || fatal
mv "$(erc basename $TAR)" opt/$PRODUCT
chmod 0755 opt/$PRODUCT/$PRODUCT
iconname=chat.fluffy.$PRODUCT
install_file opt/$PRODUCT/data/flutter_assets/assets/favicon.png /usr/share/pixmaps/$iconname.png
cat <<EOF | create_file /usr/share/applications/$iconname.desktop
[Desktop Entry]
Version=1.0
Name=FluffyChat
Comment=Open source Matrix messenger
Exec=$PRODUCT %u
Icon=$iconname
StartupWMClass=fluffychat
Type=Application
Categories=Chat;Network;InstantMessaging;
MimeType=x-scheme-handler/matrix;
Keywords=matrix;chat;im;messaging;messenger;
EOF
erc pack $PKGNAME.tar opt usr
cat <<EOF >$PKGNAME.tar.eepm.yaml
name: $PRODUCT
group: Networking/Instant messaging
license: AGPLv3
url: https://github.com/krille-chan/fluffychat
summary: Open source Matrix messenger
description: FluffyChat is an open source, nonprofit and cute Matrix messenger.
EOF
return_tar $PKGNAME.tar
#!/bin/sh
PKGNAME=fluffychat
SUPPORTEDARCHES="x86_64 aarch64"
VERSION="$2"
DESCRIPTION="FluffyChat - open source, nonprofit and cute Matrix messenger from the official site"
URL="https://github.com/krille-chan/fluffychat"
. $(dirname $0)/common.sh
arch="$(epm print info -a)"
case "$arch" in
x86_64)
arch=x64
;;
aarch64)
arch=arm64
;;
*)
fatal "$arch arch is not supported"
;;
esac
# https://github.com/krille-chan/fluffychat/releases/download/v2.4.1/fluffychat-linux-x64.tar.gz
# https://github.com/krille-chan/fluffychat/releases/download/v2.4.1/fluffychat-linux-arm64.tar.gz
if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_url "$URL" "fluffychat-linux-$arch.tar.gz")
else
PKGURL="https://github.com/krille-chan/fluffychat/releases/download/v$VERSION/fluffychat-linux-$arch.tar.gz"
fi
install_pack_pkgurl
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCT=fluffychat
PRODUCTDIR=/opt/$PRODUCT
. $(dirname $0)/common.sh
add_bin_link_command $PRODUCT $PRODUCTDIR/$PRODUCT
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