George Rawlinson
8e3d498282
* New upstream release. * Switch to python-installer from python-install.
77 lines
1.7 KiB
Bash
77 lines
1.7 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
# Contributor: Jayson Reis <santosdosreis@gmail.com>
|
|
|
|
_pkgname=commitizen
|
|
pkgname=python-commitizen
|
|
pkgver=2.24.0
|
|
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=(
|
|
'git'
|
|
'python-build'
|
|
'python-poetry-core'
|
|
'python-installer'
|
|
)
|
|
provides=('cz' 'git-cz')
|
|
conflicts=('nodejs-commitizen' 'commitizen-go')
|
|
_commit='66c63209fe811cc59c5caadceffe7a88280de043'
|
|
source=("$pkgname::git+$url.git#commit=$_commit")
|
|
b2sums=('SKIP')
|
|
|
|
pkgver() {
|
|
cd "$pkgname"
|
|
|
|
git describe --tags | sed 's/^v//'
|
|
}
|
|
|
|
prepare() {
|
|
cd "$pkgname"
|
|
|
|
# create completions
|
|
mkdir completions
|
|
register-python-argcomplete --shell bash cz > completions/bash
|
|
register-python-argcomplete --shell fish cz > completions/fish
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname"
|
|
|
|
python -m build \
|
|
--wheel \
|
|
--skip-dependency-check \
|
|
--no-isolation
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname"
|
|
|
|
python -m installer \
|
|
--destdir="$pkgdir" \
|
|
dist/*.whl
|
|
|
|
# fix permissions issue
|
|
find "$pkgdir/usr/bin" -type f -exec chmod 0755 {} +
|
|
|
|
# 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"
|
|
}
|