Commit fbfca906 authored by Philippe Coval's avatar Philippe Coval Committed by Mats Wichmann

build: Remove RPATH on install using chrpath

Note to system admin please install the package on infrastructure

This is useful for ARTIK7 support on fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I8e046da345b18e5731939c9cb5e5832fa33786b6
Origin: https://gerrit.iotivity.org/gerrit/#/c/23449/Signed-off-by: default avatarPhilippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit dd223841)
parent 1611e7f5
......@@ -461,6 +461,14 @@ def __install(ienv, targets, name=''):
env.AppendUnique(TS=[name])
def __chrpath(target, source, env):
'''
Remove RPATH (if installed elsewhere)
'''
if target_os in ['linux', 'tizen']:
env.Command(None, target, 'chrpath -d $SOURCE')
def __installlib(ienv, targets, name=''):
'''
Install files to system, using "scons install" and remove rpath info if present
......@@ -478,6 +486,8 @@ def __installlib(ienv, targets, name=''):
else:
dst_dir = env.get('BUILD_DIR') + '/deploy'
action = ienv.Install(dst_dir, targets)
if not user_prefix and str(targets[0]).endswith(env['SHLIBSUFFIX']):
ienv.AddPostAction(action, __chrpath)
ienv.Alias("install", action)
......
......@@ -213,10 +213,6 @@ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
SCONSFLAGS="%{SCONSFLAGS}" ; export SCONSFLAGS;
scons --install-sandbox=%{buildroot} install
find "%{buildroot}" -type f -perm u+x -exec chrpath -d "{}" \;
find "%{buildroot}" -type f -iname "lib*.so" -exec chrpath -d "{}" \;
# Support legacy path (transitional, use pkg-config)
ln -fs iotivity/resource %{buildroot}%{_includedir}/
ln -fs iotivity/service %{buildroot}%{_includedir}/
......
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