summaryrefslogtreecommitdiffstats
path: root/abs/core/libcap/PKGBUILD
blob: b6dbd5a91d9b3f39c466db956ebb5f5bab49063c (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
#$Id: PKGBUILD 203064 2014-01-03 09:18:41Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>

pkgname=libcap
pkgver=2.23
pkgrel=2
pkgdesc="POSIX 1003.1e capabilities"
arch=('i686' 'x86_64')
url="http://sites.google.com/site/fullycapable/"
license=('GPL2')
depends=('glibc' 'attr')
options=('!staticlibs')
source=(https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.23.tar.xz
        libcap-2.23-header.patch)

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}

  # install into /usr/bin
  sed -i "/SBINDIR/s#sbin#bin#" Make.Rules

  # fix header path issues
  patch -p1 -i $srcdir/libcap-2.23-header.patch
  # and fix the build with that patch
  sed -i "s#uapi/##" libcap/Makefile
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make prefix=/usr lib=/lib DESTDIR=${pkgdir} RAISE_SETFCAP=no install
  
  install -Dm644 pam_cap/capability.conf \
    $pkgdir/usr/share/doc/$pkgname/capability.conf.example
}
md5sums=('09a185e4b0aa8a81a51c1e4d0eba7db0'
         '945984c4bf5e601c24a7c80f001fb2c6')