mirror of
https://github.com/Gator96100/ProxSpace.git
synced 2025-07-30 19:40:12 -07:00
Updated msys2
This commit is contained in:
parent
6a85995508
commit
f0dc1ea8b0
13308 changed files with 689276 additions and 46605 deletions
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# docs.sh - Remove documentation files from the package
|
||||
#
|
||||
# Copyright (c) 2008-2016 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
# Copyright (c) 2008-2018 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# emptydirs.sh - Remove empty directories from the package
|
||||
#
|
||||
# Copyright (c) 2013-2016 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
# Copyright (c) 2013-2018 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -33,6 +33,7 @@ tidy_remove+=('tidy_emptydirs')
|
|||
tidy_emptydirs() {
|
||||
if check_option "emptydirs" "n"; then
|
||||
msg2 "$(gettext "Removing empty directories...")"
|
||||
find . -depth -type d -exec rmdir '{}' + 2>/dev/null
|
||||
# we are unable to use '-empty' as it is non-POSIX and not support by all find variants
|
||||
find . -depth -type d -exec rmdir '{}' \; 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# libtool.sh - Remove libtool files from the package
|
||||
#
|
||||
# Copyright (c) 2013-2016 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
# Copyright (c) 2013-2018 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
#
|
||||
# optipng.sh - Compress PNG files using optpng
|
||||
#
|
||||
# Copyright (c) 2015-2016 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
[[ -n "$LIBMAKEPKG_TIDY_OPTIPNG_SH" ]] && return
|
||||
LIBMAKEPKG_TIDY_OPTIPNG_SH=1
|
||||
|
||||
LIBRARY=${LIBRARY:-'/usr/share/makepkg'}
|
||||
|
||||
source "$LIBRARY/util/message.sh"
|
||||
source "$LIBRARY/util/option.sh"
|
||||
|
||||
|
||||
packaging_options+=('optipng')
|
||||
tidy_modify+=('tidy_optipng')
|
||||
|
||||
tidy_optipng() {
|
||||
if check_option "optipng" "y"; then
|
||||
msg2 "$(gettext "Optimizing PNG images...")"
|
||||
local png
|
||||
find . -type f -iname "*.png" 2>/dev/null | while read -r png ; do
|
||||
if [[ $(file --brief --mime-type "$png") = 'image/png' ]]; then
|
||||
optipng "${OPTIPNGFLAGS[@]}" "$png" &>/dev/null ||
|
||||
warning "$(gettext "Could not optimize PNG image : %s")" "${png/$pkgdir\//}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# purge.sh - Remove unwanted files from the package
|
||||
#
|
||||
# Copyright (c) 2008-2016 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
# Copyright (c) 2008-2018 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# staticlibs.sh - Remove static library files from the package
|
||||
#
|
||||
# Copyright (c) 2013-2016 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
# Copyright (c) 2013-2018 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# strip.sh - Strip debugging symbols from binary files
|
||||
#
|
||||
# Copyright (c) 2007-2016 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
# Copyright (c) 2007-2018 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -31,17 +31,30 @@ packaging_options+=('strip' 'debug')
|
|||
tidy_modify+=('tidy_strip')
|
||||
|
||||
|
||||
source_files() {
|
||||
LANG=C readelf "$1" --debug-dump | \
|
||||
awk '/DW_AT_name +:/{name=$8}/DW_AT_comp_dir +:/{{if (name !~ /^\//) {printf "%s/", $8}}{print name}}'
|
||||
}
|
||||
|
||||
strip_file() {
|
||||
local binary=$1; shift
|
||||
|
||||
case "$(file -bi "$binary")" in
|
||||
*application/x-dosexec*)
|
||||
if check_option "debug" "y"; then
|
||||
|
||||
if [[ -f "$dbgdir/$binary.debug" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# copy source files to debug directory
|
||||
local f t
|
||||
while read -r t; do
|
||||
f=${t/${dbgsrcdir}/"$srcdir"}
|
||||
mkdir -p "${dbgsrc/"$dbgsrcdir"/}${t%/*}"
|
||||
cp -- "$f" "${dbgsrc/"$dbgsrcdir"/}$t"
|
||||
done < <(source_files "$binary")
|
||||
|
||||
# copy debug symbols to debug directory
|
||||
mkdir -p "$dbgdir/${binary%/*}"
|
||||
msg2 "Separating debug info from $binary into $dbgdir/$binary.debug"
|
||||
# create a dbg file with proper debug info:
|
||||
|
@ -78,6 +91,7 @@ strip_file() {
|
|||
strip $@ "$binary"
|
||||
}
|
||||
|
||||
|
||||
tidy_strip() {
|
||||
if check_option "strip" "y"; then
|
||||
msg2 "$(gettext "Stripping unneeded symbols from binaries and libraries...")"
|
||||
|
@ -86,8 +100,11 @@ tidy_strip() {
|
|||
[[ -z ${STRIP_STATIC+x} ]] && STRIP_STATIC="-S"
|
||||
|
||||
if check_option "debug" "y"; then
|
||||
dbgdir="$pkgdir-debug"
|
||||
mkdir -p "$dbgdir"
|
||||
|
||||
dbgdir="$pkgdirbase/$pkgbase-debug"
|
||||
dbgsrcdir="${DBGSRCDIR:-/usr/src/debug}"
|
||||
dbgsrc="$pkgdirbase/$pkgbase-debug$dbgsrcdir"
|
||||
mkdir -p "$dbgdir" "$dbgsrc"
|
||||
fi
|
||||
|
||||
local binary strip_flags
|
||||
|
@ -175,6 +192,8 @@ tidy_strip() {
|
|||
esac;;
|
||||
*application/x-executable*) # Binaries
|
||||
strip_flags="$STRIP_BINARIES";;
|
||||
*application/x-pie-executable*) # Relocatable binaries
|
||||
strip_flags="$STRIP_SHARED";;
|
||||
*)
|
||||
continue ;;
|
||||
esac
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
#
|
||||
# upx.sh - Compress package binaries with UPX
|
||||
#
|
||||
# Copyright (c) 2011-2016 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
[[ -n "$LIBMAKEPKG_TIDY_UPX_SH" ]] && return
|
||||
LIBMAKEPKG_TIDY_UPX_SH=1
|
||||
|
||||
LIBRARY=${LIBRARY:-'/usr/share/makepkg'}
|
||||
|
||||
source "$LIBRARY/util/message.sh"
|
||||
source "$LIBRARY/util/option.sh"
|
||||
|
||||
|
||||
packaging_options+=('upx')
|
||||
tidy_modify+=('tidy_upx')
|
||||
|
||||
tidy_upx() {
|
||||
if check_option "upx" "y"; then
|
||||
msg2 "$(gettext "Compressing binaries with %s...")" "UPX"
|
||||
local binary
|
||||
find . -type f -perm -u+w 2>/dev/null | while read -r binary ; do
|
||||
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\//}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# zipman.sh - Compress man and info pages
|
||||
#
|
||||
# Copyright (c) 2011-2016 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
# Copyright (c) 2011-2018 Pacman Development Team <pacman-dev@archlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue