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
|
|
|
|
2022-01-17 21:19:34 +00:00
|
|
|
_pkgname=commitizen
|
|
|
|
pkgname=python-commitizen
|
|
|
|
pkgver=2.20.4
|
2022-01-17 21:26:48 +00:00
|
|
|
pkgrel=2
|
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'
|
2022-01-17 21:19:34 +00:00
|
|
|
'python-poetry-core'
|
2021-09-27 23:54:24 +00:00
|
|
|
)
|
2022-01-17 21:19:34 +00:00
|
|
|
provides=('cz' 'git-cz')
|
|
|
|
conflicts=('nodejs-commitizen' 'commitizen-go')
|
2021-10-06 23:24:06 +00:00
|
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
2022-01-17 21:19:34 +00:00
|
|
|
sha512sums=('d649455d67065c0469f7a962e01383c1fce02424931efaf27211eef0ea65ac329e7286014958659b6642b92565320e3addb878c955248c1e1c89a5f611cd7fb6')
|
|
|
|
b2sums=('df4550788f4a35043cd862850c9391906c119cd4de0fe6625a86a6edd7b34b343cf515d106fc7e7e21f2c915aeb723cb3cbf7bfecca2073ef6e368c2c0d598f9')
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2021-09-27 23:54:24 +00:00
|
|
|
prepare () {
|
2022-01-17 21:19:34 +00:00
|
|
|
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() {
|
2022-01-17 21:19:34 +00:00
|
|
|
cd "$_pkgname-$pkgver"
|
2021-09-27 23:54:24 +00:00
|
|
|
|
2022-01-17 21:19:34 +00:00
|
|
|
python -m build \
|
|
|
|
--wheel \
|
|
|
|
--skip-dependency-check \
|
|
|
|
--no-isolation
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-01-17 21:19:34 +00:00
|
|
|
cd "$_pkgname-$pkgver"
|
2021-07-24 10:00:43 +00:00
|
|
|
|
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
|
|
|
|
2022-01-17 21:26:48 +00:00
|
|
|
# fix permissions issue
|
|
|
|
find "$pkgdir/usr/bin" -type f -exec chmod 0755 {} +
|
|
|
|
|
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
|
|
|
}
|