diff options
author | Marcus Hoffmann | 2020-10-31 18:58:06 +0100 |
---|---|---|
committer | Marcus Hoffmann | 2020-10-31 18:58:06 +0100 |
commit | 289e0d6ae881b052f7176ab5cb248f78d09d492f (patch) | |
tree | 2050c1cebab91c5093883b3dd59fd6fd51b6b3f9 | |
parent | 49ed80a942a545cad993cbe2b4382165456bfa75 (diff) | |
download | aur-289e0d6ae881b052f7176ab5cb248f78d09d492f.tar.gz |
install config and service file
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | matrix-reminder-bot.service | 15 |
3 files changed, 28 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = python-matrix-reminder-bot pkgdesc = Matrix bot to remind you about stuff. pkgver = 0.2.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/anoadragon453/matrix-reminder-bot arch = any license = Apache @@ -15,8 +15,11 @@ pkgbase = python-matrix-reminder-bot depends = python-apscheduler depends = python-pytz optdepends = python-psycopg2 + backup = etc/matrix-reminder-bot/config.yaml source = https://github.com/anoadragon453/matrix-reminder-bot/archive/v0.2.0.tar.gz + source = matrix-reminder-bot.service sha256sums = bf346bdf5dfa17219f0cc06c24751404e4d0e0dbcc9a41391c87145032df45b5 + sha256sums = ed58a6cb4c10418dfd32a306eba2a22909858881c2bb73eb49cbf7ecaad7bf7e pkgname = python-matrix-reminder-bot @@ -3,7 +3,7 @@ _pkgname=matrix-reminder-bot pkgname=python-matrix-reminder-bot pkgver=0.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="Matrix bot to remind you about stuff." url="https://github.com/anoadragon453/matrix-reminder-bot" depends=('python' 'python-matrix-nio' 'python-markdown' 'python-yaml' @@ -12,9 +12,12 @@ makedepends=('python-setuptools') optdepends=('python-psycopg2') license=('Apache') arch=('any') -source=("https://github.com/anoadragon453/${_pkgname}/archive/v${pkgver}.tar.gz") +backup=('etc/matrix-reminder-bot/config.yaml') +source=("https://github.com/anoadragon453/${_pkgname}/archive/v${pkgver}.tar.gz" + "matrix-reminder-bot.service") -sha256sums=('bf346bdf5dfa17219f0cc06c24751404e4d0e0dbcc9a41391c87145032df45b5') +sha256sums=('bf346bdf5dfa17219f0cc06c24751404e4d0e0dbcc9a41391c87145032df45b5' + 'ed58a6cb4c10418dfd32a306eba2a22909858881c2bb73eb49cbf7ecaad7bf7e') build() { cd "${srcdir}/${_pkgname}-${pkgver}" @@ -22,7 +25,9 @@ build() { } package() { + install -Dm644 ${_pkgname}.service "$pkgdir"/usr/lib/systemd/system/${_pkgname}.service cd "${srcdir}/${_pkgname}-${pkgver}" python setup.py install --root="${pkgdir}" --optimize=1 --skip-build - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 sample.config.yaml ${pkgdir}/etc/${_pkgname}/config.yaml + install -Dm644 sample.config.yaml ${pkgdir}/etc/${_pkgname}/config.yaml } diff --git a/matrix-reminder-bot.service b/matrix-reminder-bot.service new file mode 100644 index 000000000000..5fc90f6b6898 --- /dev/null +++ b/matrix-reminder-bot.service @@ -0,0 +1,15 @@ +[Unit] +Description=Matrix bot to remind you about stuff. +After=network-online.target +Requires=network-online.target + +[Service] +Type=simple +ExecStart=/usr/bin/matrix-reminder-bot /etc/matrix-reminder-bot/config.yaml +WorkingDirectory=/var/lib/matrix-reminder-bot +DynamicUser=true +ConfigurationDirectory=matrix-reminder-bot +StateDirectory=matrix-reminder-bot + +[Install] +WantedBy=multi-user.target |