Revert "Compile libcap with along with SlapOS node"
[slapos.git] / component / libcap / buildout.cfg
1 [buildout]
2
3 extends =
4   ../attr/buildout.cfg
5
6 parts = libcap
7
8 [libcap2]
9 recipe = slapos.recipe.build
10 format = no
11 url = http://pkgs.fedoraproject.org/lookaside/pkgs/libcap/libcap-2.22.tar.bz2/ce64058bdb3f086ddbfca8ce6c919845/libcap-2.22.tar.bz2
12 md5sum = ce64058bdb3f086ddbfca8ce6c919845
13 attr-include = ${attr:location}/include/
14 attr-lib = ${attr:location}/lib/
15 slapos_promise =
16   directory:sbin
17   directory:usr/include
18   statlib:lib/libcap.a
19   file:lib/libcap.so
20   file:sbin/getcap
21   file:sbin/setcap
22 script =
23   import os
24   url = self.download(self.options['url'], self.options['md5sum'])
25   extract_dir = self.extract(url)
26   workdir = guessworkdir(extract_dir)
27   cflags = '-I%(attr)s' % {'attr': self.options['attr-include']}
28   ldflags = '-L%(attr)s -Wl,-rpath=%(attr)s' % {'attr': self.options['attr-lib']}
29   call(['make', 'CFLAGS=%s' % cflags, 'LDFLAGS=%s' % ldflags, 'DESTDIR=%s' % self.options['location'], 'install'],
30        cwd=workdir, env=env)
31   lib64 = os.path.join(self.options['location'], 'lib64')
32   lib = os.path.join(self.options['location'], 'lib')
33   # XXX: Dirty if case
34   #      if lib64 exists, then create a symlink from lib to lib64
35   os.path.exists(lib64) and os.symlink(lib64, lib)
36
37 [libcap]
38 <= libcap2