diff --git a/28-elfutils.sh b/28-elfutils.sh new file mode 100644 index 0000000..4b76b7d --- /dev/null +++ b/28-elfutils.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +if [ "`whoami`" == "root" ]; then + echo "Danger, Will Robinson!" + echo "Do not execute me as r00t" + exit 1 +fi + +TARBALL="elfutils-0.191.tar.bz2" +DNL="https://sourceware.org/ftp/elfutils/0.191/elfutils-0.191.tar.bz2" +SHA256="df76db71366d1d708365fc7a6c60ca48398f14367eb2b8954efc8897147ad871" + +[ -d elfutils-0.191 ] && rm -rf elfutils-0.191 + +if [ ! -f ${TARBALL} ]; then + wget ${DNL} + if [ $? -ne 0 ]; then + echo "Could not retrieve ${DNL}" + echo "Sorry." + exit 1 + fi +fi + +CHECK="`sha256sum ${TARBALL} |awk ' { print $1 } ' `" +if [ "${CHECK}" != "${SHA256}" ]; then + echo "${TARBALL} does not match expected SHA256. Sorry." + exit 1 +fi + +tar -jxf ${TARBALL} && cd elfutils-0.191 + +./configure --prefix=/usr \ + --disable-rpath \ + --disable-debuginfod \ + --enable-libdebuginfod=dummy \ + --program-prefix="eu-" +if [ $? -ne 0 ]; then + echo "Configure script failed for elfutils. Sorry." + exit 1 +fi + +make +if [ $? -ne 0 ]; then + echo "Failed building elfutils. Sorry." + exit 1 +fi + +echo "running make check" +make check > elfutils.check.log 2>&1 + +echo +echo "Inspect elfutils-0.191/elfutils.check.log for issues." +echo "If okay, as root run:" +echo +echo " cd elfutils-0.191" +echo " make install" +echo diff --git a/README.md b/README.md index beaa02f..0526d54 100644 --- a/README.md +++ b/README.md @@ -251,3 +251,12 @@ libksba, npth, OpenLDAP, GnuTLS, and pinentry. * Script: [`27-gnupg.sh`](27-gnupg.sh) * Status: Script Works + +Dependency Twenty-Eight: elfutils +--------------------------------- + +Justification: LFS already installs libelf from elfutils, but debugedit needs +libdw from elfutils as well. + +* Script: [`28-elfutils.sh`](28-elfutils.sh) +* Status: Script Untested