aboutsummaryrefslogtreecommitdiffstats
path: root/community/notmuch/APKBUILD
blob: 429e1f1a0aeb4749e759f4269caf9abd1c5ad89b (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
53
54
55
56
57
58
59
60
61
62
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=notmuch
pkgver=0.23.4
pkgrel=0
pkgdesc="E-Mail index, search and tagging"
url="https://notmuchmail.org/"
arch="all"
license="GPL3"
makedepends="gzip xapian-core-dev gmime-dev talloc-dev
	py-sphinx py-requests bash-completion"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-zsh-completion:zshcomp:noarch
	$pkgname-bash-completion:bashcomp:noarch"
source="https://notmuchmail.org/releases/$pkgname-$pkgver.tar.gz"

builddir="$srcdir/$pkgname-$pkgver"
build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--bashcompletiondir=/usr/share/bash-completion/completions \
		--zshcompletiondir=/usr/share/zsh/site-functions \
		|| return 1
	make PREFIX=/usr DESTDIR="$pkgdir" || return 1
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" \
		-C "$builddir" install || return 1
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share/bash-completion/completions/
	mv "$pkgdir"/usr/share/bash-completion/completions/$pkgname \
		"$subpkgdir"/usr/share/bash-completion/completions/ || return 1
}

zshcomp() {
	depends=""
	pkgdesc="Zsh completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	mkdir -p "$subpkgdir"/usr/share/zsh/site-functions/
	mv "$pkgdir"/usr/share/zsh/site-functions/_${pkgname} \
		"$subpkgdir"/usr/share/zsh/site-functions/ || return 1
}

md5sums="9de98a51ad6ffb0f945dbf613385d1c9  notmuch-0.23.4.tar.gz"
sha256sums="106dd6e39c4955871a49a84488d06394c1cecf66c1542b11834f8e8d5c66453b  notmuch-0.23.4.tar.gz"
sha512sums="a90dcb822a01c1a8e07a3fce6c63f210af482e34cbf329fd56db3ea4934e7950ec641c060104729373fc3fc0b42eb1e2937f653f3a42ddae7e7e15e9927c3dff  notmuch-0.23.4.tar.gz"