X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/c8b6264e23c7deb2c66d56f593f39555b0d3e392..a0c80d57cb2b00b9015809f31584c79feb8c3df8:/build-package.sh?ds=sidebyside diff --git a/build-package.sh b/build-package.sh index 14283087..ed6266d3 100755 --- a/build-package.sh +++ b/build-package.sh @@ -448,13 +448,22 @@ termux_step_massage () { # Remove lib/charset.alias which is installed by gettext-using packages: rm -f lib/charset.alias + # Remove non-english man pages: test -d share/man && (cd share/man; for f in `ls | grep -v man`; do rm -Rf $f; done ) - # Remove info pages and other docs: - rm -Rf share/info share/doc share/locale + + if [ -z ${TERMUX_PKG_KEEP_INFOPAGES+x} ]; then + # Remove info pages: + rm -Rf share/info + fi + + # Remove other docs: + rm -Rf share/doc share/locale + # Remove old kept libraries (readline): find . -name '*.old' -delete - # .. remove static libraries: + + # Remove static libraries: if [ $TERMUX_PKG_KEEP_STATIC_LIBRARIES = "false" ]; then find . -name '*.a' -delete find . -name '*.la' -delete @@ -472,8 +481,8 @@ termux_step_massage () { find . -type f | xargs file | grep -E "(executable|shared object)" | grep ELF | cut -f 1 -d : | xargs $STRIP --strip-unneeded --preserve-dates -R '.gnu.version*' fi # Fix shebang paths: - for file in `find . -type f`; do - head -c 100 $file | grep -E "^#\!.*\\/bin\\/.*" | grep -q -E -v "^#\! ?\\/system" && sed --follow-symlinks -i -E "s@^#\!(.*)/bin/(.*)@#\!$TERMUX_PREFIX/bin/\2@" $file + for file in `find -L . -type f`; do + head -c 100 $file | grep -E "^#\!.*\\/bin\\/.*" | grep -q -E -v "^#\! ?\\/system" && sed --follow-symlinks -i -E "1 s@^#\!(.*)/bin/(.*)@#\!$TERMUX_PREFIX/bin/\2@" $file done set -e -o pipefail # Remove DT_ entries which the android 5.1 linker warns about: @@ -517,7 +526,8 @@ termux_step_massage () { for includeset in $TERMUX_SUBPKG_INCLUDE; do _INCLUDE_DIRSET=`dirname $includeset` test "$_INCLUDE_DIRSET" = "." && _INCLUDE_DIRSET="" - if [ -e $includeset ]; then + if [ -e $includeset -o -L $includeset ]; then + # Add the -L clause to handle relative symbolic links: mkdir -p $SUB_PKG_MASSAGE_DIR/$_INCLUDE_DIRSET mv $includeset $SUB_PKG_MASSAGE_DIR/$_INCLUDE_DIRSET fi @@ -592,7 +602,7 @@ termux_setup_golang () { exit 1 fi - local TERMUX_GO_VERSION=go1.6 + local TERMUX_GO_VERSION=go1.6.1 local TERMUX_GO_PLATFORM=linux-amd64 test `uname` = "Darwin" && TERMUX_GO_PLATFORM=darwin-amd64