1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
3 # Contributor: Allan McRae <allan@archlinux.org>
4 # Contributor: Hugo Doria <hugo@archlinux.org>
9 pkgdesc="POSIX 1003.1e capabilities"
11 url="https://sites.google.com/site/fullycapable/"
27 https://kernel.org/pub/linux/libs/security/linux-privs/${pkgname}2/$pkgname-$pkgver.tar.{xz,sign}
28 libcap-2.68-cgo_flags.patch # provide flags to go build (sent upstream)
30 sha512sums=('ede3e1356aef22e18a46dc8ff0727500ab023bea698cf2bb822abb06625e272940afea52ad6457d0cd8cf1c7f435f1b568baf0a6bf0a08ae96fbf6d7502f9de2'
32 '08db53f996a4d686fe54b43159def06b60f996277023e3729a1855dbc1f26d2279512183fdf852da787cc6b4c4b9a582d789e8dea6a4b6717359e7e08f20a173')
33 b2sums=('659ee2b0f92ab7490e7f4c9ccd6aafa02ae36c509654fdb53a0b9da4d5ba8be2d1b5afd2073b2b1c75f9585a0593a9d3e70af59fe0c213e178782bbd11cd3b3d'
35 '40c4e760efdb203d6a680b1c7f58e45ff7c971cade170a3619db620fdd39d75d9063e6ba1193172a29e3304a948d5e7a77abe803cb803d5124a2c0d8622b5a5a')
36 validpgpkeys=(38A644698C69787344E954CE29EE848AE2CCF3F4) # Andrew G. Morgan <morgan@kernel.org>
39 patch -Np1 -d $pkgname-$pkgver -i ../libcap-2.68-cgo_flags.patch
43 export CGO_CPPFLAGS="$CPPFLAGS"
44 export CGO_CFLAGS="$CFLAGS"
45 export CGO_CXXFLAGS="$CXXFLAGS"
46 export CGO_LDFLAGS="$LDFLAGS"
47 export CGO_REQUIRED="1"
48 export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
51 CGO_CPPFLAGS="$CPPFLAGS"
53 CGO_CXXFLAGS="$CXXFLAGS"
54 CGO_LDFLAGS="$LDFLAGS"
56 GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
58 KERNEL_HEADERS=/usr/include
65 make "${make_options[@]}"
69 make test -k -C $pkgname-$pkgver
83 make "${make_options[@]}"
84 install -vDm 644 $pkgname-$pkgver/{CHANGELOG,README} -t "$pkgdir/usr/share/doc/$pkgname/"
85 install -vDm 644 $pkgname-$pkgver/pam_cap/capability.conf -t "$pkgdir/usr/share/doc/$pkgname/examples/"