xbps-src: hooks/strip: ignore debug files; set proper perms to files.
This commit is contained in:
parent
fb83aa9025
commit
c920736289
1 changed files with 7 additions and 0 deletions
|
@ -64,6 +64,10 @@ hook() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find ${PKGDESTDIR} -type f | while read f; do
|
find ${PKGDESTDIR} -type f | while read f; do
|
||||||
|
if [[ $f =~ ^/usr/lib/debug/ ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
fname=$(basename "$f")
|
fname=$(basename "$f")
|
||||||
for x in ${nostrip_files}; do
|
for x in ${nostrip_files}; do
|
||||||
if [ "$x" = "$fname" ]; then
|
if [ "$x" = "$fname" ]; then
|
||||||
|
@ -77,6 +81,7 @@ hook() {
|
||||||
fi
|
fi
|
||||||
case "$(file -bi "$f")" in
|
case "$(file -bi "$f")" in
|
||||||
application/x-executable*)
|
application/x-executable*)
|
||||||
|
chmod 755 "$f"
|
||||||
if echo "$(file $f)" | grep -q "statically linked"; then
|
if echo "$(file $f)" | grep -q "statically linked"; then
|
||||||
# static binary
|
# static binary
|
||||||
$STRIP "$f"
|
$STRIP "$f"
|
||||||
|
@ -97,6 +102,7 @@ hook() {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
application/x-sharedlib*)
|
application/x-sharedlib*)
|
||||||
|
chmod 755 "$f"
|
||||||
# shared library
|
# shared library
|
||||||
make_debug "$f"
|
make_debug "$f"
|
||||||
$STRIP --strip-unneeded "$f"
|
$STRIP --strip-unneeded "$f"
|
||||||
|
@ -116,6 +122,7 @@ hook() {
|
||||||
attach_debug "$f"
|
attach_debug "$f"
|
||||||
;;
|
;;
|
||||||
application/x-archive*)
|
application/x-archive*)
|
||||||
|
chmod 644 "$f"
|
||||||
$STRIP --strip-debug "$f"
|
$STRIP --strip-debug "$f"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
|
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
|
||||||
|
|
Loading…
Reference in a new issue