upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / notmuch / repos / community-x86_64 / PKGBUILD
blobb21e942c55227cddb7ee47551fc10b9fffa4e7f3
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>
8 pkgbase=notmuch
9 pkgname=('notmuch' 'notmuch-vim' 'notmuch-mutt' 'notmuch-runtime')
10 pkgver=0.37
11 pkgrel=3
12 arch=('x86_64')
13 url="https://notmuchmail.org/"
14 license=('GPL3')
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')
20 build() {
21     cd "$srcdir/$pkgbase-$pkgver"
23     ./configure --prefix=/usr --sysconfdir=/etc --includedir=/usr/include --zshcompletiondir=/usr/share/zsh/site-functions
24     make
26     make -C "contrib/${pkgbase}-mutt"
28     make ruby-bindings
30     cd "$srcdir/$pkgbase-$pkgver/bindings/python"
31     python setup.py build
33     cd "$srcdir/$pkgbase-$pkgver/bindings/python-cffi"
34     python setup.py build
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
46     # Install manpages
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
64 package_notmuch(){
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"
76     # Install emacs parts
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"