aboutsummaryrefslogblamecommitdiffstats
path: root/main/pax-utils/APKBUILD
blob: 976b0a7dbe0c1e1cd37e7e57a552e13a192b88db (plain) (tree)
1
2
3
4
5
6
7
8
9
                                             
                                                              

                                                   
            
        
                                                  
                                                         
          
                      
                 
                                           
                               
                                        
                                                                          
                                                                         

         
                        

 





                                                        
           
                                       

                                          
                                                                 

 
            
                  
                                             
                            



                                                          







                                                            
            
                                                                                                                                                        
 
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pax-utils
pkgver=1.3.3
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 lddtreepax:_lddtreepax:noarch"

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/
}

_lddtreepax() {
	depends="python3 py3-elftools"
	pkgdesc="Read and package ELF dependency trees"

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/lddtreepax "$subpkgdir"/usr/bin
}

sha512sums="
bb0d03371cf8f0cc26a83cbee888a6d91e70416dedc740476cd5549ddaef67048c6802e30e469ab1aced0fd7f63f84e9644744602b2d483ef7af37191505f72e  pax-utils-1.3.3.tar.xz
"