summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6c6ad539976ebb1c3b673d1ada1f2edc01b75ee1 (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
34
35
36
37
38
39
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: TransistorLogic <liuhongwu2003@outlook.com>
# Maintainer: Sving1024 <piano5432@outlook.com>

# Author: Luogu Development Team <k@luogu.org> (https://github.com/luogu-dev)
# The copyright of this library belongs to Luogu (https://www.luogu.com.cn/).
# The library is released under LGPLv3.

_name=cyaron
pkgname=python-${_name}-git
pkgver=0.5.0.r6.g79b7a24
pkgrel=1
pkgdesc="Random Olympic-informatics test data generator"
url="https://github.com/luogu-dev/cyaron"
license=('LGPL3')
arch=('any')
depends=('python' 'python-colorful' 'python-xeger')
makedepends=('python-setuptools')
source=("${_name}::git+https://github.com/luogu-dev/cyaron.git")
sha256sums=('SKIP')
validpgpkeys=('517E4E3C364C6C55C907284915AC252CE20E3FC8')
provides=('python-cyaron')
conflicts=('python-cyaron')

pkgver() {
  	cd ${srcdir}/${_name}
  	git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd ${srcdir}/${_name}
	python -m build --wheel --no-isolation
}

package() {
	cd ${srcdir}/$_name
    python -m installer --destdir="$pkgdir" dist/*.whl
	install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}