# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=libtar
pkgver=%version%
pkgrel=%release%
_git='9c2e044833c5e908f5be0a77991b08849021793e'
pkgdesc='C library for manipulating POSIX tar files'
arch=('x86_64')
url='https://repo.or.cz/w/libtar.git'
license=('BSD')
depends=('zlib')
source=("libtar-${_git}.tar.gz::https://github.com/tklauser/libtar/archive/${_git}.tar.gz")
sha256sums=('21d86460dd128f56cfa391e4bc82e91f98e84c2948a854e33daed5c58d4e9cb6')

build() {
  cd "${srcdir}/${pkgname}-${_git}"

  autoreconf -fi
  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --disable-static \
    --disable-encap \
    --disable-epkg-install
  make
}

package() {
  cd "${srcdir}/${pkgname}-${_git}"

  make DESTDIR="${pkgdir}" install
  install -D -m0644 COPYRIGHT "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
