1 # Maintainer: Mark Foxwell <fastfret79@archlinux.org.uk>
2 # Contributor: Olivier Ramonat <olivier at ramonat dot fr>
3 # Contributor: Richard Murri <admin@richardmurri.com>
8 pkgdesc="Notmuch is not much of an email program"
10 url="http://notmuchmail.org/"
12 depends=('xapian-core' 'gmime')
13 makedepends=('git' 'talloc' 'python2')
16 optdepends=('emacs: for using the emacs interface'
17 'vim: for using the vim interface'
18 'python2: for using the python bindings'
19 'gnupg: for email encryption')
21 _gitroot="git://notmuchmail.org/git/notmuch"
26 msg "Connecting to GIT server...."
28 if [ -d $_gitname ] ; then
29 cd $_gitname && git pull origin
30 msg "The local files are updated."
32 git clone $_gitroot $_gitname
35 msg "GIT checkout done or server timeout"
36 msg "Starting make..."
38 rm -rf "$srcdir/$_gitname-build"
39 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
40 cd "$srcdir/$_gitname-build"
42 ./configure --prefix=/usr --sysconfdir=/etc --zshcompletiondir=/usr/share/zsh/site-functions
47 cd "$srcdir/$_gitname-build"
48 make DESTDIR="$pkgdir/" LIBDIR_IN_LDCONFIG=0 install
50 install -D notmuch $pkgdir/usr/sbin/notmuch
52 mkdir -p $pkgdir/usr/share/vim/vimfiles/{plugin,syntax}
54 cd vim && make PREFIX="$pkgdir/usr/share/vim/vimfiles" install
56 # Install python bindings
58 cd $srcdir/$_gitname-build/bindings/python
60 find "." -name '*.py' -print0 |xargs -0 \
61 sed -i -e 's,^#!/usr/bin/env python$,#!/usr/bin/env python2,' \
62 -e 's,^#!/usr/bin/python$,#!/usr/bin/python2,'
63 ln -s ../../lib/libnotmuch.so.1 libnotmuch.so.1
64 env LD_LIBRARY_PATH="." python2 setup.py build
65 env LD_LIBRARY_PATH="." python2 setup.py install --prefix=/usr --root=$pkgdir