#!/bin/sh -e

./configure \
    --prefix=/usr \
    --without-docs \
    --without-api-docs \
    --without-ruby

make
make DESTDIR="$1" install

# For some reason, notmuch doesn't accept the --enable-static/shared options.
# It builds a static library when you run 'make', but it doesn't install the
# built library. Confusing.
install -Dm755 lib/libnotmuch.a "$1/usr/lib/libnotmuch.a"