# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: T.J. Townsend <blakkheim@archlinux.org>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: sh0 <mee@sh0.org>
# Contributor: Maxwel <msg.maxwel@gmail.com>

pkgname=pax-utils
pkgver=1.3.11
pkgrel=1
pkgdesc='ELF utils that can check files for security relevant properties'
url='https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities'
arch=('x86_64')
license=('GPL2')
depends=('bash' 'libcap' 'libcap.so' 'libseccomp' 'python' 'python-pyelftools')
makedepends=('docbook-xml' 'docbook-xsl' 'git' 'linux-headers' 'meson' 'xmlto')
source=(git+https://anongit.gentoo.org/git/proj/pax-utils.git?signed#tag=v$pkgver)
sha512sums=('5b2528e2b5cbc18e2cfc78cfcf237d810acaeafc7845a6953a8213c8d69ed72467014531866f5a4d440e50f05ca5c6a8e9064ac24b119930835587d34de8b1a8')
# Tags are signed inconsistently by different people.
# One developer suggests it will only be people on this list:
# https://wiki.gentoo.org/wiki/Project:Toolchain
validpgpkeys=('5EF3A41171BB77E6110ED2D01F3D03348DB1A3E2' # Sam James
              '226DE4AA4B9704A49DEF6B9B1A333AEFBD714C02' # Mike Gilbert
)

prepare() {
  cd $pkgname
  sed -E 's|(  paths =) \[\]|\1 ["/usr/lib"]|g' -i lddtree.py
}

build() {
  arch-meson $pkgname build \
    -Duse_seccomp=true
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim: ts=2 sw=2 et:
