# $Id: PKGBUILD 123910 2014-12-15 16:13:00Z tredaelli $
# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: sh0 <mee@sh0.org>
# Contributor: Maxwel <msg.maxwel@gmail.com>

pkgname=pax-utils
pkgver=0.9.1
pkgrel=1
pkgdesc='ELF related utils for ELF 32/64 binaries that can check files for security relevant properties'
url='http://hardened.gentoo.org/pax-utils.xml'
arch=('i686' 'x86_64')
license=('GPL')
depends=('bash' 'libcap' 'python-pyelftools')
source=("http://distfiles.gentoo.org/distfiles/${pkgname}-${pkgver}.tar.xz")
sha256sums=('643ccaf6952f836c42aafcd5ad7e5f7de2d3472225a34603680b151a8b198b0c')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make USE_CAP='yes'
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  # FIXME lddpath.py uses /lib64 before /usr/lib
  LD_LIBRARY_PATH="/usr/lib" make check
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make USE_PYTHON='yes' DESTDIR="${pkgdir}" install
}
