aboutsummaryrefslogblamecommitdiffstats
path: root/main/libcap/APKBUILD
blob: 8dd33d3b603bdb0b6a1036ba104fdcdd80de08e9 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                             
                                                   
              
           
        
                                    
                   
          
                                      
                                                 
                           
                                      
                                        
                                                  
                   
                                                                                             

                                                       
 

                      
                                                                               

 





                                                                
           











                                                                           
 

                                                                                                                                                                 
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libcap
pkgver=2.27
pkgrel=0
pkgdesc="POSIX 1003.1e capabilities"
options="checkroot"
arch="all"
license="BSD-3-Clause OR GPL-2.0-only"
url="http://www.friedhoff.org/posixfilecaps.html"
depends_dev="linux-headers"
makedepends_build="linux-headers perl"
makedepends_host="$depends_dev attr-dev"
makedepends="$makedepends_build $makedepends_host"
checkdepends="bash"
source="https://kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-static $pkgname-dev"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	make BUILD_CC=gcc CC="${CC:-gcc}" lib=lib prefix=/usr DESTDIR="$pkgdir"
}

check() {
	cd "$builddir"
	# Running make test runs the command below but with sudo
	cd progs && ./quicktest.sh
}

package() {
	cd "$builddir"
	make lib=lib prefix=/usr RAISE_SETFCAP=no DESTDIR="$pkgdir" install
	# Fix perms
	chmod -v 0755 "$pkgdir"/usr/lib/libcap.so.${pkgver}
}

static() {
	depends=""
	pkgdesc="$pkgdesc (static library)"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib
}

sha512sums="e32335fd3e0d1564574acc73df7030b5b0fd98875217bffabd76f2765f1a7a6f1369f03df2ee22a1782776838784e342378c10613ea1163d53ae5055ab6a62b6  libcap-2.27.tar.xz"