archrelease: copy trunk to community-any
[ArchLinux/community.git] / lib32-libcap / trunk / PKGBUILD
blob603cf3bf89d26d0c9db214b7ca842b5aa05e284d
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Florian Pritz <bluewind@xinu.at>
3 # Contributor: Hugo Doria <hugo@archlinux.org>
5 _name=libcap
6 pkgname=lib32-libcap
7 pkgver=2.69
8 pkgrel=1
9 pkgdesc="POSIX 1003.1e capabilities (32-bit)"
10 arch=(x86_64)
11 url="https://sites.google.com/site/fullycapable/"
12 license=(GPL2)
13 depends=(
14   libcap=$pkgver
15   lib32-gcc-libs
16   lib32-glibc
17   lib32-pam
19 makedepends=(
20   linux-api-headers
22 provides=(
23   libcap.so
24   libpsx.so
26 source=(https://kernel.org/pub/linux/libs/security/linux-privs/${_name}2/$_name-$pkgver.tar.{xz,sign})
27 sha512sums=('647c307dc451517da9d089495ab959b4a6fbbe41c79f4e1e9bb663569dad630ead0c2e413dfb393319e3ea14dc9848c81b392107fe3382ce1813d278c3394a7f'
28             'SKIP')
29 b2sums=('94d1fef7666a1c383a8b96f1f6092bd242164631532868b628d2f5de71b42a371d041a978ef7fbadfee3eeb433165444995d1078cd790275bc0433a7875a697e'
30         'SKIP')
31 validpgpkeys=(38A644698C69787344E954CE29EE848AE2CCF3F4) # Andrew G. Morgan <morgan@kernel.org>
33 build() {
34   local make_options=(
35     CC="gcc -m32"
36     DYNAMIC=yes
37     KERNEL_HEADERS=/usr/include
38     lib=lib32
39     prefix=/usr
40     sbindir=bin
41     -C $_name-$pkgver
42   )
44   make "${make_options[@]}"
47 check() {
48   make test CC="gcc -m32" -k -C $_name-$pkgver
51 package() {
52   local make_options=(
53     DESTDIR="$pkgdir"
54     RAISE_SETFCAP=no
55     lib=lib32
56     prefix=/usr
57     sbindir=bin
58     install
59     -C $_name-$pkgver
60   )
62   make "${make_options[@]}"
63   install -vDm 644 $_name-$pkgver/{CHANGELOG,README} -t "$pkgdir/usr/share/doc/$pkgname/"
64   # remove files provided by libcap
65   rm -rv "$pkgdir/usr/"{include,share/man,bin}