blob: 295afe53174427795d12f6eb2d74593a2fc21cea (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Maintainer: Ilaï Deutel <PlMWPh1WSmypRv0JQljz> (echo ... | tr 'A-Za-z' 'l-za-kL-ZA-K' | base64 -d)
pkgname='git-machete'
pkgver=3.36.0
pkgrel=1
pkgdesc="Git repository organizer & rebase/merge workflow automation tool"
arch=('any')
url='https://github.com/VirtusLab/git-machete'
license=('MIT')
depends=('git' 'python')
makedepends=(python-build python-installer python-wheel python-setuptools)
optdepends=('bash: bash completion'
'fish: fish completion'
'zsh: zsh completion')
checkdepends=('python-pytest' 'python-pytest-mock' 'python-pytest-xdist')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/VirtusLab/$pkgname/archive/v$pkgver.tar.gz"
"setup_packages.patch")
sha256sums=('5417f9b94e907a5ba5a5229b98c49df57a0a95ea382ce9d11b0936e4d0f69535'
'85d234fb2bdc8cef581056cadbc45003cd2ad36e5feb7330a71f64e7c9ac8dda')
prepare() {
cd "$srcdir/$pkgname-${pkgver}"
patch -Np1 -i ../setup_packages.patch
}
build() {
cd "$srcdir/$pkgname-${pkgver}"
python -m build --wheel --no-isolation
}
check() {
cd "$srcdir/$pkgname-${pkgver}"
GIT_CONFIG_GLOBAL=/dev/null pytest --numprocesses=auto -m 'not completion_e2e' -vv
}
package() {
cd "$srcdir/$pkgname-${pkgver}"
# Install the package
python -m installer --destdir="$pkgdir" dist/*.whl
# Install bash, zsh and fish completions
install -Dm644 "completion/git-machete.completion.bash" "$pkgdir/usr/share/bash-completion/completions/git-machete"
install -Dm644 "completion/git-machete.completion.zsh" "$pkgdir/usr/share/zsh/site-functions/_git-machete"
install -Dm644 "completion/git-machete.fish" "$pkgdir//usr/share/fish/vendor_completions.d/git-machete.fish"
# Add the license
install -Dm 644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Add the man page
install -Dm 644 "docs/man/git-machete.1" "$pkgdir/usr/share/man/man1/git-machete.1"
}
|