Files
kde-linux/strip/strip
Harald Sitter 52ed3714fb strip only the kde-builder stage
this is slightly hacky because kde-builder doesn't support running
arbitrary targets.

we first override ninja with a special program that turns install
commands into install/strip commands

we then set -DCMAKE_STRIP to a special strip command that invokes
eu-strip with the right arguments to strip stuff to /tmp/debugroot

from there we then pick it up in the archive generator
2024-10-17 13:48:15 +02:00

22 lines
521 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
# SPDX-FileCopyrightText: 2024 Harald Sitter <sitter@kde.org>
set -eux
if [ $# -ne 1 ]; then
echo "Usage: $0 <file>"
exit 1
fi
FILE=$1
REALPATH=$(realpath "$FILE")
DEBUGROOT=/tmp/debugroot
REALDEBUGFILE=/usr/lib/debug$REALPATH.debug
DEBUGFILE=$DEBUGROOT$REALDEBUGFILE
mkdir -p "$(dirname "$DEBUGFILE")"
exec /usr/bin/eu-strip --remove-comment --reloc-debug-sections -f "$DEBUGFILE" -F "$REALDEBUGFILE" "$FILE"