# $Id: PKGBUILD 86877 2013-03-23 23:10:36Z td123 $ # Maintainer: Daniel Wallace # Contributor: fauno # Contributor: Olivier Ramonat # Contributor: Richard Murri pkgbase=notmuch pkgname=('notmuch' 'notmuch-mutt' 'notmuch-runtime') pkgver=0.15.2 pkgrel=1 arch=('i686' 'x86_64') url="http://notmuchmail.org/" license=('GPL3') makedepends=('python2' 'python' 'emacs' 'gnupg' 'ruby' 'pkg-config' 'xapian-core' 'gmime' 'talloc') options=(!distcc !makeflags) source=("http://notmuchmail.org/releases/$pkgname-$pkgver.tar.gz") md5sums=('e86968dfcd7ffaf162b7b87de56b7f18') prepare() { cd "$srcdir/$pkgbase-$pkgver" ./configure --prefix=/usr --sysconfdir=/etc --includedir=/usr/include \ --without-zsh-completion cp -dpr --no-preserve=ownership bindings/python{,2} find bindings/python -name '*.py' -exec sed -i -e '1s,python$,python3,' {} + find bindings/python2 -name '*.py' -exec sed -i -e '1s,python$,python2,' {} + cd "$srcdir/$pkgbase-$pkgver/bindings/ruby" ruby extconf.rb sed -i -e 's,/site_ruby,,g' Makefile cd "$srcdir/$pkgbase-$pkgver/contrib/$pkgbase-deliver" ./autogen.sh ./configure --prefix=/usr } build() { cd "$srcdir/$pkgbase-$pkgver" make make -C "contrib/$pkgbase-deliver" make -C "contrib/$pkgbase-mutt" make -C bindings/ruby cd "$srcdir/$pkgbase-$pkgver/bindings/python" #env LD_LIBRARY_PATH="." python setup.py build python setup.py build cd "$srcdir/$pkgbase-$pkgver/bindings/python2" #env LD_LIBRARY_PATH="." python2 setup.py build python2 setup.py build } package_notmuch-runtime(){ pkgdesc="Runtime for notmuch and notmuch-mutt" depends=('xapian-core' 'gmime' 'talloc') cd "$srcdir/$pkgbase-$pkgver" make DESTDIR="$pkgdir/" LIBDIR_IN_LDCONFIG=0 install make -C "contrib/$pkgbase-deliver" DESTDIR="$pkgdir/" install mkdir -p "$pkgdir"/usr/share/vim/vimfiles/{plugin,syntax} make -C vim prefix="$pkgdir/usr/share/vim/vimfiles" install } package_notmuch(){ pkgdesc="Notmuch is not much of an email program" depends=('notmuch-runtime') optdepends=('emacs: for using the emacs interface' 'vim: for using the vim interface' 'python: for using the python bindings' 'python2: for using the python2 bindings' 'ruby: for using the ruby bindings' 'gnupg: for email encryption') # Install python bindings cd "$srcdir/$pkgbase-$pkgver/bindings/python2" #env LD_LIBRARY_PATH="." python2 setup.py install --prefix=/usr --root="$pkgdir" python2 setup.py install --prefix=/usr --root="$pkgdir" cd "$srcdir/$pkgbase-$pkgver/bindings/python" #env LD_LIBRARY_PATH="." python setup.py install --prefix=/usr --root="$pkgdir" python setup.py install --prefix=/usr --root="$pkgdir" # Install ruby bindings cd "$srcdir/$pkgbase-$pkgver/bindings/ruby" make DESTDIR="$pkgdir/" includedir=/usr/include install } package_notmuch-mutt(){ pkgdesc="The mail indexer" depends=('notmuch-runtime' 'perl-mailtools' 'perl-mail-box' 'perl-term-readline-gnu' 'perl-string-shellquote' 'perl-file-which') cd "$srcdir/$pkgbase-$pkgver/contrib/$pkgname" install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname" install -Dm644 "$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1" } #vim: set filetype=PKGBUILD sw=4 ts=4 et