2021-07-24 10:00:43 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
2021-09-27 23:54:24 +00:00
|
|
|
# Contributor: Jayson Reis <santosdosreis@gmail.com>
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
pkgname=commitizen
|
2021-12-20 01:04:36 +00:00
|
|
|
pkgver=2.20.3
|
2021-12-14 02:10:32 +00:00
|
|
|
pkgrel=1
|
2021-07-24 10:00:43 +00:00
|
|
|
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'
|
2021-08-14 02:09:50 +00:00
|
|
|
'python-questionary'
|
|
|
|
'python-decli'
|
2021-07-24 10:00:43 +00:00
|
|
|
'python-colorama'
|
|
|
|
'python-termcolor'
|
|
|
|
'python-packaging'
|
|
|
|
'python-tomlkit'
|
|
|
|
'python-jinja'
|
|
|
|
'python-pyaml'
|
|
|
|
'python-argcomplete'
|
|
|
|
'python-prompt_toolkit'
|
|
|
|
)
|
2021-09-27 23:54:24 +00:00
|
|
|
makedepends=(
|
2021-12-14 02:10:32 +00:00
|
|
|
'python-install'
|
2021-09-27 23:54:24 +00:00
|
|
|
'python-build'
|
|
|
|
'python-poetry'
|
|
|
|
)
|
2021-10-06 23:24:06 +00:00
|
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
2021-12-20 01:04:36 +00:00
|
|
|
sha512sums=('e7cb917541f97e658b970d18694e989d2f4960ffc4a979f99dab8bea1e8e717c83bf221384462734782154bd2509d088a96ef1cc984beebaef3b2971b3efb76d')
|
|
|
|
b2sums=('3418447960d6832213c694f769ee0cc259e4647cb2bbe0221856af1d9a3dc591a2a8f1d48d599e8ae1acc346807691bf42e3958152165c8fa6da3950dd951a6e')
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2021-09-27 23:54:24 +00:00
|
|
|
prepare () {
|
|
|
|
cd "$pkgname-$pkgver"
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2021-09-27 23:54:24 +00:00
|
|
|
# create completions
|
|
|
|
mkdir completions
|
|
|
|
register-python-argcomplete --shell bash cz > completions/bash
|
|
|
|
register-python-argcomplete --shell fish cz > completions/fish
|
|
|
|
}
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$pkgname-$pkgver"
|
2021-09-27 23:54:24 +00:00
|
|
|
|
|
|
|
python -m build --wheel --skip-dependency-check --no-isolation
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$pkgname-$pkgver"
|
|
|
|
|
2021-12-14 02:10:32 +00:00
|
|
|
python -m install \
|
|
|
|
--optimize=1 \
|
|
|
|
--destdir="$pkgdir" \
|
2021-07-24 10:00:43 +00:00
|
|
|
dist/*.whl
|
2021-08-14 02:09:50 +00:00
|
|
|
|
2021-07-24 10:00:43 +00:00
|
|
|
# license
|
|
|
|
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
2021-09-27 23:54:24 +00:00
|
|
|
|
|
|
|
# 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"
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|