mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-29 21:32:41 +00:00
cmake hack to prevent cpack
from re-generating binaries after they
have been stripped/patched.
This commit is contained in:
parent
3b66303ba8
commit
7b5d824209
@ -114,6 +114,10 @@ bzip2 $OUTNAME.tar
|
||||
cd ../../
|
||||
|
||||
if [[ $OS == "Linux" ]]; then
|
||||
# hack so the pre-install script doesn't re-run, clobbering binaries that
|
||||
# have had their rpaths updated and symbols stripped.
|
||||
# https://stackoverflow.com/a/57531164
|
||||
perl -i.bak -0pe "s|Unix Makefiles|Ninja|" CPackConfig.cmake
|
||||
cpack
|
||||
mv *.deb dist/$VERSION/
|
||||
mv *.rpm dist/$VERSION/
|
||||
|
@ -6,4 +6,5 @@ find . -name CMakeFiles -type d -exec rm -rf "{}" \; 2> /dev/null
|
||||
rm -f Makefile
|
||||
rm -f *.cmake
|
||||
rm -rf _CPack_Packages 2> /dev/null
|
||||
rm CPack* 2> /dev/null
|
||||
rm install_manifest.txt 2> /dev/null
|
@ -5,6 +5,10 @@ PLATFORM=$(uname)
|
||||
if [[ "$PLATFORM" == 'Linux' ]]; then
|
||||
echo "[patch-rpath] patch Linux .so files..."
|
||||
|
||||
chmod -x ./bin/lib/*
|
||||
chmod -x ./bin/plugins/*
|
||||
chmod -x ./bin/*.so
|
||||
|
||||
# update the RPATH so libraries in libs/ can discover each other,
|
||||
# and plugins can discover themselves, and libs/ (but not the
|
||||
# other way around)
|
||||
@ -21,7 +25,8 @@ if [[ "$PLATFORM" == 'Linux' ]]; then
|
||||
patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../lib" "$f"
|
||||
done
|
||||
|
||||
chmod -x ./bin/lib/*
|
||||
patchelf --set-rpath "\$ORIGIN:\$ORIGIN/lib" bin/musikcube
|
||||
patchelf --set-rpath "\$ORIGIN:\$ORIGIN/lib" bin/musikcubed
|
||||
fi
|
||||
|
||||
if [[ "$PLATFORM" == 'Darwin' ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user