diff options
author | Matthew hague | 2015-07-30 14:37:55 +0100 |
---|---|---|
committer | Matthew hague | 2015-07-30 14:37:55 +0100 |
commit | bf476da92b06457593094ba0bfb9cd212a1b7fdd (patch) | |
tree | 112fd09e378b2ad207ca1cdfff4eec9e30b1b74c | |
download | aur-bf476da92b06457593094ba0bfb9cd212a1b7fdd.tar.gz |
initial import
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | imapnotify@.service | 14 | ||||
-rw-r--r-- | nodejs-imapnotify-git.install | 21 |
4 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d5ea6b51d9b4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = nodejs-imapnotify-git + pkgdesc = Execute scripts on new messages using IDLE imap command + pkgver = 0.1.0 + pkgrel = 1 + url = http://github.com/a-sk/node-imapnotify + install = nodejs-imapnotify-git.install + arch = any + license = MIT + depends = nodejs + conflicts = nodejs-imapnotify + source = nodejs-imapnotify-git::git://github.com/a-sk/node-imapnotify.git + source = imapnotify@.service + sha256sums = SKIP + sha256sums = ef5d751f86fcff398ddaf3114c3bc90ce685b85739f76e8c6f1f80cea5c1cb27 + +pkgname = nodejs-imapnotify-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..79b9de8557d9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Matthew Hague <matthewhague@zoho.com> + +_npmname=imapnotify +pkgname=nodejs-imapnotify-git +pkgver=0.1.0 +pkgrel=1 +pkgdesc='Execute scripts on new messages using IDLE imap command' +arch=(any) +url='http://github.com/a-sk/node-imapnotify' +license=('MIT') +depends=('nodejs') +optdepends=() +install=$pkgname.install +conflicts=('nodejs-imapnotify') +source=($pkgname::git://github.com/a-sk/node-imapnotify.git + imapnotify@.service) +sha256sums=('SKIP' + 'ef5d751f86fcff398ddaf3114c3bc90ce685b85739f76e8c6f1f80cea5c1cb27') + +package() { + cd $srcdir + local _npmdir="$pkgdir/usr/lib/node_modules/" + mkdir -p $_npmdir + cd $_npmdir + PYTHON=/usr/bin/python2 npm install -g --prefix "$pkgdir/usr" $_npmname@$pkgver + install -Dm644 "${srcdir}/imapnotify@.service" "${pkgdir}/usr/lib/systemd/system/imapnotify@.service" +} diff --git a/imapnotify@.service b/imapnotify@.service new file mode 100644 index 000000000000..5d14588babac --- /dev/null +++ b/imapnotify@.service @@ -0,0 +1,14 @@ +[Unit] +Description=Execute scripts on new messages using IDLE imap command +After=network.target + +[Service] +User=username +Type=simple +ExecStart=/usr/bin/imapnotify -c ~/.config/imap_inotify/%I.json +Restart=on-failure +RestartSec=20 + +[Install] +WantedBy=default.target + diff --git a/nodejs-imapnotify-git.install b/nodejs-imapnotify-git.install new file mode 100644 index 000000000000..33b4715be95a --- /dev/null +++ b/nodejs-imapnotify-git.install @@ -0,0 +1,21 @@ +# Some colored makepkg-like functions +msg_blue() { + printf "${BLUE}==>${ALL_OFF}${BOLD} ${1}${ALL_OFF}\n" +} + +note() { + printf "${BLUE}==>${ALL_OFF}${YELLOW} NOTE:${ALL_OFF}${BOLD} ${1}${ALL_OFF}\n" +} + +ALL_OFF="$(tput sgr0)" +BOLD="$(tput bold)" +BLUE="${BOLD}$(tput setaf 4)" +YELLOW="${BOLD}$(tput setaf 3)" + +post_install() { + note "Copy /usr/lib/systemd/system/imapnotify@.service to /etc/systemd/system and replace User=username with your username" +} + +post_upgrade() { + post_install +} |