1 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
2 # Maintainer: Maxim Baz <$pkgbase at maximbaz dot com>
3 # Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
4 # Contributor: fauno <fauno at kiwwwi.com.ar>
5 # Contributor: Olivier Ramonat <olivier at ramonat dot fr>
6 # Contributor: Richard Murri <admin@richardmurri.com>
9 pkgname=('notmuch' 'notmuch-vim' 'notmuch-mutt' 'notmuch-runtime')
13 url="https://notmuchmail.org/"
15 makedepends=('python' 'python-setuptools' 'python-sphinx' 'python-cffi' 'emacs' 'gnupg' 'ruby' 'pkgconfig' 'xapian-core' 'gmime3' 'talloc' 'sfsexp')
16 options=(!distcc !makeflags)
17 source=("https://notmuchmail.org/releases/${pkgname}-${pkgver}.tar.xz")
18 sha512sums=('31cac1ff03b139b18a4fec5e29907ba0e3a965f0a7bf5f2f2b0f75980f9663173745be854e83943f344a09cdb7f5615fa48218e327c4ade7a55b3a22b2a9c45e')
21 cd "$srcdir/$pkgbase-$pkgver"
23 ./configure --prefix=/usr --sysconfdir=/etc --includedir=/usr/include --zshcompletiondir=/usr/share/zsh/site-functions
26 make -C "contrib/${pkgbase}-mutt"
30 cd "$srcdir/$pkgbase-$pkgver/bindings/python"
33 cd "$srcdir/$pkgbase-$pkgver/bindings/python-cffi"
37 package_notmuch-runtime(){
38 pkgdesc="Runtime for notmuch and notmuch-mutt"
39 depends=('xapian-core' 'gmime3' 'talloc' 'sfsexp')
41 cd "$srcdir/$pkgbase-$pkgver"
43 make DESTDIR="$pkgdir/" LIBDIR_IN_LDCONFIG=0 WITH_EMACS=0 install
44 make DESTDIR="$pkgdir/" WITH_BASH=1 install-completion
47 make DESTDIR="$pkgdir" install-man
49 # this is provided both with and without a statically included libnotmuch.so ???
50 install -Dm755 notmuch-shared "$pkgdir/usr/bin/notmuch"
54 package_notmuch-vim(){
55 pkgdesc="Vim plugins for notmuch"
56 depends=('notmuch-runtime' 'ruby')
57 optdepends=('ruby-mail: for sending mail'
58 'elinks: for previewing html mail')
60 make -C "$srcdir/$pkgbase-$pkgver/vim" DESTDIR="$pkgdir" prefix="/usr/share/vim/vimfiles" install
65 pkgdesc="Notmuch is not much of an email program"
66 depends=('notmuch-runtime')
67 optdepends=('emacs: for using the emacs interface'
68 'vim: for using the vim interface'
69 'python-cffi: for using the python-cffi bindings'
70 'ruby: for using the ruby bindings'
71 'gnupg: for email encryption')
72 install=notmuch.install
74 cd "$srcdir/$pkgbase-$pkgver"
77 make DESTDIR="$pkgdir" install-emacs
80 # Install ruby bindings
81 sed -i 's:INSTALL = .*[^D]$:& -D:' bindings/ruby/Makefile
82 make -C bindings/ruby exec_prefix="$pkgdir"/usr install
84 # Install python bindings
85 cd "$srcdir/$pkgbase-$pkgver/bindings/python"
86 python setup.py install --root="$pkgdir" --optimize=1
88 cd "$srcdir/$pkgbase-$pkgver/bindings/python-cffi"
89 python setup.py install --root="$pkgdir" --optimize=1
91 # Remove mimeinfo.cache (fixes FS#53629).
92 rm "$pkgdir/usr/share/applications/mimeinfo.cache"
95 package_notmuch-mutt(){
96 pkgdesc="The mail indexer"
97 depends=('notmuch-runtime' 'perl-mailtools' 'perl-mail-box' 'perl-term-readline-gnu' 'perl-string-shellquote' 'perl-file-which')
99 cd "$srcdir/$pkgbase-$pkgver"
101 install -Dm755 "contrib/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
102 install -Dm644 "contrib/$pkgname/${pkgname}.rc" "${pkgdir}/etc/Muttrc.d/${pkgname}.rc"
103 install -Dm644 "contrib/$pkgname/${pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"