diff options
author | zoorat | 2021-10-25 15:29:21 +0600 |
---|---|---|
committer | zoorat | 2021-10-25 15:29:21 +0600 |
commit | 4667c4e52c31e9c1c1c8ef543b54071244003043 (patch) | |
tree | 81000bc4f904902eeb797c194376ddcdbfecada3 | |
download | aur-4667c4e52c31e9c1c1c8ef543b54071244003043.tar.gz |
adding betterdiscord-installer-bin v1.1.0 on AUR
Signed-off-by: zoorat <78788887+z00rat@users.noreply.github.com>
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 120 | ||||
-rw-r--r-- | betterdiscord-installer-bin.install | 50 | ||||
-rw-r--r-- | usr--SLASH--bin--SLASH--betterdiscord-installer | 2 |
5 files changed, 205 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7b457e3c2291 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = betterdiscord-installer-bin + pkgdesc = A simple standalone program which automates the installation, removal and maintenance of BetterDiscord. + pkgver = 1.1.0 + pkgrel = 1 + url = https://betterdiscord.app/ + install = betterdiscord-installer-bin.install + arch = x86_64 + license = MIT + depends = nss + depends = gtk3 + depends = libxss + provides = betterdiscord-installer + conflicts = betterdiscord-installer + replaces = betterdiscord-installer + noextract = betterdiscord-installer-bin-1.1.0.x86_64.AppImage + options = strip + options = emptydirs + options = zipman + source = betterdiscord-installer-bin-1.1.0.x86_64.AppImage::https://github.com/BetterDiscord/Installer/releases/download/v1.1.0/BetterDiscord-Linux.AppImage + source = LICENSE::https://raw.githubusercontent.com/BetterDiscord/Installer/main/LICENSE + source = file://usr--SLASH--bin--SLASH--betterdiscord-installer + b2sums = 5baf4075430b577cf8135c62d66075316853a5d5bcb79b6a3420be8e6aad6e561660d1665baba8ff7ef01006c70462fb3226e4c097df0fd0c49de9373020259a + b2sums = 9efca07a8806137067825ffa7e285950d4bbd1ed3c5a252af83d9408d51fc6530f9be7e1a467e28e73374b9057f52646fff419545a9d2fa466412ee2043ac56d + b2sums = b31d61be03a20c315a0fbcf2b2a75da5fe442d7de7951a9c75c31e34ed0c91c9f15b585bc82fa9634e913c774b3f932cf3d476b981eacfb8707f6db7503494c7 + +pkgname = betterdiscord-installer-bin diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..3932921699f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD +!usr--SLASH--bin--SLASH--betterdiscord-installer +!betterdiscord-installer-bin.install + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3bf19ece46d0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,120 @@ +# Maintainer: zoorat <zoorat [at] protonmail [dot] com> + +_pkgname="betterdiscord-installer" +pkgname="$_pkgname-bin" +pkgver=1.1.0 +pkgrel=1 + +pkgdesc="A simple standalone program which automates the installation, removal and maintenance of BetterDiscord." +arch=('x86_64') +url="https://github.com/BetterDiscord/Installer" +url="https://betterdiscord.app/" +license=('MIT') + +depends=("nss" "gtk3" "libxss") +provides=("$_pkgname") +conflicts=("$_pkgname") +replaces=("$_pkgname") +options=(debug !strip emptydirs zipman) +options=(strip emptydirs zipman) +install="$pkgname.install" + +source=("${pkgname}-${pkgver}.${CARCH}.AppImage::https://github.com/BetterDiscord/Installer/releases/download/v${pkgver}/BetterDiscord-Linux.AppImage" + "LICENSE::https://raw.githubusercontent.com/BetterDiscord/Installer/main/LICENSE" + "file://usr--SLASH--bin--SLASH--betterdiscord-installer") +noextract=("${pkgname}-${pkgver}.${CARCH}.AppImage") +b2sums=('5baf4075430b577cf8135c62d66075316853a5d5bcb79b6a3420be8e6aad6e561660d1665baba8ff7ef01006c70462fb3226e4c097df0fd0c49de9373020259a' + '9efca07a8806137067825ffa7e285950d4bbd1ed3c5a252af83d9408d51fc6530f9be7e1a467e28e73374b9057f52646fff419545a9d2fa466412ee2043ac56d' + 'b31d61be03a20c315a0fbcf2b2a75da5fe442d7de7951a9c75c31e34ed0c91c9f15b585bc82fa9634e913c774b3f932cf3d476b981eacfb8707f6db7503494c7') + +log() { + echo -e " $1...\c" +} +log_status() { + BGreen='\033[1;32m' # Bold Green + BRed='\033[1;31m' # Bold Red + Reset='\033[0m' # Reset + + if [ $1 == 0 ]; then + echo -e "$BGreen\c" + echo -e "done.$Reset" + else + echo -e "$BRed\c" + echo -e "failed.$Reset" + fi +} + +prepare() { + # + # making .AppImage file executable + log "making \"${pkgname}-${pkgver}.${CARCH}.AppImage\" file executable" + chmod +x "${pkgname}-${pkgver}.${CARCH}.AppImage" + log_status $? + + # + # extract .AppImage file + log "extracting \"${pkgname}-${pkgver}.${CARCH}.AppImage\" file" + "./${pkgname}-${pkgver}.${CARCH}.AppImage" --appimage-extract >/dev/null + log_status $? +} + +build() { + # + # modifying .desktop file + log "modifying \"${_pkgname}.desktop\" file" + sed -i -E "s|Exec=AppRun|Exec=/usr/bin/${_pkgname}|" "squashfs-root/${_pkgname}.desktop" + log_status $? +} + +package() { + # + # Copy app files + log "copying app files too /opt/${pkgname}" + install -dm0755 "${pkgdir}/opt/${pkgname}" + cp -a squashfs-root/* "${pkgdir}/opt/${pkgname}" + log_status $? + + # + # Fix permissions + log "fixing permissions" + for d in locales resources; do + chmod 0755 "${pkgdir}/opt/${pkgname}/$d" + find "${pkgdir}/opt/${pkgname}/$d" -type d -exec chmod 0755 {} + + done + log_status $? + + # + # Link entry point + log "copying usr--SLASH--bin--SLASH--betterdiscord-installer to /usr/bin/${_pkgname}" + install -dm0755 "${pkgdir}/usr/bin" + cp "usr--SLASH--bin--SLASH--betterdiscord-installer" "${pkgdir}/usr/bin/${_pkgname}" + log_status $? + + # + # Copy icons files + log "copying all icons files to /usr/share/icons/" + install -dm0755 "${pkgdir}/usr/share/icons" + find squashfs-root/usr/share/icons -type d -exec chmod 0755 {} + + cp -a squashfs-root/usr/share/icons/* "${pkgdir}/usr/share/icons" + log_status $? + + # + # Copy desktop file + log "copying desktop file to /usr/share/applications/${_pkgname}.desktop" + install -Dm0644 "squashfs-root/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop" + log_status $? + + # + # Install LICENSE file + log "copying LICENSE file to /usr/share/licenses/${pkgname}/LICENSE" + install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + log_status $? + + # + # Remove unused files + log "removing unused files" + rm -rf "${pkgdir}/opt/${pkgname}"/{usr,swiftshader,AppRun,${_pkgname}.{desktop,png}} + rm -rf "${pkgdir}/opt/${pkgname}"/{libGLESv2.so,libEGL.so,libvk_swiftshader.so,libvulkan.so} + rm -rf "${pkgdir}/opt/${pkgname}"/LICENSE* + log_status $? +} diff --git a/betterdiscord-installer-bin.install b/betterdiscord-installer-bin.install new file mode 100644 index 000000000000..b7a9f49fd6e5 --- /dev/null +++ b/betterdiscord-installer-bin.install @@ -0,0 +1,50 @@ +#!/bin/bash + +B='\033[1;36m' # Bold cyan +C='\033[0;36m' # Cyan +R='\033[0m \a' # Reset all colors and ring a bell + +call_to_action() { + echo -e "$C" + echo -e " +-$B=[ betterdiscord-installer-bin ]=$C-----------------------------------------------------------------+" + echo " | Remember, |" + echo " | BetterDiscord violates Discord's terms of service by modifying the client, although there is |" + echo " | no evidence that Discord either cares or takes actions against users who modify their client. |" + echo " | Your account is not at risk for simply using BetterDiscord alone. Abusing the service or using |" + echo " | plugins which further violate the Terms of Service can get your account terminated. however, |" + echo " | All plugins from our official website are safe. |" + echo " | |" + echo " | You can, |" + echo " | run this app by executing 'betterdiscord-installer' on your terminal |" + echo " | star the project at : https://github.com/BetterDiscord/Installer |" + echo " | vote the AUR package at : https://aur.archlinux.org/packages/betterdiscord-installer-bin |" + echo " | report issue about packaging : https://github.com/z00rat/AUR/issues |" + echo " | report issue about the app at : https://github.com/BetterDiscord/Installer/issues |" + echo " | backup betterdiscord themes and plugins : ~/.config/BetterDiscord |" + echo " | download plugins from : https://betterdiscord.app/plugins |" + echo " | download themes from : https://betterdiscord.app/themes |" + echo " | read FAQs : https://betterdiscord.app/FAQ |" + echo " | - zoorat. |" + echo " +---------------------------------------------------------------------------------------------------+" + echo -e "$R" +} + +after_remove() { + echo -e "$C" + echo -e " +-$B=[ betterdiscord-installer-bin ]=$C-----------------------------------------------------------+" + echo " | remove configs and user data of this app by deleting ~/.config/BetterDiscord\ Installer |" + echo " | remove plugins and themes of betterdiscord by deleting ~/.config/BetterDiscord |" + echo " | - zoorat. |" + echo " +---------------------------------------------------------------------------------------------+" + echo -e "$R" +} + +post_install() { + call_to_action +} +post_upgrade() { + call_to_action +} +post_remove() { + after_remove +} diff --git a/usr--SLASH--bin--SLASH--betterdiscord-installer b/usr--SLASH--bin--SLASH--betterdiscord-installer new file mode 100644 index 000000000000..f53005c2dea8 --- /dev/null +++ b/usr--SLASH--bin--SLASH--betterdiscord-installer @@ -0,0 +1,2 @@ +#!/usr/bin/sh +env BD_SKIP_UPDATECHECK=1 /opt/betterdiscord-installer-bin/betterdiscord-installer "$@" |