# Contributor: Leo # Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=pax-utils pkgver=1.2.4 pkgrel=0 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_host="linux-headers libcap-dev" makedepends="$makedepends_host" checkdepends="bash python3 py3-elftools" source="https://dev.gentoo.org/~slyfox/distfiles/pax-utils-$pkgver.tar.xz" subpackages="$pkgname-doc scanelf:_scanelf" build() { cd "$builddir" make USE_CAP=yes } check() { # Use py3 sed -i '1 s:^.*$:#!/usr/bin/python3:' lddtree.py make check } package() { cd "$builddir" make DESTDIR="$pkgdir/" install # Don't conflict with main/lddtree rm -f "$pkgdir"/usr/bin/lddtree } _scanelf() { pkgdesc="Scan ELF binaries for stuff" depends="" replaces="pax-utils" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/scanelf "$subpkgdir"/usr/bin/ } sha512sums="03b84054c59e8ce64d2c07276c61245c8e9b3eca2fc430269531e2dafe120009b541ebb6adc4ff54c13a1da63caf0755fb026ba272cf17d04f75e06b893a3e95 pax-utils-1.2.4.tar.xz"