abinfo "Building rustc-demangle ..."
cargo build \
    --release \
    --frozen \
    --package rustc-demangle-capi

abinfo "Installing static library..."
install -Dvm644 "${SRCDIR}/target/release/librustc_demangle.a" \
    -t "${PKGDIR}/usr/lib/"

abinfo "Installing shared library..."
install -Dvm644 "${SRCDIR}/target/release/librustc_demangle.so" \
    -t "${PKGDIR}/usr/lib/"

abinfo "Installing header file..."
install -Dvm644 "${SRCDIR}/crates/capi/include/rustc_demangle.h" \
    -t "${PKGDIR}/usr/include/"

abinfo "Installing license files..."
install -Dvm644 "${SRCDIR}/LICENSE-APACHE" "${SRCDIR}/LICENSE-MIT" \
    -t "${PKGDIR}/usr/share/licenses/rustc-demangle/"
