name=libtool
from_source=libtool
revision=1
hostdeps="autoconf automake"
imagedeps="help2man gcc"

build() {
    cp -rp "${source_dir}"/. ./
    ./configure \
        --prefix="${prefix}"

    make -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" make install

    cp -pv /usr/local/share/autoconf/build-aux/config.sub "${dest_dir}${prefix}"/share/libtool/build-aux/
    cp -pv /usr/local/share/autoconf/build-aux/config.guess "${dest_dir}${prefix}"/share/libtool/build-aux/

        strip_command=strip \
    post_package_strip
}
