Commit 2a958827 authored by Jérome Perrin's avatar Jérome Perrin

component/libcap: install using a proper slapos.recipe.cmmi section

Also build the binaries as static so that they don't use system
libraries.
parent b5652b73
......@@ -6,32 +6,23 @@ extends =
parts = libcap
[libcap2]
recipe = slapos.recipe.build
recipe = slapos.recipe.cmmi
shared = true
url = http://pkgs.fedoraproject.org/lookaside/pkgs/libcap/libcap-2.22.tar.bz2/ce64058bdb3f086ddbfca8ce6c919845/libcap-2.22.tar.bz2
md5sum = ce64058bdb3f086ddbfca8ce6c919845
attr-include = ${attr:location}/include/
attr-lib = ${attr:location}/lib/
slapos_promise =
directory:sbin
directory:include
statlib:lib/libcap.a
file:lib/libcap.so
file:sbin/getcap
file:sbin/setcap
install =
import os
url = self.download(options['url'], options['md5sum'])
extract_dir = self.extract(url)
workdir = guessworkdir(extract_dir)
cflags = '-I%(attr-include)s' % options
ldflags = '-L%(attr-lib)s -Wl,-rpath=%(attr-lib)s' % options
call(['make', 'CFLAGS=' + cflags, 'LDFLAGS=' + ldflags, 'DESTDIR=' + location, 'RAISE_SETFCAP=no', 'prefix=', 'install'],
cwd=workdir, env=self.environ)
lib64 = os.path.join(location, 'lib64')
lib = os.path.join(location, 'lib')
# XXX: Dirty if case
# if lib64 exists, then create a symlink from lib to lib64
os.path.exists(lib64) and os.symlink(lib64, lib)
location = @@LOCATION@@
configure-command = :
make-options =
RAISE_SETFCAP=no
prefix=${:location}
CFLAGS=-I${attr:location}/include/
LDFLAGS="-L${attr:location}/lib/ -Wl,-rpath=${attr:location}/lib/ -Wl,-rpath=${:location}/lib/"
install
# if lib64 exists, then create a symlink from lib to lib64
post-install =
cd ${:location}
[ -d lib64 ] && ln -s lib64 lib
[libcap]
<= libcap2
<= libcap2
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment