summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 15ac4f85bca6637fd028161f3e85417e181bab32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Maintainer: robertoszek <robertoszek@robertoszek.xyz>
pkgname=python-pleroma-bot
_name=${pkgname#python-}
pkgver=1.1.0
pkgrel=1
pkgdesc="Bot for mirroring one or multiple Twitter accounts in Pleroma/Mastodon."
arch=("any")
url="https://github.com/robertoszek/$_name"
license=("MIT")
depends=("python")
makedepends=("python-setuptools")
conflicts=("${pkgname}" "${pkgname}-git")
backup=("etc/pleroma-bot/config.yml" "usr/lib/systemd/system/pleroma-bot.service")
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=("a0f6553b868ecd97765df49afadb1aca45ad8a262bd0dd6fea919a58a2437bd7")

build() {
  cd "${srcdir}/${_name}-${pkgver}"
  # python setup.py build
  python -m setuptools.launch setup.py build
}

package() {
  depends=("python-oauthlib" "python-requests-oauthlib" "python-requests" "python-pyaml")
  cd "${srcdir}/${_name}-${pkgver}"
  python setup.py install --root="${pkgdir}/" --optimize=1 || return 1
  mkdir -p "${pkgdir}/var/log/pleroma-bot"
  install -Dm 600 "${srcdir}/${_name}-${pkgver}/config-minimal.yml.sample" ${pkgdir}/etc/pleroma-bot/config.yml
  install -Dm 644 "${srcdir}/${_name}-${pkgver}/pleroma-bot.service" "${pkgdir}/usr/lib/systemd/system/pleroma-bot.service"
}