aboutsummaryrefslogtreecommitdiffstats
path: root/testing/stgit/APKBUILD
blob: c7ebf5cff0acf057392a39e614b5aec7bb4523f6 (plain) (blame)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
# Contributor: Joseph Benden <joe@benden.us>
# Maintainer: Joseph Benden <joe@benden.us>
pkgname=stgit
pkgver=1.1
pkgrel=0
pkgdesc="Manage a stack of patches using GIT as a backend"
arch="noarch"
url="http://www.procode.org/stgit/"
license="GPL-2.0-or-later"
options="!check" # unit-tests fail due to iconv usage
depends="git python3"
makedepends="asciidoc xmlto perl"
subpackages="
	$pkgname-doc
	$pkgname-zsh-completion
	$pkgname-fish-completion
	$pkgname-bash-completion
	"
source="https://github.com/stacked-git/stgit/releases/download/v$pkgver/stgit-$pkgver.tar.gz"

prepare() {
	default_prepare

	# this will be a noop, as we are working with a tarball,
	# but throws git errors --> just get rid of it
	echo "version=\"$pkgver\"" > stgit/builtin_version.py
}

check() {
	make \
		PYTHON=python3 \
		prefix=/usr \
		mandir=/usr/share/man/ \
			test
}

build() {
	make \
		PYTHON=python3 \
		prefix=/usr \
		mandir=/usr/share/man/ \
			all doc
}

package() {
	make \
		DESTDIR="$pkgdir" \
		PYTHON=python3 \
		prefix=/usr \
		mandir=/usr/share/man/ \
			install install-doc

	install -Dm0644 "$pkgdir"/usr/share/stgit/completion/stgit.bash \
		"$pkgdir"/usr/share/bash-completion/completions/stgit
	install -Dm0644 "$pkgdir"/usr/share/stgit/completion/stgit.zsh \
		"$pkgdir"/usr/share/zsh/site-functions/_stgit
	install -Dm0644 "$pkgdir"/usr/share/stgit/completion/stg.fish \
		"$pkgdir"/usr/share/fish/completions/stg.fish

	rm -rf "$pkgdir"/usr/share/stgit/completions
}

sha512sums="
c4dfa06e65f3b4009a6159bbeabb691c316faf3a56dbb91c3ef1e77eda07657081b3b6b8f5b1d4010dd8dcd9c63ce423a5fc79a889c3871dc2f88faa13ee2eb1  stgit-1.1.tar.gz
"