summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d7ec5bb643fa7716119421882a6d4939d045735e (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
32
33
# Maintainer: Matt Quintanilla <matt @ matt quintanilla . xyz>
pkgname=python-nextcord-git
pkgver=r.
pkgrel=1
pkgdesc="A Python wrapper for the Discord API forked from discord.py "
arch=('any')
url="https://github.com/nextcord/nextcord"
license=('MIT')
depends=('python' 'python-aiohttp')
optdepends=('python-pynacl: Voice support'
            'libffi: Voice support')
makedepends=('git' 'python-wheel' 'python-build' 'python-installer')
source=("nextcord-git::git+https://github.com/nextcord/nextcord.git")
provides=('python-nextcord')
conflicts=('python-nextcord')
md5sums=('SKIP')

pkgver() {
  mkdir python-nextcord-git
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/nextcord-git"
python -m build
}

package() {
  cd "$srcdir/nextcord-git"
  install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}/" LICENSE
  python -m installer --destdir="$pkgdir" dist/*.whl
}