# Contributor: Leo # Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=pax-utils pkgver=1.3.7 pkgrel=2 pkgdesc="ELF related utils for ELF 32/64 binaries" url="https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities" arch="all" license="GPL-2.0-only" depends="scanelf" makedepends_build="meson" makedepends_host="linux-headers libcap-dev" checkdepends="bash python3 py3-elftools" subpackages="$pkgname-doc scanelf:_scanelf lddtreepax:_lddtreepax:noarch" [ -n "$BOOTSTRAP" ] && options="$options !check" # prevent python dependency source="https://dev.gentoo.org/~sam/distfiles/app-misc/pax-utils/pax-utils-$pkgver.tar.xz" build() { if [ -z "$BOOTSTRAP" ]; then local lto="-Db_lto=true" fi abuild-meson \ $lto \ -Dlddtree_implementation=sh \ -Duse_seccomp=false \ . output meson compile -C output } check() { meson test --print-errorlogs --no-rebuild -C output } package() { DESTDIR="$pkgdir" meson install --no-rebuild -C output # Don't conflict with main/lddtree mv "$pkgdir"/usr/bin/lddtree "$pkgdir"/usr/bin/lddtreepax } _scanelf() { depends="" pkgdesc="Scan ELF binaries for stuff" replaces="pax-utils" amove usr/bin/scanelf } _lddtreepax() { depends="python3 py3-elftools" pkgdesc="Read and package ELF dependency trees" amove usr/bin/lddtreepax } sha512sums=" f1b87a564573da838a02c4cc10e0d5f9754c3b004ecb172a6290b48a8179b30695ae556942457dfac3caf07b91dd56eb1d801475c35e9708e4d671aa507f9576 pax-utils-1.3.7.tar.xz "