diff options
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | BetterDiscord.install | 38 | ||||
-rw-r--r-- | LICENSE | 21 | ||||
-rw-r--r-- | PKGBUILD | 51 |
5 files changed, 28 insertions, 106 deletions
@@ -1,20 +1,16 @@ pkgbase = betterdiscord-git - pkgdesc = Discord extension that introduces new features like BTTV emotes and plugin support (Git) - pkgver = 0.3.0i.r20.g4707671 + pkgdesc = Discord extension with plugin support, emotes, and more + pkgver = 1.1.1.r1.gf8e2c2f pkgrel = 1 - url = https://betterdiscord.net/home/ - install = BetterDiscord.install - arch = any + url = https://github.com/rauenzi/BetterDiscordApp + arch = x86_64 license = MIT makedepends = git - makedepends = asar - depends = discord + makedepends = nodejs + makedepends = npm provides = betterdiscord - conflicts = betterdiscord - source = betterdiscord::git+https://github.com/Jiiks/BetterDiscordApp.git - source = LICENSE - sha512sums = SKIP - sha512sums = e2bb20271117ebef69eab2d505204dcfb83334e596c5ce02e5f5e1950ba502b9485ebb2005f9df74ac692ba4a99cce869942611b07bba4d588247d53bd21efcc + source = betterdiscord::git+https://github.com/rauenzi/BetterDiscordApp.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 ef6f107bc691..000000000000 --- a/BetterDiscord.install +++ /dev/null @@ -1,38 +0,0 @@ -pre_install() { - pre_remove -} - -post_install() { - for discord_dir in /opt/discord{,-canary,-ptb}; do - if [ -d "$discord_dir" ]; then - echo ">> Installing into $discord_dir" - echo ">>> Unpacking Discord asar..." - sudo asar e "$discord_dir/resources/app.asar" "$discord_dir/resources/app" - - echo ">>> Preparing Discord files..." - sed \ - -e "/_fs2 = / a var _betterDiscord = require('betterdiscord'); var _betterDiscord2;" \ - -e "/mainWindow = new/ a _betterDiscord2 = new _betterDiscord.BetterDiscord(mainWindow);" \ - -i "$discord_dir/resources/app/index.js" - - echo ">>> Finishing up..." - sudo ln -s "/usr/lib/betterdiscord-git/" "$discord_dir/resources/app/node_modules/betterdiscord" - fi - done -} - -pre_upgrade() { - pre_remove -} - -post_upgrade() { - post_install -} - -pre_remove() { - echo ">>> Killing Discord..." - killall -q -SIGKILL Discord DiscordCanary DiscordPTB - - echo ">>> Removing app folder from Discord directory..." - sudo rm -rf /opt/discord{,-canary,-ptb}/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,41 +1,30 @@ -# Maintainer: Felix Golatofski <contact@xdfr.de> +# Maintainer: ObserverOfTime <chronobserver@disroot.org> pkgname=betterdiscord-git -pkgver=0.3.0i.r20.g4707671 +pkgver=1.1.1.r1.gf8e2c2f pkgrel=1 -pkgdesc='Discord extension that introduces new features like BTTV emotes and plugin support (Git)' -arch=('any') -url='https://betterdiscord.net/home/' +pkgdesc='Discord extension with plugin support, emotes, and more' +arch=('x86_64') +url='https://github.com/rauenzi/BetterDiscordApp' license=('MIT') -depends=('discord') -makedepends=('git' 'asar') -install='BetterDiscord.install' -source=("${pkgname%-git}::git+https://github.com/Jiiks/BetterDiscordApp.git" LICENSE) -sha512sums=('SKIP' - 'e2bb20271117ebef69eab2d505204dcfb83334e596c5ce02e5f5e1950ba502b9485ebb2005f9df74ac692ba4a99cce869942611b07bba4d588247d53bd21efcc') -provides=('betterdiscord') -conflicts=('betterdiscord') +provides=("${pkgname%-git}") +makedepends=('git' 'nodejs' 'npm') +source=("${pkgname%-git}::git+${url}.git#branch=main") +sha256sums=('SKIP') pkgver() { - cd "${srcdir}/${pkgname%-git}" - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + cd ${pkgname%-git} + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } -package() { - install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - - # Get rid of git files. - mkdir -p "package" - cp -rf "./betterdiscord/" "./package/" - cd "./package/betterdiscord/" - 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 ${pkgname%-git} + npm i && npm 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 } |