diff options
author | Rhinoceros | 2016-10-10 11:23:45 +1100 |
---|---|---|
committer | Rhinoceros | 2016-10-10 11:23:45 +1100 |
commit | c11a03499b0ba078fb5fd98e461f2476be6cba5e (patch) | |
tree | 9fdac78ed9b8b1f07a45fe96a2061d848ba99cad | |
parent | 7d2ad5fdc0fc9e82a5d2da7df29af9ffb1ef0320 (diff) | |
download | aur-c11a03499b0ba078fb5fd98e461f2476be6cba5e.tar.gz |
Update to 0.0.3-2
* Add systemd.service (N.B. it works, but doesn't seem to log correctly)
* Add install file with information for systemd setup
* Add contributor, whose service and install files I copied
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | pyimapnotify@.service | 12 | ||||
-rw-r--r-- | python-imapnotify.install | 21 |
4 files changed, 51 insertions, 7 deletions
@@ -1,10 +1,11 @@ # Generated by mksrcinfo v8 -# Sun Oct 9 20:35:50 UTC 2016 +# Mon Oct 10 00:23:39 UTC 2016 pkgbase = python-imapnotify - pkgdesc = Execute scripts on new messages using IDLE imap command (python version) + pkgdesc = Execute scripts on new messages using IDLE imap command (Python version) pkgver = 0.0.3 - pkgrel = 1 + pkgrel = 2 url = https://github.com/a-sk/python-imapnotify + install = python-imapnotify.install arch = any license = custom makedepends = python-setuptools @@ -16,7 +17,9 @@ pkgbase = python-imapnotify depends = python-boltons<17.0.0 depends = python-boltons>=16.5.0 source = https://github.com/a-sk/python-imapnotify/archive/0.0.3.tar.gz + source = pyimapnotify@.service md5sums = 575aa9656a9fa89b48eb59f309f8797f + md5sums = f251275ae5c146ed62e7f567ae9957ce pkgname = python-imapnotify @@ -1,21 +1,29 @@ # Maintainer: Rhinoceros <https://aur.archlinux.org/account/rhinoceros> +# Contributor: Matthew Hague <matthewhague@zoho.com> pkgname=python-imapnotify pkgver=0.0.3 -pkgrel=1 -pkgdesc='Execute scripts on new messages using IDLE imap command (python version)' +pkgrel=2 +pkgdesc='Execute scripts on new messages using IDLE imap command (Python version)' arch=('any') url='https://github.com/a-sk/python-imapnotify' license=('custom') depends=('python>=3.5' 'python-pytest-runner>=2.0' 'python-pytest-runner<3' 'python-aioimaplib>=0.5.14' 'python-aioimaplib<1.0.0' 'python-boltons<17.0.0' 'python-boltons>=16.5.0') makedepends=('python-setuptools') -source=("https://github.com/a-sk/${pkgname}/archive/${pkgver}.tar.gz") -md5sums=('575aa9656a9fa89b48eb59f309f8797f') +install=$pkgname.install +source=("https://github.com/a-sk/${pkgname}/archive/${pkgver}.tar.gz" + 'pyimapnotify@.service') +md5sums=('575aa9656a9fa89b48eb59f309f8797f' + 'f251275ae5c146ed62e7f567ae9957ce') package() { cd "${pkgname}-${pkgver}" python setup.py install --root="${pkgdir}" --optimize=1 + # Install systemd.service + install -Dm644 "${srcdir}/pyimapnotify@.service" "${pkgdir}/usr/lib/systemd/user/pyimapnotify@.service" + + # Install licence install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/" } diff --git a/pyimapnotify@.service b/pyimapnotify@.service new file mode 100644 index 000000000000..2925e7495887 --- /dev/null +++ b/pyimapnotify@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Execute scripts on new messages using IDLE imap command (Python version) +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/pyimapnotify -c %h/.config/imapnotify/%I +Restart=on-failure +RestartSec=20 + +[Install] +WantedBy=default.target diff --git a/python-imapnotify.install b/python-imapnotify.install new file mode 100644 index 000000000000..6ff427dabe6d --- /dev/null +++ b/python-imapnotify.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 'To use with systemd, place a config file at ~/.config/imapnotify/<config>.json and use systemctl --user enable imapnotify@<config>.json' +} + +post_upgrade() { + post_install +} |