62 lines
1.7 KiB
Bash
62 lines
1.7 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
# Contributor: Jayson Reis <santosdosreis@gmail.com>
|
|
|
|
pkgname=commitizen
|
|
pkgver=2.20.2
|
|
pkgrel=1
|
|
pkgdesc="A tool for enforcing descriptive commit messages and version/changelog management"
|
|
arch=('any')
|
|
url="https://github.com/commitizen-tools/commitizen"
|
|
license=('MIT')
|
|
depends=(
|
|
'python'
|
|
'python-questionary'
|
|
'python-decli'
|
|
'python-colorama'
|
|
'python-termcolor'
|
|
'python-packaging'
|
|
'python-tomlkit'
|
|
'python-jinja'
|
|
'python-pyaml'
|
|
'python-argcomplete'
|
|
'python-prompt_toolkit'
|
|
)
|
|
makedepends=(
|
|
'python-install'
|
|
'python-build'
|
|
'python-poetry'
|
|
)
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
|
sha512sums=('f0fe734dbd28abeff38140939a26043eecc513d1bca2527b73ad6f91866c51a9dd7b1ac017d0f25eae20ec5cedc635e2ea3639a59bccd8ce2ca2ec3227888277')
|
|
b2sums=('10e280b63445a2304e74e3a6b753de48b2cde1b539b4de6eaa30dba407ba3c5af9d1638874588687ec3c40b1c654cbf905a500ed4bd669f1e6b5b87f47f5974f')
|
|
|
|
prepare () {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
# create completions
|
|
mkdir completions
|
|
register-python-argcomplete --shell bash cz > completions/bash
|
|
register-python-argcomplete --shell fish cz > completions/fish
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
python -m install \
|
|
--optimize=1 \
|
|
--destdir="$pkgdir" \
|
|
dist/*.whl
|
|
|
|
# license
|
|
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
|
|
|
# shell completions
|
|
install -vDm644 completions/bash "$pkgdir/usr/share/bash-completion/completions/cz"
|
|
install -vDm644 completions/fish "$pkgdir/usr/share/fish/vendor_completions.d/cz.fish"
|
|
}
|