# Maintainer: PktSurf <smlinux@pktsurf.in>
app=libarchive
version=3.6.2
build=1sml
homepage="http://libarchive.org"
download="https://www.libarchive.org/downloads/libarchive-$version.tar.gz"
desc="archive reading library"
requires="bzip2 expat zlib xz"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions
}

build() {
  ./configure \
    --prefix= \
    --with-pic \
    --without-openssl \
    --without-xml2 \
    --disable-acl \
    --enable-shared \
    --disable-static 

  make
  make install DESTDIR=$pkg

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
59071e5d6e9a2cf661899d0610c4359c91590a313b46e16e7885e8d888b6b6ee3a3f6dc8ef431c02d6cc2615705479ecd2ae394da934f376d034a6e2def83849  libarchive-3.6.2.tar.lz
"
