diff options
author | Killswitch | 2020-08-15 22:38:18 +0200 |
---|---|---|
committer | Killswitch | 2020-08-15 22:38:18 +0200 |
commit | b2691dc545e52d149164b780bc033b187ad077b0 (patch) | |
tree | 5f02363f86fb7d38611f3ab3e00c58000a90213a | |
parent | 23af7d5bd92472952a3716f7de54ef0556123c73 (diff) | |
download | aur-b2691dc545e52d149164b780bc033b187ad077b0.tar.gz |
Added suggested patches
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | index.js.patch | 33 | ||||
-rw-r--r-- | injector_index.js.patch | 12 | ||||
-rw-r--r-- | injector_main.js.patch (renamed from main.js.patch) | 0 | ||||
-rw-r--r-- | pc-settings_index.js.patch | 11 | ||||
-rw-r--r-- | pc-updater_index.js.patch | 12 | ||||
-rw-r--r-- | pc-updater_settings.jsx.patch | 38 |
8 files changed, 123 insertions, 19 deletions
@@ -1,7 +1,7 @@ pkgbase = powercord-git pkgdesc = A lightweight discord client mod focused on simplicity and performance. pkgver = r1178.41cb7ce - pkgrel = 3 + pkgrel = 4 url = https://github.com/powercord-org/powercord arch = any license = Porkord @@ -11,13 +11,21 @@ pkgbase = powercord-git depends = npm options = !strip source = git+https://github.com/powercord-org/powercord#branch=v2 + source = injector_index.js.patch + source = injector_main.js.patch source = index.js.patch - source = main.js.patch + source = pc-settings_index.js.patch + source = pc-updater_index.js.patch + source = pc-updater_settings.jsx.patch source = powercord.8 md5sums = SKIP md5sums = SKIP md5sums = SKIP md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP pkgname = powercord-git @@ -2,7 +2,7 @@ pkgname=powercord-git _pkgname=powercord pkgver=r1178.41cb7ce -pkgrel=3 +pkgrel=4 pkgdesc="A lightweight discord client mod focused on simplicity and performance." arch=("any") url="https://github.com/powercord-org/$_pkgname" @@ -11,8 +11,12 @@ depends=('nodejs' 'git' 'npm') makedepends=('jq') source=( "git+https://github.com/powercord-org/powercord#branch=v2" + "injector_index.js.patch" + "injector_main.js.patch" "index.js.patch" - "main.js.patch" + "pc-settings_index.js.patch" + "pc-updater_index.js.patch" + "pc-updater_settings.jsx.patch" "powercord.8" ) md5sums=( @@ -20,17 +24,25 @@ md5sums=( 'SKIP' 'SKIP' 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' ) options=('!strip') prepare() { - patch -u ${srcdir}/${_pkgname}/injectors/index.js -i ${srcdir}/index.js.patch - patch -u ${srcdir}/${_pkgname}/injectors/main.js -i ${srcdir}/main.js.patch + patch -u ${srcdir}/${_pkgname}/injectors/index.js -i ${srcdir}/injector_index.js.patch + patch -u ${srcdir}/${_pkgname}/injectors/main.js -i ${srcdir}/injector_main.js.patch + patch -u ${srcdir}/${_pkgname}/src/Powercord/index.js -i ${srcdir}/index.js.patch + patch -u ${srcdir}/${_pkgname}/src/Powercord/plugins/pc-settings/index.js -i ${srcdir}/pc-settings_index.js.patch + patch -u ${srcdir}/${_pkgname}/src/Powercord/plugins/pc-updater/index.js -i ${srcdir}/pc-updater_index.js.patch + patch -u ${srcdir}/${_pkgname}/src/Powercord/plugins/pc-updater/components/Settings.jsx -i ${srcdir}/pc-updater_settings.jsx.patch } pkgver() { - cd "${srcdir}/${_pkgname}" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${srcdir}/${_pkgname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } package() { diff --git a/index.js.patch b/index.js.patch index 2ec78e0b08a4..efccef5b5250 100644 --- a/index.js.patch +++ b/index.js.patch @@ -1,12 +1,23 @@ ---- /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')(); +--- /opt/powercord/src/Powercord/index.js 2020-08-15 18:33:09.000000000 +0200 ++++ ./index.js 2020-08-15 22:14:22.762386298 +0200 +@@ -54,9 +54,9 @@ + this.api = {}; + this.gitInfos = { +- upstream: '???', +- branch: '???', +- revision: '???' ++ upstream: 'powercord-org/powercord', ++ branch: 'v2', ++ revision: 'REVISION_NUMBER' + }; + this.initialized = false; + this.styleManager = new StyleManager(); +@@ -89,7 +89,6 @@ + // Start + await this.startup(); + this.fetchAccount(); +- this.gitInfos = await this.pluginManager.get('pc-updater').getGitInfos(); + + // Token manipulation stuff + if (this.settings.get('hideToken', true)) { diff --git a/injector_index.js.patch b/injector_index.js.patch new file mode 100644 index 000000000000..2ec78e0b08a4 --- /dev/null +++ b/injector_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/injector_main.js.patch index 56cd83fd8333..56cd83fd8333 100644 --- a/main.js.patch +++ b/injector_main.js.patch diff --git a/pc-settings_index.js.patch b/pc-settings_index.js.patch new file mode 100644 index 000000000000..eca6ef7aa5c9 --- /dev/null +++ b/pc-settings_index.js.patch @@ -0,0 +1,11 @@ +--- /opt/powercord/src/Powercord/plugins/pc-settings/index.js 2020-08-15 18:33:09.000000000 +0200 ++++ ./pc-settings_index.js 2020-08-15 21:52:04.345728155 +0200 +@@ -108,7 +108,7 @@ + props: Object.assign({}, res.props.children[0].props, { + children: [ 'Powercord', ' ', React.createElement('span', { + className: res.props.children[0].props.children[4].props.className, +- children: [ powercord.gitInfos.branch, ' (', latestCommitHash, ')' ] ++ children: [ powercord.gitInfos.branch, ' (', latestCommitHash, ', AUR)' ] + }) ] + }) + }) diff --git a/pc-updater_index.js.patch b/pc-updater_index.js.patch new file mode 100644 index 000000000000..5fb945baa913 --- /dev/null +++ b/pc-updater_index.js.patch @@ -0,0 +1,12 @@ +--- /opt/powercord/src/Powercord/plugins/pc-updater/index.js 2020-08-15 18:33:09.000000000 +0200 ++++ ./pc-updater_index.js 2020-08-15 21:53:34.084949377 +0200 +@@ -70,9 +70,6 @@ + const themes = [ ...powercord.styleManager.themes.values() ].filter(t => t.isTheme); + + const entities = plugins.concat(themes).filter(e => !disabled.includes(e.updateIdentifier) && e.isUpdatable()); +- if (!disabled.includes(powercord.updateIdentifier)) { +- entities.push(powercord); +- } + + let done = 0; + const updates = []; diff --git a/pc-updater_settings.jsx.patch b/pc-updater_settings.jsx.patch new file mode 100644 index 000000000000..3ed8a4fc508f --- /dev/null +++ b/pc-updater_settings.jsx.patch @@ -0,0 +1,38 @@ +--- /opt/powercord/src/Powercord/plugins/pc-updater/components/Settings.jsx 2020-08-15 18:33:09.000000000 +0200 ++++ ./pc-updater_settings.jsx 2020-08-15 21:48:42.927277433 +0200 +@@ -83,7 +83,7 @@ + <div className="about"> + <div> + <span>{Messages.POWERCORD_UPDATES_UPSTREAM}</span> +- <span>{powercord.gitInfos.upstream.replace(REPO_URL, Messages.POWERCORD_UPDATES_UPSTREAM_OFFICIAL)}</span> ++ <span>{powercord.gitInfos.upstream.replace(REPO_URL, Messages.POWERCORD_UPDATES_UPSTREAM_OFFICIAL)} (AUR)</span> + </div> + <div> + <span>{Messages.POWERCORD_UPDATES_REVISION}</span> +@@ -200,17 +200,6 @@ + > + {Messages.POWERCORD_UPDATES_OPTS_CHANGE_LOGS} + </ButtonItem> +- <ButtonItem +- note={Messages.POWERCORD_UPDATES_OPTS_RELEASE_DESC} +- button={powercord.gitInfos.branch === 'v2' +- ? Messages.POWERCORD_UPDATES_OPTS_RELEASE_DEVELOP_BTN +- : Messages.POWERCORD_UPDATES_OPTS_RELEASE_STABLE_BTN} +- onClick={() => this.askChangeChannel( +- () => this.plugin.changeBranch(powercord.gitInfos.branch === 'v2' ? 'v2-dev' : 'v2') +- )} +- > +- {Messages.POWERCORD_UPDATES_OPTS_RELEASE} +- </ButtonItem> + + <Category + name={Messages.POWERCORD_UPDATES_OPTS_DEBUG} +@@ -394,7 +383,7 @@ + + <b>Git </b> + <div className='row'> +- <div className='column'>Upstream: {powercord.gitInfos.upstream.replace(REPO_URL, 'Official')}</div> ++ <div className='column'>Upstream: {powercord.gitInfos.upstream.replace(REPO_URL, 'Official')} (AUR)</div> + <div className='column'>Revision: + <a + href={`https://github.com/${powercord.gitInfos.upstream}/commit/${powercord.gitInfos.revision}`} |