APP=libarchive
VERSION=3.4.2
BUILD=1sml
HOMEPAGE='http://libarchive.org'
DOWNLOAD='https://www.libarchive.org/downloads/libarchive-3.4.2.tar.gz'
DESC="archive reading library"
REQUIRES="bzip2 expat zlib xz"

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

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

  CFLAGS="$CFLAGS -D_BSD_SOURCE" \
  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --with-pic \
    --without-openssl \
    --without-xml2 \
    --disable-acl \
    --enable-shared \
    --disable-static 

  make
  make install DESTDIR=$PKG

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
16a01dfac7f40ba47ad54a3c32b864d528be89fc34040f859ac4fe77a5050ace81e0795edeadd82ed2956abd4c9c8d3ede71ecfff19e69f6254fc48fb96b8cfb  libarchive-3.4.2.tar.lz
"
