diff options
author | Killswitch | 2020-08-15 16:19:27 +0200 |
---|---|---|
committer | Killswitch | 2020-08-15 16:19:27 +0200 |
commit | 45f8ed4c15f89d7ae42831d25d2cd5a4951317c3 (patch) | |
tree | 62eec309bc2e950e26fcef5ea2450f3acb6f2388 | |
parent | 91afcdf3d4ba0b4c8af31a944e2202b2940d11bd (diff) | |
download | aur-45f8ed4c15f89d7ae42831d25d2cd5a4951317c3.tar.gz |
Moved patches files and manpage into packages to avoid having another git source
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | index.js.patch | 12 | ||||
-rw-r--r-- | main.js.patch | 11 | ||||
-rw-r--r-- | powercord.8 | 12 |
4 files changed, 50 insertions, 11 deletions
@@ -1,8 +1,6 @@ # Maintainer: Szentesi Botond pkgname=powercord-git _pkgname=powercord -patches=powercord-patches - pkgver=r1178.41cb7ce pkgrel=1 pkgdesc="A lightweight discord client mod focused on simplicity and performance." @@ -11,17 +9,23 @@ url="https://github.com/powercord-org/$_pkgname" license=('Parkord') depends=('nodejs') makedepends=('git' 'npm' 'jq') -source=("git+https://github.com/powercord-org/powercord#branch=v2" - "git+https://github.com/botiapa/powercord-patches" - ) -md5sums=('SKIP' - 'SKIP' - ) +source=( + "git+https://github.com/powercord-org/powercord#branch=v2" + "index.js.patch" + "main.js.patch" + "powercord.8" + ) +md5sums=( + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + ) options=('!strip') prepare() { - patch -u ${srcdir}/${_pkgname}/injectors/index.js -i ${srcdir}/${patches}/index.js.patch - patch -u ${srcdir}/${_pkgname}/injectors/main.js -i ${srcdir}/${patches}/main.js.patch + patch -u ${srcdir}/${_pkgname}/injectors/index.js -i ${srcdir}/index.js.patch + patch -u ${srcdir}/${_pkgname}/injectors/main.js -i ${srcdir}/main.js.patch } pkgver() { @@ -53,7 +57,7 @@ package() { chown -R root:root "${install_dir}/${_pkgname}/" find "${pkgdir}/usr" -type d -exec chmod 755 {} + - install -g 0 -o 0 -Dm 0644 "${srcdir}/${patches}/powercord.8" -t ${pkgdir}/usr/share/man/man8/ + install -g 0 -o 0 -Dm 0644 "${srcdir}/powercord.8" -t ${pkgdir}/usr/share/man/man8/ gzip ${pkgdir}/usr/share/man/man8/powercord.8 # This is not ideal. It's only required because it seems like discord needs write and execute permissions. diff --git a/index.js.patch b/index.js.patch new file mode 100644 index 000000000000..2ec78e0b08a4 --- /dev/null +++ b/index.js.patch @@ -0,0 +1,12 @@ +--- /home/botond/Downloads/temp/powercord/injectors/index.js 2020-08-14 23:38:07.596542247 +0200 ++++ ./index.js 2020-08-15 13:34:31.166710654 +0200 +@@ -1,3 +1,9 @@ ++#!/usr/bin/env node ++ ++if(process.env.USER != "root") { ++ console.log("You need to run powercord as root."); ++ process.exit(1); ++} + // Perform checks + require('./env_check')(); + diff --git a/main.js.patch b/main.js.patch new file mode 100644 index 000000000000..56cd83fd8333 --- /dev/null +++ b/main.js.patch @@ -0,0 +1,11 @@ +--- ../powercord/injectors/main.js 2020-08-14 23:38:07.596542247 +0200 ++++ ./main.js 2020-08-15 13:46:16.208269548 +0200 +@@ -9,7 +9,7 @@ + exports.inject = async ({ getAppDir }) => { + const appDir = await getAppDir(); + if (await exists(appDir)) { +- console.log('Looks like you already have an injector in place. Try uninjecting (`npm run unplug`) and try again.'); ++ console.log('Looks like you already have an injector in place. Try uninjecting (`powercord uninject`) and try again.'); + return false; + } + diff --git a/powercord.8 b/powercord.8 new file mode 100644 index 000000000000..b5f10c1cdb2c --- /dev/null +++ b/powercord.8 @@ -0,0 +1,12 @@ +.TH Powercord "1" "August 2020" "2.0.0" "Usage" +.SH NAME + Powercord +.SH DESCRIPTION + A lightweight discord client mod focused on simplicity and performance. +.SH Usage + powercord <COMMAND> +.SH Commands + inject - Injects the script into discord + uninject - Uninjects the script from discord, returning it to its original state +.SH "SEE ALSO" + https://github.com/powercord-org/powercord |