summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore4
-rw-r--r--BetterDiscord.install43
-rw-r--r--LICENSE21
-rw-r--r--PKGBUILD54
5 files changed, 33 insertions, 110 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5ab60daf9ef3..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.2.82.r450.1a6648eb
- pkgrel = 2
- url = https://betterdiscord.net/home/
- install = BetterDiscord.install
- arch = any
+ pkgdesc = Installer for BetterDiscord
+ pkgver = 1.0.0.beta
+ pkgrel = 1
+ url = https://github.com/BetterDiscord/Installer
+ arch = x86_64
license = MIT
- makedepends = asar
- depends = discord
- source = git+https://github.com/Jiiks/BetterDiscordApp.git#commit=1a6648ebf03cd49daf8f31d9678d6d628204244d
- source = LICENSE
- md5sums = SKIP
- md5sums = 8414480728c5dc0d4ca9a93cfaf67acb
+ 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 759352e18406..a5e59e5ea731 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,31 @@
-# Maintainer: 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
-pkgver=0.2.82.r450.1a6648eb
-pkgrel=0
-pkgdesc='Discord extension that introduces new features like BTTV emotes and plugin support.'
-arch=('any')
-url='https://betterdiscord.net/home/'
+pkgver=1.0.0.beta
+pkgrel=1
+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=1a6648ebf03cd49daf8f31d9678d6d628204244d' LICENSE)
-md5sums=('SKIP'
- '8414480728c5dc0d4ca9a93cfaf67acb')
+makedepends=('nodejs' 'yarn')
+source=("$pkgname-$_tag.tar.gz::$url/archive/v${_tag}.tar.gz")
+sha256sums=('7af763dc0e73b84690a953bf412135a079d954010e845ad422283be185959bcc')
-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"
+pkgver() {
+ printf '%s' "${_tag/-/.}"
+}
- 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
}