summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Hague2017-10-28 11:06:03 +0100
committerMatthew Hague2017-10-28 11:08:09 +0100
commit17419fe8de5799db6a659a11cc1255deea05e13b (patch)
treeb27ac122e85c3dc59a30ce482b5c88f6b9e067e4
parent4e4c2fffeb81aef8be0095b504428744d310168e (diff)
downloadaur-17419fe8de5799db6a659a11cc1255deea05e13b.tar.gz
Fix pkgver and Rhinoceros comment on 2017-10-28 09:44
Added pkgver() function as per wiki. Reintroduced $_npmname argument to npm install, which appears to avoid the creation of symlinks to non-existent directories.
-rw-r--r--PKGBUILD12
1 files changed, 9 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 888798e33870..22fb5f292935 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,9 @@
# Maintainer: Matthew Hague <matthewhague@zoho.com>
+_npmname=imapnotify
pkgname=nodejs-imapnotify-git
-pkgver=0.2.0
-pkgrel=4
+pkgver=r30.a37456c
+pkgrel=1
pkgdesc='Execute scripts on new messages using IDLE imap command'
arch=(any)
url='http://github.com/a-sk/node-imapnotify'
@@ -17,10 +18,15 @@ source=($pkgname::git://github.com/a-sk/node-imapnotify.git
sha256sums=('SKIP'
'e101ef974e5c342f7a69177fb5ae1c341b4c39c911993eaa97a0917bddc5cc11')
+pkgver() {
+ cd "$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
package() {
local _npmdir="$pkgdir/usr/lib/node_modules/"
mkdir -p $_npmdir
cd $srcdir/$pkgname
- PYTHON=/usr/bin/python2 npm install -g --prefix "$pkgdir/usr" #$_npmname@$pkgver
+ PYTHON=/usr/bin/python2 npm install -g --prefix "$pkgdir/usr" $_npmname
install -Dm644 "${srcdir}/imapnotify@.service" "${pkgdir}/usr/lib/systemd/user/imapnotify@.service"
}