Permalink
| name: discord | |
| version: latest | |
| version-script: cat $SNAPCRAFT_STAGE/version | |
| summary: Free voice and text chat | |
| description: | | |
| All-in-one voice and text chat for gamers that's free, secure, and | |
| works on both your desktop and phone. Stop paying for TeamSpeak | |
| servers and hassling with Skype. Simplify your life. | |
| grade: stable | |
| confinement: strict | |
| parts: | |
| discord: | |
| install: | | |
| DEB_API="https://discordapp.com/api/download?platform=linux&format=deb" | |
| DEB_URL=$(curl -w "%{url_effective}\n" -I -L -s -S "${DEB_API}" -o /dev/null) | |
| VERSION=$(echo "${DEB_URL}" | cut -d'/' -f6) | |
| echo $VERSION > $SNAPCRAFT_STAGE/version | |
| plugin: dump | |
| source: "https://discordapp.com/api/download?platform=linux&format=deb" | |
| source-type: deb | |
| # Correct path to icon. | |
| prepare: | | |
| sed -i 's|Icon=discord|Icon=/usr/share/discord/discord\.png|' usr/share/discord/discord.desktop | |
| after: | |
| - desktop-gtk2 | |
| build-packages: | |
| - curl | |
| stage-packages: | |
| - libasound2 | |
| - libatomic1 | |
| - libc++1 | |
| - libgconf2-4 | |
| - libnotify4 | |
| - libnspr4 | |
| - libnss3 | |
| - libpulse0 | |
| - libxss1 | |
| - libxtst6 | |
| apps: | |
| discord: | |
| command: bin/desktop-launch $SNAP/usr/share/discord/Discord | |
| desktop: usr/share/applications/discord.desktop | |
| # Correct the TMPDIR path for Chromium Framework/Electron to | |
| # ensure libappindicator has readable resources. | |
| environment: | |
| TMPDIR: $XDG_RUNTIME_DIR | |
| plugs: | |
| - bluez | |
| - browser-support | |
| - camera | |
| - desktop | |
| - gsettings | |
| - home | |
| - mount-observe | |
| - network | |
| - network-observe | |
| - opengl | |
| - process-control | |
| - pulseaudio | |
| - screen-inhibit-control | |
| - system-observe | |
| - unity7 | |
| - wayland | |
| - x11 |