hasufell-repository/packages/net-im/discord-bin/discord-bin-0.0.14.exheres-0
2021-05-06 21:10:34 -03:00

89 lines
1.9 KiB
Bash

# Copyright 2020 <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
require freedesktop-mime freedesktop-desktop gtk-icon-cache
SUMMARY="All-in-one voice and text chat for gamers"
HOMEPAGE="https://discordapp.com"
DOWNLOADS="https://dl.discordapp.net/apps/linux/${PV}/discord-${PV}.tar.gz"
LICENCES="all-rights-reserved"
SLOT="0"
PLATFORMS="~amd64"
MYOPTIONS=""
DEPENDENCIES="
run:
dev-libs/atk
dev-libs/at-spi2-atk
dev-libs/at-spi2-core
dev-libs/expat
dev-libs/glib:2
dev-libs/nspr
dev-libs/nss
net-print/cups
sys-apps/dbus
sys-sound/alsa-lib
x11-libs/cairo
x11-libs/gdk-pixbuf:2.0
x11-libs/gtk+:3
x11-libs/libX11
x11-libs/libxcb
x11-libs/libXcomposite
x11-libs/libXcursor
x11-libs/libXdamage
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXi
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/libXScrnSaver
x11-libs/libXtst
x11-libs/pango
"
BUGS_TO="hasufell@posteo.de"
WORK=${WORKBASE}/Discord
pkg_setup() {
exdirectory --allow /opt
}
src_prepare() {
default
sed -i \
-e "s:/usr/share/discord/Discord:/opt/discord/Discord:g" \
discord.desktop
}
src_install() {
insinto /usr/share/icons/hicolor/256x256/apps
doins discord.png
insinto /usr/share/applications
doins discord.desktop
insinto /opt/discord
doins -r .
mkdir -p "${IMAGE}/usr/$(exhost --target)/bin"
dosym ../../../opt/discord/Discord /usr/$(exhost --target)/bin/discord
chmod +x "${IMAGE}/usr/$(exhost --target)/bin/discord"
}
pkg_postrm() {
freedesktop-desktop_pkg_postrm
freedesktop-mime_pkg_postrm
gtk-icon-cache_pkg_postrm
}
pkg_postinst() {
freedesktop-desktop_pkg_postinst
freedesktop-mime_pkg_postinst
gtk-icon-cache_pkg_postinst
}