summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 16ae5b5383ef950d4c6e183c54ca900bd0fa5500 (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
# Maintainer: Polyfish0 <igamblenull@gmail.com>
pkgname="python-pyotrs-git"
pkgdesc="Interacting with OTRS from Python"
source=("python-pyotrs-git::git+https://gitlab.com/rhab/PyOTRS.git")
url="https://gitlab.com/rhab/PyOTRS"
provides=(python-pyotrs)
depends=("python>=3.7" python-requests python-deprecation)
makedepends=(python-build python-installer python-wheel python-poetry git)
arch=(any)
license=(MIT)
pkgver=0.4.1.r187.g2034a3d
pkgrel=1
sha256sums=("SKIP")

build() {
    cd "$pkgname"
    python -m build --wheel --no-isolation
}

package() {
    cd "$pkgname"

    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    python -m installer --destdir="$pkgdir" dist/*.whl
}

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