Commit 781f1aa0 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: add new scripts (which is not supported)

parent d69cb8a7
#!/bin/sh
TAR="$1"
RETURNTARNAME="$2"
VERSION="$3"
. $(dirname $0)/common.sh
if echo "$TAR" | grep -q "agent.tar.xz" ; then
erc "$TAR" || fatal
else
fatal "We support only agent.tar.xz"
fi
mkdir opt
mv agent.tar opt/$PRODUCT || fatal
PKGNAME=$PRODUCT-$VERSION.tar
erc pack $PKGNAME opt/$PRODUCT
return_tar $PKGNAME
#!/bin/sh
PKGNAME=mailruagent
SUPPORTEDARCHES="x86_64"
#VERSION="$2"
# is not supported
DESCRIPTION='' #"Mail.ru Agent for Linux from the official site"
URL="https://agent.mail.ru/linux"
. $(dirname $0)/common.sh
VERSION="*"
if [ "$VERSION" = "*" ] ; then
VERSION=$(eget -O- -H Snap-Device-Series:16 https://api.snapcraft.io/v2/snaps/info/agent | epm --inscript tool json -b | grep version | head -n1 | sed -e 's|.*"\([0-9.]*\)".*|\1|') || fatal "Can't get current version" #'
fi
PKGURL="https://hb.bizmrg.com/agent-www/linux/x64/agent.tar.xz"
epm pack --install "$PKGURL" $VERSION
#PKGURL="$(eget -O- -H Snap-Device-Series:16 https://api.snapcraft.io/v2/snaps/info/agent | epm --inscript tool json -b | grep '\["channel-map",0,"download","url"\]' | head -n1 | sed -e 's|.*"\(.*\)"$|\1|' )" || fatal "Can't get URL"
#epm install "$PKGURL"
#!/bin/sh
PKGNAME=pstube-linux
SUPPORTEDARCHES="x86_64"
VERSION="$2"
# is not supported
DESCRIPTION='' #"PsTube (formerly FluTube) - Watch and download videos without ads. From the official site"
URL="https://github.com/prateekmedia/pstube"
. $(dirname $0)/common.sh
pkgtype="$(epm print info -p)"
case "$pkgtype" in
rpm|deb)
;;
*)
pkgtype="deb"
;;
esac
[ "$VERSION" = "*" ] && VERSION="[0-9]*"
arch=x86_64
# https://github.com/prateekmedia/pstube/releases/download/2.6.0/pstube-linux-2.6.0-x86_64.rpm
# https://github.com/prateekmedia/pstube/releases/download/2.6.0/pstube-linux-2.6.0-x86_64.deb
PKGURL=$(epm tool eget --list --latest https://github.com/prateekmedia/pstube/releases "$PKGNAME-$VERSION-$arch.$pkgtype") || fatal "Can't get package URL"
# we have workaround for their postinstall script, so always repack rpm package
[ "$pkgtype" = "deb" ] || repack='--repack'
epm install $repack "$PKGURL" || exit
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PREINSTALL_PACKAGES="glib2 libdbus libexpat libgbm libgio libgpg-error libuuid zlib fontconfig libGL"
. $(dirname $0)/common.sh
subst "s|^Group:.*|Group: Networking/Instant messaging|" $SPEC
subst "s|^License: unknown$|Proprietary|" $SPEC
subst "s|^URL:.*|URL: https://https://agent.mail.ru/linux|" $SPEC
subst "s|^Summary:.*|Summary: Mail.ru Agent for Linux|" $SPEC
add_bin_exec_command $PRODUCT
# create desktop file
mkdir -p $BUILDROOT/usr/share/applications/
cat <<EOF >$BUILDROOT/usr/share/applications/$PRODUCT.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Mail.ru Agent for Linux
Comment=Simple way to communicate and nothing extra. New design, group chats and much more!
Icon=$PRODUCT
Exec=$PRODUCT -urlcommand %u
Categories=InstantMessaging;Social;Chat;Network;
Terminal=false
MimeType=x-scheme-handler/icq;
Keywords=icq;
EOF
pack_file /usr/share/applications/$PRODUCT.desktop
# https://hb.bizmrg.com/icq-www/linux/x64/packages/10.0.13286/icq.png
install_file https://dashboard.snapcraft.io/site_media/appmedia/2020/04/icq_copy.png /usr/share/pixmaps/$PRODUCT.png
subst "s|.*/opt/icq/unittests.*||" $SPEC
# ignore embedded libs
filter_from_requires libQt5 libxcb "libX.*"
if epm assure patchelf ; then
cd $BUILDROOT$PRODUCTDIR
for i in $PRODUCT ; do
a= patchelf --set-rpath '$ORIGIN/lib' $i
done
for i in lib/*.so.* ; do
a= patchelf --set-rpath '$ORIGIN' $i
done
for i in QtQuick.2/lib*.so ; do
a= patchelf --set-rpath '$ORIGIN/../lib' $i
done
for i in QtQuick/*/lib*.so ; do
a= patchelf --set-rpath '$ORIGIN/../../lib' $i
done
fi
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