# Contributor: Leo # Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=pax-utils pkgver=1.2.5 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 python3 py3-elftools" makedepends_host="linux-headers libcap-dev" makedepends="$makedepends_host" checkdepends="bash" source="https://dev.gentoo.org/~slyfox/distfiles/pax-utils-$pkgver.tar.xz" subpackages="$pkgname-doc scanelf:_scanelf" build() { make USE_CAP=yes } check() { # Use py3 sed -i '1 s:^.*$:#!/usr/bin/python3:' lddtree.py make check } package() { make DESTDIR="$pkgdir/" install # 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" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/scanelf "$subpkgdir"/usr/bin/ } sha512sums="bf2f47393a66b4218eba7981100fc6936c7c9d6d98970f5337e7b3097ce6f7b2ca13de486ff7450e4395b74ba2308d37105508234f323230376ec5814cfe54f9 pax-utils-1.2.5.tar.xz"