summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d5586aae648e5b49aa4cb1a51808081ca789e890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Maintainer:  Vincent Grande <shoober420@gmail.com>
# Contributor: Dan Beste  <dan.ray.beste+aur@gmail.com>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>

pkgname=libcap-git
pkgver=2.46
pkgrel=1
pkgdesc='POSIX 1003.1e capabilities'
arch=('x86_64')
url="https://sites.google.com/site/fullycapable/"
license=('GPL2')
depends=('glibc' 'pam')
makedepends=('linux-api-headers')
provides=('libcap.so' 'libpsx.so' 'libcap')
conflicts=(libcap)
source=("git+https://git.kernel.org/pub/scm/libs/libcap/libcap.git"
        "libcap-2.45-makefile.patch"
)
sha512sums=('SKIP'
            '4f613f83198dfccb8b79e1b2c8764657a85300cb166d633d86b87f46567d51fa9395387caf33e82a8718f19e9a1fc65c11e7b6f63c3c4cde1b2a27f70671ec07')
#validpgpkeys=(38A644698C69787344E954CE29EE848AE2CCF3F4) # Andrew G. Morgan <morgan@kernel.org>

_commit() {
  # Convert HEAD into a shortened commit id:
  git rev-parse --short HEAD
}

pkgver() {
  cd libcap

  # Suggestions for improvement welcome!
  printf '%s.r%s.%s'         \
  "$(_commit)"
}

prepare() {
  cd libcap
  # SBINDIR is hardcoded to sbin. set to bin
  # add CPPFLAGS
  patch -Np1 -i ../"libcap-2.45-makefile.patch"
}

build() {
  cd libcap
  make KERNEL_HEADERS='/usr/include' lib='lib' prefix='/usr'
}

#check() {
#  cd libcap
#  make test
#}

package() {
  cd libcap
  make DESTDIR="$pkgdir" RAISE_SETFCAP='no' lib='lib' prefix='/usr' install
  # docs
  install -vDm 644 {CHANGELOG,README} -t "${pkgdir}/usr/share/doc/libcap/"
  install -vDm 644 pam_cap/capability.conf \
    -t "$pkgdir/usr/share/doc/libcap/examples/"
}