# Maintainer: Dan McGee <dan@archlinux.org>
# Maintainer: Aaron Griffin <aaron@archlinux.org>

pkgname=libarchive
pkgver=2.8.4
pkgrel=1
pkgdesc="library that can create and read several streaming archive formats"
arch=('i686' 'x86_64')
url="http://libarchive.googlecode.com/"
license=('BSD')
groups=('base')
depends=('zlib' 'bzip2' 'xz-utils' 'acl' 'openssl')
source=("http://libarchive.googlecode.com/files/libarchive-$pkgver.tar.gz")
md5sums=('83b237a542f27969a8d68ac217dc3796')

# pacman.static build fails unless we keep the libtool files (or unless we link
# the missing symbols inside the libarchive .a static lib, but that is dirty)
options=(libtool)

build() {
  cd $srcdir/$pkgname-$pkgver
  
  ./configure --prefix=/usr
  
  make || return 1
}

package() {
  cd $srcdir/$pkgname-$pkgver
  
  make DESTDIR=$pkgdir install
  
  # install license
  mkdir -p $pkgdir/usr/share/licenses/libarchive
  install -m644 COPYING $pkgdir/usr/share/licenses/libarchive/
}

# vim:set ts=2 sw=2 et:
