Commit 0cc314e4 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add play for discord

parent b4a1237d
#!/bin/sh -x
# TODO: common place
fatal()
{
echo "FATAL: $*" >&2
exit 1
}
PKGNAME=discord
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
fi
[ "$1" != "--run" ] && echo "Install Discord from the official site" && exit
[ "$($DISTRVENDOR -a)" != "x86_64" ] && echo "Only x86_64 is supported" && exit 1
# FIXME: improve eget to support ? not ask mask (detect by =?)
#PKG=/tmp/discord.deb
#$EGET -O $PKG "https://discord.com/api/download?platform=linux&format=deb"
PKG="https://dl.discordapp.net/apps/linux/0.0.12/discord-0.0.12.deb"
epm install "$PKG"
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCT=discord
LIBDIR=/opt
mkdir -p $BUILDROOT$LIBDIR/
mv $BUILDROOT/usr/share/$PRODUCT/ $BUILDROOT$LIBDIR/$PRODUCT/
subst "s|/usr/share/$PRODUCT|$LIBDIR/$PRODUCT|g" $SPEC
subst '1iAutoProv:no' $SPEC
# usual command skype
mkdir -p $BUILDROOT/usr/bin/
ln -sf $LIBDIR/$PRODUCT/Discord $BUILDROOT/usr/bin/$PRODUCT
subst "s|/usr/share/discord/Discord|/usr/bin/$PRODUCT|g" $BUILDROOT/$LIBDIR/$PRODUCT/discord.desktop
ln -sf $LIBDIR/$PRODUCT/discord.desktop $BUILDROOT/usr/share/applications/discord.desktop
ln -sf $LIBDIR/$PRODUCT/discord.png $BUILDROOT/usr/share/pixmaps/discord.png
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