diff options
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | BetterDiscord.install | 33 | ||||
-rw-r--r-- | LICENSE | 21 | ||||
-rw-r--r-- | PKGBUILD | 53 |
5 files changed, 35 insertions, 102 deletions
@@ -1,17 +1,15 @@ -pkgbase = betterdiscord - pkgdesc = Discord extension that introduces new features like BTTV emotes and plugin support. - pkgver = 0.2.82 +pkgbase = betterdiscord-git + pkgdesc = Discord extension with plugin support, emotes, and more + pkgver = 1.9.2.r4.geb814160 pkgrel = 1 - url = https://betterdiscord.net/home/ - install = BetterDiscord.install - arch = any + url = https://github.com/BetterDiscord/BetterDiscord + arch = x86_64 license = MIT - makedepends = asar - depends = discord - source = git+https://github.com/Jiiks/BetterDiscordApp.git#commit=0f2812bc10b3c9695ddf2e28b65bbfe1ae4d1ce7 - source = LICENSE - md5sums = SKIP - md5sums = 8414480728c5dc0d4ca9a93cfaf67acb - -pkgname = betterdiscord + makedepends = git + makedepends = nodejs + makedepends = pnpm + provides = betterdiscord + source = betterdiscord::git+https://github.com/BetterDiscord/BetterDiscord.git#branch=main + sha256sums = SKIP +pkgname = betterdiscord-git 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 7eaa9b1631aa..000000000000 --- a/BetterDiscord.install +++ /dev/null @@ -1,33 +0,0 @@ -pre_install() { - pre_remove -} - -post_install() { - echo ">>> Unpacking Discord asar..." - sudo asar e "/opt/discord/resources/app.asar" "/opt/discord/resources/app" - - echo ">>> Preparing Discord files..." - sed "/_fs2/ a var _betterDiscord = require('betterdiscord'); var _betterDiscord2;" "/opt/discord/resources/app/index.js" > "/usr/lib/betterdiscord/index.js" - sudo mv "/usr/lib/betterdiscord/index.js" "/opt/discord/resources/app/index.js" - sed "/mainWindow = new/ a _betterDiscord2 = new _betterDiscord.BetterDiscord(mainWindow);" "/opt/discord/resources/app/index.js" > "/usr/lib/betterdiscord/index.js" - sudo mv "/usr/lib/betterdiscord/index.js" "/opt/discord/resources/app/index.js" - - echo ">>> Finishing up..." - sudo ln -s "/usr/lib/betterdiscord/" "/opt/discord/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 "/opt/discord/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. @@ -1,37 +1,30 @@ -# 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> -pkgname=betterdiscord -pkgver=0.2.82 +pkgname=betterdiscord-git +pkgver=1.9.2.r4.geb814160 pkgrel=1 -pkgdesc='Discord extension that introduces new features like BTTV emotes and plugin support.' -arch=('any') -url='https://betterdiscord.net/home/' +pkgdesc='Discord extension with plugin support, emotes, and more' +arch=('x86_64') +url='https://github.com/BetterDiscord/BetterDiscord' license=('MIT') -depends=('discord') -makedepends=('asar') -install='BetterDiscord.install' -source=('git+https://github.com/Jiiks/BetterDiscordApp.git#commit=0f2812bc10b3c9695ddf2e28b65bbfe1ae4d1ce7' LICENSE) -md5sums=('SKIP' - '8414480728c5dc0d4ca9a93cfaf67acb') +provides=("${pkgname%-git}") +makedepends=('git' 'nodejs' 'pnpm') +source=("${pkgname%-git}::git+${url}.git#branch=main") +sha256sums=('SKIP') -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() { + cd ${pkgname%-git} + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} - 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 ${pkgname%-git} + pnpm i && pnpm run dist +} - # 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 ${pkgname%-git} + install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -Dm644 dist/betterdiscord.asar "$pkgdir"/opt/BetterDiscord/betterdiscord.asar } |