summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorObserverOfTime2021-04-01 10:48:58 +0300
committerObserverOfTime2021-04-01 10:56:29 +0300
commit936c5620f25ee197e9c4a42f91c41f4c32c62ea4 (patch)
tree2482b1ab75fbea50f3c824faa0bdc695cff74eba
parentb701006eaec7462e1c0869bb1463d450f9e4d35f (diff)
downloadaur-betterdiscord.tar.gz
Installer beta
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore4
-rw-r--r--BetterDiscord.install43
-rw-r--r--LICENSE21
-rw-r--r--PKGBUILD55
5 files changed, 29 insertions, 113 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ec91ce81c2b2..1b737bff8648 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,14 @@
pkgbase = betterdiscord
- pkgdesc = Discord extension that introduces new features like BTTV emotes and plugin support.
- pkgver = 0.3.0i.r0.g4114a6e
+ pkgdesc = Installer for BetterDiscord
+ pkgver = 1.0.0.beta
pkgrel = 1
- url = https://betterdiscord.net/home/
- install = BetterDiscord.install
- arch = any
+ url = https://github.com/BetterDiscord/Installer
+ arch = x86_64
license = MIT
- makedepends = asar
- depends = discord
- source = git+https://github.com/Jiiks/BetterDiscordApp.git#commit=4114a6ee266d7ec5c6d980b200e282b9d2c28b7e
- source = LICENSE
- sha512sums = SKIP
- sha512sums = e2bb20271117ebef69eab2d505204dcfb83334e596c5ce02e5f5e1950ba502b9485ebb2005f9df74ac692ba4a99cce869942611b07bba4d588247d53bd21efcc
+ makedepends = nodejs
+ makedepends = yarn
+ source = betterdiscord-1.0.0-beta.tar.gz::https://github.com/BetterDiscord/Installer/archive/v1.0.0-beta.tar.gz
+ sha256sums = 7af763dc0e73b84690a953bf412135a079d954010e845ad422283be185959bcc
pkgname = betterdiscord
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ce6a1c7cf48c..000000000000
--- a/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-BetterDiscordApp/
-pkg/
-src/
-*pkg.tar.xz
diff --git a/BetterDiscord.install b/BetterDiscord.install
deleted file mode 100644
index d9297d88dae3..000000000000
--- a/BetterDiscord.install
+++ /dev/null
@@ -1,43 +0,0 @@
-DISCORDDIR=""
-
-if [[ -d "/opt/discord" ]]; then
- DISCORDDIR="/opt/discord/"
-elif [[ -d "/opt/discord-canary" ]]; then
- DISCORDDIR="/opt/discord-canary/"
-elif [[ -d "/opt/discord-ptb" ]]; then
- DISCORDDIR="/opt/discord-ptb/"
-fi
-
-pre_install() {
- pre_remove
-}
-
-post_install() {
- echo ">>> Unpacking Discord asar..."
- sudo asar e "${DISCORDDIR}resources/app.asar" "${DISCORDDIR}resources/app"
-
- echo ">>> Preparing Discord files..."
- sed "/_fs2/ a var _betterDiscord = require('betterdiscord'); var _betterDiscord2;" "${DISCORDDIR}resources/app/index.js" > "/usr/lib/betterdiscord/index.js"
- sudo mv "/usr/lib/betterdiscord/index.js" "${DISCORDDIR}resources/app/index.js"
- sed "/mainWindow = new/ a _betterDiscord2 = new _betterDiscord.BetterDiscord(mainWindow);" "${DISCORDDIR}resources/app/index.js" > "/usr/lib/betterdiscord/index.js"
- sudo mv "/usr/lib/betterdiscord/index.js" "${DISCORDDIR}resources/app/index.js"
-
- echo ">>> Finishing up..."
- sudo ln -s "/usr/lib/betterdiscord/" "${DISCORDDIR}resources/app/node_modules/betterdiscord"
-}
-
-pre_upgrade() {
- pre_remove
-}
-
-post_upgrade() {
- post_install
-}
-
-pre_remove() {
- echo ">>> Killing Discord..."
- killall -SIGKILL Discord
-
- echo ">>> Removing app folder from Discord directory..."
- sudo rm -rf "${DISCORDDIR}resources/app"
-}
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 0fdeb2edf64e..000000000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015-2016 Jiiks | https://jiiks.net/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
index e830330fb32a..a5e59e5ea731 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,44 +1,31 @@
-# Maintainer: Felix Golatofski <contact@xdfr.de>
-# Contributor: Ilya Trukhanov <lahvuun@gmail.com>
-#
-# This package is based on discorddownloader by simonizor
-# http://www.simonizor.gq/discorddownloader.html
+# Maintainer: ObserverOfTime <chronobserver@disroot.org>
+_tag=1.0.0-beta
pkgname=betterdiscord
-_pkgname=BetterDiscordApp
-pkgver=0.3.0i.r0.g4114a6e
+pkgver=1.0.0.beta
pkgrel=1
-pkgdesc='Discord extension that introduces new features like BTTV emotes and plugin support.'
-arch=('any')
-url='https://betterdiscord.net/home/'
+pkgdesc='Installer for BetterDiscord'
+arch=('x86_64')
+url='https://github.com/BetterDiscord/Installer'
license=('MIT')
-depends=('discord')
-makedepends=('asar')
-install='BetterDiscord.install'
-source=('git+https://github.com/Jiiks/BetterDiscordApp.git#commit=4114a6ee266d7ec5c6d980b200e282b9d2c28b7e' LICENSE)
-sha512sums=('SKIP'
- 'e2bb20271117ebef69eab2d505204dcfb83334e596c5ce02e5f5e1950ba502b9485ebb2005f9df74ac692ba4a99cce869942611b07bba4d588247d53bd21efcc')
+makedepends=('nodejs' 'yarn')
+source=("$pkgname-$_tag.tar.gz::$url/archive/v${_tag}.tar.gz")
+sha256sums=('7af763dc0e73b84690a953bf412135a079d954010e845ad422283be185959bcc')
pkgver() {
- cd "${srcdir}/${_pkgname}"
- git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
+ printf '%s' "${_tag/-/.}"
}
-package() {
- install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
- # Get rid of git files.
- mkdir -p "package"
- cp -rf "./BetterDiscordApp/" "./package/"
- cd "./package/BetterDiscordApp/"
- rm -rf ".git"
- rm "./.gitignore"
-
- install -d "${pkgdir}/usr/lib/${pkgname}/"
- cp -a "./." "${pkgdir}/usr/lib/${pkgname}"
- mv "${pkgdir}/usr/lib/${pkgname}/lib/Utils.js" "${pkgdir}/usr/lib/${pkgname}/lib/utils.js"
+build() {
+ cd Installer-$_tag
+ yarn && yarn dist:dir
+}
- # Patch BetterDiscord files.
- sed -i "s/'\/var\/local'/process.env.HOME + '\/.config'/g" "${pkgdir}/usr/lib/${pkgname}/lib/BetterDiscord.js"
- sed -i "s/bdstorage/bdStorage/g" "${pkgdir}/usr/lib/${pkgname}/lib/BetterDiscord.js"
+package() {
+ cd Installer-$_tag
+ mkdir -p "$pkgdir"/usr/bin "$pkgdir"/opt
+ install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ cp --preserve=mode -r dist/linux-unpacked "$pkgdir"/opt/BetterDiscord
+ ln -s /opt/BetterDiscord/betterdiscord "$pkgdir"/usr/bin/betterdiscord
}