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 = ...@@ -6,32 +6,23 @@ extends =
parts = libcap parts = libcap
[libcap2] [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 url = http://pkgs.fedoraproject.org/lookaside/pkgs/libcap/libcap-2.22.tar.bz2/ce64058bdb3f086ddbfca8ce6c919845/libcap-2.22.tar.bz2
md5sum = ce64058bdb3f086ddbfca8ce6c919845 md5sum = ce64058bdb3f086ddbfca8ce6c919845
attr-include = ${attr:location}/include/ location = @@LOCATION@@
attr-lib = ${attr:location}/lib/ configure-command = :
slapos_promise = make-options =
directory:sbin RAISE_SETFCAP=no
directory:include prefix=${:location}
statlib:lib/libcap.a CFLAGS=-I${attr:location}/include/
file:lib/libcap.so LDFLAGS="-L${attr:location}/lib/ -Wl,-rpath=${attr:location}/lib/ -Wl,-rpath=${:location}/lib/"
file:sbin/getcap install
file:sbin/setcap
install = # if lib64 exists, then create a symlink from lib to lib64
import os post-install =
url = self.download(options['url'], options['md5sum']) cd ${:location}
extract_dir = self.extract(url) [ -d lib64 ] && ln -s lib64 lib
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)
[libcap] [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