-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
125 lines (114 loc) · 3.39 KB
/
template
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Template file for 'notmuch'
pkgname=notmuch
version=0.38
revision=2
build_style=configure
build_helper=python3
configure_args="--prefix=/usr
--emacslispdir=/usr/share/emacs/site-lisp/notmuch
--emacsetcdir=/usr/share/emacs/site-lisp/notmuch"
hostmakedepends="perl pkg-config python3-Sphinx python3-devel texinfo
desktop-file-utils emacs gnupg python3-setuptools python3-cffi"
makedepends="bash-completion gmime3-devel talloc-devel xapian-core-devel
python3-cffi"
depends="gmime3>=3.2.7"
checkdepends="python3-pytest mdocml dtach gdb tar xz xapian-core
openssl"
short_desc="Thread-based email index, search, and tagging"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://notmuchmail.org"
distfiles="https://notmuchmail.org/releases/notmuch-${version}.tar.xz
https://notmuchmail.org/releases/test-databases/database-v1.tar.xz"
checksum="a17901adbe43f481a6bf53c15a2a20268bc8dc7ad5ccf685a0d17c1456dbaf6e
4299e051b10e1fa7b33ea2862790a09ebfe96859681804e5251e130f800e69d2"
skip_extraction="database-v1.tar.xz"
replaces="notmuch-emacs>=0"
# Not a real conflicts, but this package is broken with gpgme 1.13.1-
# gpgme is optional dependency
conflicts="gpgme<1.14.0_1"
subpackages="libnotmuch libnotmuch-devel notmuch-mutt
notmuch-python3 python3-notmuch2"
if [ ! "$CROSS_BUILD" ]; then
makedepends+=" ruby-devel"
subpackages+=" notmuch-ruby"
fi
do_build() {
make ${makejobs}
make -C contrib/notmuch-mutt
cd ${wrksrc}/bindings/python
python3 setup.py build --build-base=build
cd ${wrksrc}/bindings/python-cffi
python3 setup.py build --build-base=build
}
do_check() {
vsrccopy database-v1.tar.xz test/test-databases
if [ "$XBPS_TARGET_LIBC" = musl ]; then
# Seem like gpgconf's problem,
# mutt on musl also have problems with smime
NOTMUCH_SKIP_TESTS="smime.3 smime.5"
else
# This test run under gdb is problematic
NOTMUCH_SKIP_TESTS="count.14"
fi
# libconfig because of fqdn
# we don't ship python-cffi
NOTMUCH_SKIP_TESTS+=" libconfig python-cffi"
NOTMUCH_SKIP_TESTS+=" crypto index-decryption"
if [ $(id -u) = 0 ]; then
NOTMUCH_SKIP_TESTS+=" new.36 new.39 tagging.25"
fi
export NOTMUCH_SKIP_TESTS
make test
}
do_install() {
make DESTDIR=${DESTDIR} install
rm -f ${DESTDIR}/usr/share/applications/mimeinfo.cache
}
libnotmuch_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove usr/lib/*.so.*
}
}
libnotmuch-devel_package() {
short_desc+=" - development files"
depends="libnotmuch-${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
}
}
notmuch-mutt_package() {
short_desc+=" - Mutt interface"
depends="notmuch mutt perl-Mail-Box perl-MailTools
perl-String-ShellQuote perl-Term-ReadLine-Gnu perl-File-Which"
pkg_install() {
vbin contrib/notmuch-mutt/notmuch-mutt
vman contrib/notmuch-mutt/notmuch-mutt.1
}
}
notmuch-python3_package() {
depends="libnotmuch python3"
short_desc+=" - Python 3 bindings"
pkg_install() {
cd ${wrksrc}/bindings/python
python3 setup.py build --build-base=build \
install --prefix=/usr --root=${PKGDESTDIR}
}
}
python3-notmuch2_package() {
depends="libnotmuch python3"
short_desc+=" - Python 3 cffi bindings"
pkg_install() {
cd ${wrksrc}/bindings/python-cffi
python3 setup.py build --build-base=build \
install --prefix=/usr --root=${PKGDESTDIR}
}
}
notmuch-ruby_package() {
short_desc+=" - Ruby bindings"
pkg_install() {
make DESTDIR=${PKGDESTDIR} -C bindings/ruby install
}
}