abinfo "Building libraries ..."
export CFLAGS="$CFLAGS -DLTM_DESC -DUSE_LTM"
make library \
    -f "$SRCDIR"/makefile.shared

abinfo "Building documentation ..."
make docs \
    -f "$SRCDIR"/makefile

abinfo "Installing libraries ..."
make install \
    -f "$SRCDIR"/makefile.shared \
    PREFIX=/usr \
    DESTDIR="$PKGDIR" \
    INSTALL_GROUP=root

abinfo "Installing documentation ..."
install -Dvm644 "$SRCDIR"/doc/crypt.pdf \
    "$PKGDIR"/usr/share/doc/libtomcrypt/crypt.pdf

abinfo "Setting executable bits for /usr/lib/*.so.* ..."
chmod -v +x "$PKGDIR"/usr/lib/*.so.*
