NAME="libconfig"
DESC="C/C++ library for processing configuration files "
VERSION="1.7.3"
FILES=("https://github.com/hyperrealm/libconfig/archive/refs/tags/v$VERSION.tar.gz")
HASHES=("3749bf9eb29bab0f6b14f4fc759f0c419ed27a843842aaabed1ec1fbe0faa8c93322ff875ca1291d69cb28a39ece86d512aec42c2140d566c38c56dc616734f4")
DEPENDS=("gcc-libs" "glibc")

PACKAGE() {
  tar xf v$VERSION.tar.gz
  cd $NAME-$VERSION

  autoreconf -fiv && ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make && make DESTDIR="$ROOTDIR" install
  rm "$ROOTDIR/usr/share/info/dir"

  cd .. && rm -r $NAME-$VERSION
}
