APP=libelf-compat
VERSION=0.152c001
BUILD=1sml
HOMEPAGE='https://sourceware.org/elfutils/'
DESC="library for manipulating ELF headers"
REQUIRES="musl"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  echo "CFLAGS += -fPIC" > config.mak
  sed -i 's@HEADERS = src/libelf.h@HEADERS = src/libelf.h src/gelf.h@' Makefile

  make
  make prefix="" install DESTDIR="$PKG"

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
8e87c4ae5e073dcf88e8b7fbdfc4512de67a49e3288c576b705ac7af3a2023ba994756180c4b817a45f5bffc8915b22f19908fdd48a1412aae62bf1888e74b66  libelf-compat-0.152c001.tar.lz
"
