diff options
author | Nek-12 | 2020-11-02 13:39:20 +0300 |
---|---|---|
committer | Nek-12 | 2020-11-02 13:39:20 +0300 |
commit | e9e1ae34e2c6a1e7d34bdcbe56d3fcca861d2bf1 (patch) | |
tree | 819d67be2a601878d96c0585a18bc369ce4d162d | |
parent | 66f97497133f5888c177c6a8139d2112ccd5967f (diff) | |
download | aur-e9e1ae34e2c6a1e7d34bdcbe56d3fcca861d2bf1.tar.gz |
v0.10.0, pacman hook (notion-app), auto-permissions
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | notion-enhancer | 16 | ||||
-rw-r--r-- | reapply-notion-enhancer.hook | 10 |
5 files changed, 42 insertions, 11 deletions
@@ -1,7 +1,7 @@ pkgbase = notion-enhancer pkgdesc = An enhancer/customiser for the all-in-one productivity workspace notion.so - pkgver = 0.9.1 - pkgrel = 1 + pkgver = 0.10.0 + pkgrel = 2 url = https://github.com/dragonwocky/notion-enhancer install = notion-enhancer arch = any @@ -11,9 +11,11 @@ pkgbase = notion-enhancer depends = notion-app>=1:2.0.7-3.2 depends = nodejs>=14.8.0-1 depends = asar>=3.0.3-1 - noextract = notion-enhancer-0.9.1.tgz - source = https://registry.npmjs.org/notion-enhancer/-/notion-enhancer-0.9.1.tgz - md5sums = e5567054115ca1e12d3bf85d9e1b7d6a + noextract = notion-enhancer-0.10.0.tgz + source = https://registry.npmjs.org/notion-enhancer/-/notion-enhancer-0.10.0.tgz + source = reapply-notion-enhancer.hook + md5sums = f1b3d3346846970feed95302bd654da6 + md5sums = b7bf09c180c52d43e569fa1165970f40 pkgname = notion-enhancer diff --git a/.gitignore b/.gitignore index 81991aa354fd..6f680a316e71 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ !PKGBUILD !.SRCINFO !notion-enhancer +!reapply-notion-enhancer.hook @@ -1,11 +1,11 @@ # Maintainer: Nek.12 <vaizin.nikita@gmail.com> pkgname='notion-enhancer' -pkgver=0.9.1 -pkgrel=1 +pkgver=0.10.0 +pkgrel=2 pkgdesc="An enhancer/customiser for the all-in-one productivity workspace notion.so" arch=('any') url="https://github.com/dragonwocky/notion-enhancer" -license=(MIT) +license=('MIT') groups=() depends=('notion-app>=1:2.0.7-3.2' 'nodejs>=14.8.0-1' @@ -17,9 +17,10 @@ replaces=() backup=() options=() install=$pkgname -source=("https://registry.npmjs.org/notion-enhancer/-/$pkgname-$pkgver.tgz") +source=("https://registry.npmjs.org/notion-enhancer/-/$pkgname-$pkgver.tgz" + "reapply-notion-enhancer.hook") noextract=("${pkgname}-${pkgver}.tgz" ) -md5sums=('e5567054115ca1e12d3bf85d9e1b7d6a') +md5sums=('f1b3d3346846970feed95302bd654da6' 'b7bf09c180c52d43e569fa1165970f40') #tgz, hook package() { npm install --ignore-scripts -g --user root --cache "${srcdir}/npm-cache" --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz" @@ -36,4 +37,7 @@ package() { jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage" mv "$tmppackage" "$pkgjson" chmod 644 "$pkgjson" + + #add pacman hooks + install -Dm 644 "${srcdir}/reapply-notion-enhancer.hook" -t "${pkgdir}/usr/share/libalpm/hooks" } diff --git a/notion-enhancer b/notion-enhancer index 4d1993d8bcaf..10169e8062f5 100644 --- a/notion-enhancer +++ b/notion-enhancer @@ -1,6 +1,19 @@ +#colored warning +warn() { + printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n" +} + +all_off="$(tput sgr0)" +bold="${all_off}$(tput bold)" +blue="${bold}$(tput setaf 4)" +yellow="${bold}$(tput setaf 3)" + post_install() { echo "Applying notion-enhancer automatically..." notion-enhancer apply -y + warn "The installer will own the files necessary for it to work with chmod -R a+wr" + chmod -R a+wr /usr/lib/node_modules/notion-enhancer/ /opt/notion-app/ + chmod a+wr /usr/share/applications/notion-app.desktop /usr/bin/notion-app } post_upgrade() { @@ -14,5 +27,6 @@ post_upgrade() { pre_remove() { echo "Disabling notion-enhancer..." - notion-enhancer remove -y + warn "The data folder will NOT be deleted" + notion-enhancer remove -n } diff --git a/reapply-notion-enhancer.hook b/reapply-notion-enhancer.hook new file mode 100644 index 000000000000..b91dde78b3f4 --- /dev/null +++ b/reapply-notion-enhancer.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Upgrade +Type = Package +Target = notion-app +[Action] +Description = Reapplying notion-enhancer... +When = PostTransaction +Exec = /usr/bin/notion-enhancer apply -n +Depends = notion-enhancer +Depends = notion-app |