diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 7 | ||||
-rw-r--r-- | notion-enhancer | 4 | ||||
-rw-r--r-- | reapply-notion-enhancer-2.hook | 11 | ||||
-rw-r--r-- | reapply-notion-enhancer.hook | 6 |
5 files changed, 24 insertions, 10 deletions
@@ -1,7 +1,7 @@ pkgbase = notion-enhancer pkgdesc = An enhancer/customiser for the all-in-one productivity workspace notion.so pkgver = 0.10.2 - pkgrel = 3 + pkgrel = 4 url = https://github.com/notion-enhancer/notion-enhancer install = notion-enhancer arch = any @@ -14,8 +14,10 @@ pkgbase = notion-enhancer noextract = notion-enhancer-0.10.2.tgz source = https://registry.npmjs.org/notion-enhancer/-/notion-enhancer-0.10.2.tgz source = reapply-notion-enhancer.hook + source = reapply-notion-enhancer-2.hook md5sums = 4dbc118072fdc9ffd9af0efd4c0c8997 - md5sums = 704ad896f7cd8ebb0c157b882ab22d85 + md5sums = fb1bff2ff2865bf25e8fdc76bf2641a3 + md5sums = f0ea114ae5cc18202ccbd9f702ba11b4 pkgname = notion-enhancer @@ -1,7 +1,7 @@ # Maintainer: Nek.12 <vaizin.nikita@gmail.com> pkgname='notion-enhancer' pkgver=0.10.2 -pkgrel=3 +pkgrel=4 pkgdesc="An enhancer/customiser for the all-in-one productivity workspace notion.so" arch=('any') url="https://github.com/notion-enhancer/notion-enhancer" @@ -18,9 +18,9 @@ backup=() options=() install=$pkgname source=("https://registry.npmjs.org/notion-enhancer/-/$pkgname-$pkgver.tgz" - "reapply-notion-enhancer.hook") + "reapply-notion-enhancer.hook" "reapply-notion-enhancer-2.hook") noextract=("${pkgname}-${pkgver}.tgz" ) -md5sums=('4dbc118072fdc9ffd9af0efd4c0c8997' '704ad896f7cd8ebb0c157b882ab22d85') #tgz, hook +md5sums=('4dbc118072fdc9ffd9af0efd4c0c8997' 'fb1bff2ff2865bf25e8fdc76bf2641a3' 'f0ea114ae5cc18202ccbd9f702ba11b4') #tgz, hook, hook2 package() { npm install --ignore-scripts -g --user root --cache "${srcdir}/npm-cache" --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz" @@ -40,4 +40,5 @@ package() { #add pacman hooks install -Dm 644 "${srcdir}/reapply-notion-enhancer.hook" -t "${pkgdir}/usr/share/libalpm/hooks" + install -Dm 644 "${srcdir}/reapply-notion-enhancer-2.hook" -t "${pkgdir}/usr/share/libalpm/hooks" } diff --git a/notion-enhancer b/notion-enhancer index 1efba70b3925..17a84395a0d5 100644 --- a/notion-enhancer +++ b/notion-enhancer @@ -10,8 +10,7 @@ yellow="${bold}$(tput setaf 3)" post_install() { echo "Applying notion-enhancer automatically..." - warn "The installer will own the files necessary for it to work with chmod -R a+wr. Ignore the warnings if any" - chmod -R a+wr /usr/lib/node_modules/notion-enhancer/ /opt/notion-app/ /usr/share/applications/notion-app.desktop /usr/bin/notion-app + warn "If you want to use the enhancer without running sudo (recommended by the developer), then run \n chmod -R a+wr /usr/lib/node_modules/notion-enhancer/ /opt/notion-app/app /usr/share/applications/notion-app.desktop /usr/bin/notion-app \n However, be wary of the security risks posed by such patch." notion-enhancer apply -y } @@ -22,6 +21,7 @@ post_upgrade() { echo "Reapplying notion-enhancer" notion-enhancer remove -n # don't delete the data notion-enhancer apply -y # yes, overwrite + warn "If you want to use the enhancer without running sudo (recommended by the developer), then run: \n chmod -R a+wr /usr/lib/node_modules/notion-enhancer/ /opt/notion-app/app /usr/share/applications/notion-app.desktop /usr/bin/notion-app \n However, be wary of the security risks posed by such patch." fi } diff --git a/reapply-notion-enhancer-2.hook b/reapply-notion-enhancer-2.hook new file mode 100644 index 000000000000..216e1111f920 --- /dev/null +++ b/reapply-notion-enhancer-2.hook @@ -0,0 +1,11 @@ +[Trigger] +Operation = Upgrade +Type = Package +Target = notion-app +[Action] +Description = Reapplying notion-enhancer... +When = PostTransaction +Exec = /usr/bin/notion-enhancer apply -y +Depends = notion-enhancer +Depends = notion-app + diff --git a/reapply-notion-enhancer.hook b/reapply-notion-enhancer.hook index 456eb2f9d42e..2600565b5afe 100644 --- a/reapply-notion-enhancer.hook +++ b/reapply-notion-enhancer.hook @@ -3,8 +3,8 @@ Operation = Upgrade Type = Package Target = notion-app [Action] -Description = Reapplying notion-enhancer... -When = PostTransaction -Exec = /bin/sh -c 'chmod -R a+wr /usr/lib/node_modules/notion-enhancer/ /opt/notion-app/ /usr/share/applications/notion-app.desktop /usr/bin/notion-app && /usr/bin/notion-enhancer remove -n && /usr/bin/notion-enhancer apply -n' +Description = Removing notion-enhancer... +When = PreTransaction +Exec = /usr/bin/notion-enhancer remove -n Depends = notion-enhancer Depends = notion-app |