mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Allow UPX compression for DOS/Win executables
Hi. This change allows makepkg to UPX-compress executables on Windows, but will probably affect some Linux packages as well (I'm guessing gdbserver, wine, mingw-w64). Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
965539adbf
commit
ff8de12151
@ -35,10 +35,12 @@ tidy_upx() {
|
||||
msg2 "$(gettext "Compressing binaries with %s...")" "UPX"
|
||||
local binary
|
||||
find . -type f -perm -u+w 2>/dev/null | while read -r binary ; do
|
||||
if [[ $(file --brief --mime-type "$binary") = 'application/x-executable' ]]; then
|
||||
case "$(file --brief --mime-type "$binary")" in
|
||||
'application/x-executable' | 'application/x-dosexec')
|
||||
upx "${UPXFLAGS[@]}" "$binary" &>/dev/null ||
|
||||
warning "$(gettext "Could not compress binary : %s")" "${binary/$pkgdir\//}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user