# 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.10
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=('d5285539c7d2659fdc6774916e6a70cd9b0ecc78183aa28fe83b5e8715ff690ec577a12490d1faa370f413679150596b7584e86da0d3b24399f297628f8848bc')
# 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:
