diff --git a/build-all.sh b/build-all.sh index 0b2cf76ae8..aac8db59f5 100755 --- a/build-all.sh +++ b/build-all.sh @@ -11,13 +11,13 @@ test -f $HOME/.termuxrc && . $HOME/.termuxrc : ${TERMUX_INSTALL_DEPS:="-s"} # Set TERMUX_INSTALL_DEPS to -s unless set to -i -_show_usage () { +_show_usage() { echo "Usage: ./build-all.sh [-a ARCH] [-d] [-i] [-o DIR]" echo "Build all packages." - echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all." - echo " -d Build with debug symbols." - echo " -i Build dependencies." - echo " -o Specify deb directory. Default: debs/." + echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all." + echo " -d Build with debug symbols." + echo " -i Build dependencies." + echo " -o Specify deb directory. Default: debs/." exit 1 } @@ -53,7 +53,7 @@ if [ -e $BUILDSTATUS_FILE ]; then echo "Continuing build-all from: $BUILDSTATUS_FILE" fi -exec > >(tee -a $BUILDALL_DIR/ALL.out) +exec > >(tee -a $BUILDALL_DIR/ALL.out) exec 2> >(tee -a $BUILDALL_DIR/ALL.err >&2) trap "echo ERROR: See $BUILDALL_DIR/\${package}.err" ERR @@ -68,8 +68,8 @@ for package_path in `cat $BUILDORDER_FILE`; do echo -n "Building $package... " BUILD_START=`date "+%s"` bash -x $BUILDSCRIPT -a $TERMUX_ARCH $TERMUX_DEBUG \ - ${TERMUX_DEBDIR+-o $TERMUX_DEBDIR} $TERMUX_INSTALL_DEPS $package \ - > $BUILDALL_DIR/${package}.out 2> $BUILDALL_DIR/${package}.err + ${TERMUX_DEBDIR+-o $TERMUX_DEBDIR} $TERMUX_INSTALL_DEPS $package \ + > $BUILDALL_DIR/${package}.out 2> $BUILDALL_DIR/${package}.err BUILD_END=`date "+%s"` BUILD_SECONDS=$(( $BUILD_END - $BUILD_START )) echo "done in $BUILD_SECONDS" diff --git a/build-package.sh b/build-package.sh index 3692aabeb0..594f282fc9 100755 --- a/build-package.sh +++ b/build-package.sh @@ -40,7 +40,7 @@ termux_download() { if [ "$CHECKSUM" != "SKIP_CHECKSUM" ]; then if [ "$CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then >&2 printf "Wrong checksum for %s:\nExpected: %s\nActual: %s\n" \ - "$URL" "$CHECKSUM" "$ACTUAL_CHECKSUM" + "$URL" "$CHECKSUM" "$ACTUAL_CHECKSUM" exit 1 fi else @@ -234,7 +234,7 @@ termux_setup_cmake() { local TERMUX_CMAKE_FOLDER=$TERMUX_COMMON_CACHEDIR/cmake-$TERMUX_CMAKE_VERSION if [ ! -d "$TERMUX_CMAKE_FOLDER" ]; then termux_download https://cmake.org/files/v$TERMUX_CMAKE_MAJORVESION/$TERMUX_CMAKE_TARNAME \ - "$TERMUX_CMAKE_TARFILE" \ + "$TERMUX_CMAKE_TARFILE" \ 563a39e0a7c7368f81bfa1c3aff8b590a0617cdfe51177ddc808f66cc0866c76 rm -Rf "$TERMUX_PKG_TMPDIR/cmake-${TERMUX_CMAKE_VERSION}-Linux-x86_64" tar xf "$TERMUX_CMAKE_TARFILE" -C "$TERMUX_PKG_TMPDIR" @@ -247,7 +247,7 @@ termux_setup_cmake() { # First step is to handle command-line arguments. Not to be overridden by packages. termux_step_handle_arguments() { - _show_usage () { + _show_usage() { echo "Usage: ./build-package.sh [-a ARCH] [-d] [-D] [-f] [-i] [-I] [-q] [-s] [-o DIR] PACKAGE" echo "Build a package by creating a .deb file in the debs/ folder." echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all." @@ -734,7 +734,7 @@ termux_step_extract_package() { # Hook for packages to act just after the package has been extracted. # Invoked in $TERMUX_PKG_SRCDIR. termux_step_post_extract_package() { - return + return } # Optional host build. Not to be overridden by packages. @@ -913,11 +913,11 @@ termux_step_setup_toolchain() { # starting from Android 5), not older as the NDK headers claim. for file in zconf.h zlib.h; do curl -o usr/include/$file \ - https://raw.githubusercontent.com/madler/zlib/v1.2.8/$file + https://raw.githubusercontent.com/madler/zlib/v1.2.8/$file done unset file cd $_TERMUX_TOOLCHAIN_TMPDIR/include/c++/4.9.x - sed "s%\@TERMUX_HOST_PLATFORM\@%${TERMUX_HOST_PLATFORM}%g" $TERMUX_SCRIPTDIR/ndk-patches/*.cpppatch | patch -p1 + sed "s%\@TERMUX_HOST_PLATFORM\@%${TERMUX_HOST_PLATFORM}%g" $TERMUX_SCRIPTDIR/ndk-patches/*.cpppatch | patch -p1 # Fix relative path in gcc/g++ script: sed -i "s%\`dirname \$0\`/../../../../%$NDK/toolchains/%g" $_TERMUX_TOOLCHAIN_TMPDIR/bin/${TERMUX_HOST_PLATFORM}-gcc sed -i "s%\`dirname \$0\`/../../../../%$NDK/toolchains/%g" $_TERMUX_TOOLCHAIN_TMPDIR/bin/${TERMUX_HOST_PLATFORM}-g++ @@ -1277,7 +1277,7 @@ termux_step_massage() { # Remove world permissions and add write permissions. # The -f flag is used to suppress warnings about dangling symlinks (such # as ones to /system/... which may not exist on the build machine): - find . -exec chmod -f u+w,g-rwx,o-rwx \{\} \; + find . -exec chmod -f u+w,g-rwx,o-rwx \{\} \; if [ "$TERMUX_DEBUG" = "" ]; then # Strip binaries. file(1) may fail for certain unusual files, so disable pipefail. diff --git a/disabled-packages/ant/build.sh b/disabled-packages/ant/build.sh index 46c467436f..d5a1c1c9dc 100644 --- a/disabled-packages/ant/build.sh +++ b/disabled-packages/ant/build.sh @@ -6,14 +6,14 @@ TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_PLATFORM_INDEPENDENT=true termux_step_make_install() { - mkdir -p $TERMUX_PREFIX/share/ant/lib + mkdir -p $TERMUX_PREFIX/share/ant/lib - for jar in ant ant-launcher; do - $TERMUX_DX \ - --dex \ - --output=$TERMUX_PREFIX/share/ant/lib/${jar}.jar \ - lib/${jar}.jar - done + for jar in ant ant-launcher; do + $TERMUX_DX \ + --dex \ + --output=$TERMUX_PREFIX/share/ant/lib/${jar}.jar \ + lib/${jar}.jar + done install $TERMUX_PKG_BUILDER_DIR/ant $TERMUX_PREFIX/bin/ant perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/ant diff --git a/disabled-packages/libressl/build.sh b/disabled-packages/libressl/build.sh index 8eb62cae52..bfe6e44540 100644 --- a/disabled-packages/libressl/build.sh +++ b/disabled-packages/libressl/build.sh @@ -1,6 +1,6 @@ # Status: Termux currently uses openssl. Transitioning to libressl -# is tempting, but on hold for now to see how widespread -# the adoption of libressl in Linux distributions is. +# is tempting, but on hold for now to see how widespread +# the adoption of libressl in Linux distributions is. TERMUX_PKG_HOMEPAGE=http://www.libressl.org/ TERMUX_PKG_DESCRIPTION="Library implementing the TLS protocol as well as general purpose cryptography functions" TERMUX_PKG_DEPENDS="ca-certificates" diff --git a/packages/alpine/build.sh b/packages/alpine/build.sh index ca74a06449..52bd3e93a2 100644 --- a/packages/alpine/build.sh +++ b/packages/alpine/build.sh @@ -42,9 +42,9 @@ termux_step_post_configure() { } termux_step_create_debscripts() { - echo "#!$TERMUX_PREFIX/bin/sh" >> postinst + echo "#!$TERMUX_PREFIX/bin/sh" >> postinst echo "if [ ! -e $TERMUX_ANDROID_HOME/.alpine-smime/.pwd/MasterPassword.crt ] && [ ! -e $HOME/.alpine-smime/.pwd/MasterPassword.key ]; then" >> postinst - echo "echo 'warning making a passwordless masterpasword file'" >> postinst + echo "echo 'warning making a passwordless masterpasword file'" >> postinst echo "mkdir -p \$HOME/.alpine-smime/public \$HOME/.alpine-smime/.pwd \$HOME/.alpine-smime/private \$HOME/.alpine-smime/ca" >> postinst echo "openssl req -x509 -newkey rsa:2048 -keyout \$HOME/.alpine-smime/.pwd/MasterPassword.key -out \$HOME/.alpine-smime/.pwd/MasterPassword.crt -days 10000 -nodes -subj '/C=US/ST=dont/L=use/O=this Name/OU=for/CN=anything.com.termux'" >> postinst echo "touch \$HOME/.pine-passfile" >> postinst diff --git a/packages/apk-tools/build.sh b/packages/apk-tools/build.sh index 693fe99e58..bf2acb4f9f 100644 --- a/packages/apk-tools/build.sh +++ b/packages/apk-tools/build.sh @@ -23,14 +23,14 @@ termux_step_post_massage() { mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/var/cache/apk" ln -sfr \ - "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/var/cache/apk" \ - "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/etc/apk/cache" + "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/var/cache/apk" \ + "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/etc/apk/cache" } termux_step_create_debscripts() { { - echo "#!$TERMUX_PREFIX/bin/sh" - echo "touch $TERMUX_PREFIX/etc/apk/world" + echo "#!$TERMUX_PREFIX/bin/sh" + echo "touch $TERMUX_PREFIX/etc/apk/world" } > ./postinst chmod 755 postinst } diff --git a/packages/argp/build.sh b/packages/argp/build.sh index f73b0c39c2..478ffc73a7 100644 --- a/packages/argp/build.sh +++ b/packages/argp/build.sh @@ -8,6 +8,6 @@ TERMUX_PKG_KEEP_STATIC_LIBRARIES=true TERMUX_PKG_NO_DEVELSPLIT=true termux_step_post_make_install() { - cp libargp.a $TERMUX_PREFIX/lib - cp $TERMUX_PKG_SRCDIR/argp.h $TERMUX_PREFIX/include + cp libargp.a $TERMUX_PREFIX/lib + cp $TERMUX_PKG_SRCDIR/argp.h $TERMUX_PREFIX/include } diff --git a/packages/dropbear/build.sh b/packages/dropbear/build.sh index 37d24148fe..0d7618a9c3 100644 --- a/packages/dropbear/build.sh +++ b/packages/dropbear/build.sh @@ -25,13 +25,13 @@ termux_step_post_make_install() { termux_step_create_debscripts() { { - echo "#!$TERMUX_PREFIX/bin/sh" - echo "mkdir -p $TERMUX_PREFIX/etc/dropbear" - echo "for a in rsa dss ecdsa; do" - echo " KEYFILE=$TERMUX_PREFIX/etc/dropbear/dropbear_\${a}_host_key" - echo " test ! -f \$KEYFILE && dropbearkey -t \$a -f \$KEYFILE" - echo "done" - echo "exit 0" + echo "#!$TERMUX_PREFIX/bin/sh" + echo "mkdir -p $TERMUX_PREFIX/etc/dropbear" + echo "for a in rsa dss ecdsa; do" + echo " KEYFILE=$TERMUX_PREFIX/etc/dropbear/dropbear_\${a}_host_key" + echo " test ! -f \$KEYFILE && dropbearkey -t \$a -f \$KEYFILE" + echo "done" + echo "exit 0" } > postinst chmod 0755 postinst } diff --git a/packages/finch/build.sh b/packages/finch/build.sh index aa881ba434..110b9a0673 100644 --- a/packages/finch/build.sh +++ b/packages/finch/build.sh @@ -27,23 +27,23 @@ termux_step_pre_configure() { } termux_step_post_configure() { - # Hack to compile first version of libpurple-ciphers.la - cp $TERMUX_PREFIX/lib/libxml2.so $TERMUX_PREFIX/lib/libpurple.so + # Hack to compile first version of libpurple-ciphers.la + cp $TERMUX_PREFIX/lib/libxml2.so $TERMUX_PREFIX/lib/libpurple.so - cd $TERMUX_PKG_BUILDDIR/libpurple/ciphers - make libpurple-ciphers.la - cd .. - make libpurple.la + cd $TERMUX_PKG_BUILDDIR/libpurple/ciphers + make libpurple-ciphers.la + cd .. + make libpurple.la - # Put a more proper version in lib: - cp .libs/libpurple.so $TERMUX_PREFIX/lib/ + # Put a more proper version in lib: + cp .libs/libpurple.so $TERMUX_PREFIX/lib/ - make clean + make clean } termux_step_post_make_install() { - cd $TERMUX_PREFIX/lib - for lib in jabber oscar ymsg; do - ln -f -s purple-2/lib${lib}.so . - done + cd $TERMUX_PREFIX/lib + for lib in jabber oscar ymsg; do + ln -f -s purple-2/lib${lib}.so . + done } diff --git a/packages/getmail/build.sh b/packages/getmail/build.sh index 227fce2f97..b29607a28b 100644 --- a/packages/getmail/build.sh +++ b/packages/getmail/build.sh @@ -9,9 +9,9 @@ TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_PLATFORM_INDEPENDENT=yes termux_step_make_install() { - python2 setup.py install --prefix=$TERMUX_PREFIX --force + python2 setup.py install --prefix=$TERMUX_PREFIX --force } termux_step_post_massage() { - find . -path '*.pyc' -delete + find . -path '*.pyc' -delete } diff --git a/packages/gst-plugins-base/build.sh b/packages/gst-plugins-base/build.sh index a8c1080a3f..b993a6d2af 100644 --- a/packages/gst-plugins-base/build.sh +++ b/packages/gst-plugins-base/build.sh @@ -27,10 +27,10 @@ termux_step_post_make_install() { mv $BIN_BINARY $LIBEXEC_BINARY local FFMPEG_LIBS="" lib - for lib in avcodec avfilter avformat avutil postproc swresample swscale; do - if [ -n "$FFMPEG_LIBS" ]; then FFMPEG_LIBS+=":"; fi - FFMPEG_LIBS+="$TERMUX_PREFIX/lib/lib${lib}.so" - done + for lib in avcodec avfilter avformat avutil postproc swresample swscale; do + if [ -n "$FFMPEG_LIBS" ]; then FFMPEG_LIBS+=":"; fi + FFMPEG_LIBS+="$TERMUX_PREFIX/lib/lib${lib}.so" + done cat << EOF > $BIN_BINARY #!/bin/sh diff --git a/packages/hunspell-ru/build.sh b/packages/hunspell-ru/build.sh index d5a02e3888..5246ce55fe 100644 --- a/packages/hunspell-ru/build.sh +++ b/packages/hunspell-ru/build.sh @@ -12,9 +12,9 @@ termux_step_make_install() { # In which case we need to bump version and checksum used. termux_download https://cgit.freedesktop.org/libreoffice/dictionaries/plain/ru_RU/ru_RU.aff \ $TERMUX_PREFIX/share/hunspell/ru_RU.aff \ - 709cf9b41208961226e995a3ab75a2da834aaf4f9707cb87cbb37d4943b6a50d + 709cf9b41208961226e995a3ab75a2da834aaf4f9707cb87cbb37d4943b6a50d termux_download https://cgit.freedesktop.org/libreoffice/dictionaries/plain/ru_RU/ru_RU.dic \ $TERMUX_PREFIX/share/hunspell/ru_RU.dic \ - c0d81126b0a905ccc6fd891c923b43d39b4ce449da5a333859229354c510168f + c0d81126b0a905ccc6fd891c923b43d39b4ce449da5a333859229354c510168f touch $TERMUX_PREFIX/share/hunspell/ru_RU.{aff,dic} } diff --git a/packages/iconv/build.sh b/packages/iconv/build.sh index bcc35f9834..afd0958400 100644 --- a/packages/iconv/build.sh +++ b/packages/iconv/build.sh @@ -11,7 +11,7 @@ termux_step_make_install() { mkdir -p $TERMUX_PREFIX/share/man/man1 make -C lib install # this installs libiconv.{a,la} which the below install task needs: make -C src install - rm $TERMUX_PREFIX/lib/libiconv.{a,la} - # .. and the man page: - cp $TERMUX_PKG_SRCDIR/man/iconv.1 $TERMUX_PREFIX/share/man/man1/ + rm $TERMUX_PREFIX/lib/libiconv.{a,la} + # .. and the man page: + cp $TERMUX_PKG_SRCDIR/man/iconv.1 $TERMUX_PREFIX/share/man/man1/ } diff --git a/packages/ipfs/build.sh b/packages/ipfs/build.sh index 5c4b0aaf0e..f48bfbddde 100644 --- a/packages/ipfs/build.sh +++ b/packages/ipfs/build.sh @@ -13,11 +13,11 @@ termux_step_make() { export GOARCH=${TERMUX_ARCH} if [ "${TERMUX_ARCH}" = "aarch64" ]; then - export GOARCH="arm64" + export GOARCH="arm64" elif [ "${TERMUX_ARCH}" = "i686" ]; then - export GOARCH="386" + export GOARCH="386" elif [ "${TERMUX_ARCH}" = "x86_64" ]; then - export GOARCH="amd64" + export GOARCH="amd64" fi mkdir -p "${GOPATH}/src/github.com/ipfs" diff --git a/packages/libgc/build.sh b/packages/libgc/build.sh index 00b08128d9..072fd65e21 100644 --- a/packages/libgc/build.sh +++ b/packages/libgc/build.sh @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=http://www.hboehm.info/gc/ TERMUX_PKG_DESCRIPTION="Library providing the Boehm-Demers-Weiser conservative garbage collector" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_VERSION=(8.0.2 - 7.6.8) + 7.6.8) TERMUX_PKG_SHA256=(4e8ca4b5b72a3a27971daefaa9b621f0a716695b23baa40b7eac78de2eeb51cb - 1d6a279edf81767e74d2ad2c9fce09459bc65f12c6525a40b0cb3e53c089f665) + 1d6a279edf81767e74d2ad2c9fce09459bc65f12c6525a40b0cb3e53c089f665) TERMUX_PKG_SRCURL=(https://github.com/ivmai/bdwgc/releases/download/v$TERMUX_PKG_VERSION/gc-$TERMUX_PKG_VERSION.tar.gz https://github.com/ivmai/libatomic_ops/releases/download/v${TERMUX_PKG_VERSION[1]}/libatomic_ops-${TERMUX_PKG_VERSION[1]}.tar.gz) TERMUX_PKG_RM_AFTER_INSTALL="share/gc" diff --git a/packages/make/build.sh b/packages/make/build.sh index 1b82fe16e3..efbb3e7430 100644 --- a/packages/make/build.sh +++ b/packages/make/build.sh @@ -10,8 +10,8 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_lib_elf_elf_begin=no" termux_step_pre_configure() { if [ "$TERMUX_ARCH" = arm ]; then - # Fix issue with make on arm hanging at least under cmake: - # https://github.com/termux/termux-packages/issues/2983 - TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_pselect=no" + # Fix issue with make on arm hanging at least under cmake: + # https://github.com/termux/termux-packages/issues/2983 + TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_pselect=no" fi } diff --git a/packages/mlocate/build.sh b/packages/mlocate/build.sh index a8996c9427..cca455391e 100644 --- a/packages/mlocate/build.sh +++ b/packages/mlocate/build.sh @@ -17,6 +17,6 @@ termux_step_pre_configure() { termux_step_create_debscripts() { echo "#!$TERMUX_PREFIX/bin/sh" > postinst echo "mkdir -p $TERMUX_PREFIX/var/mlocate/" >> postinst - echo "exit 0" >> postinst - chmod 0755 postinst + echo "exit 0" >> postinst + chmod 0755 postinst } diff --git a/packages/openssh/build.sh b/packages/openssh/build.sh index bc2dd0958f..d9358b38c3 100644 --- a/packages/openssh/build.sh +++ b/packages/openssh/build.sh @@ -99,10 +99,10 @@ termux_step_create_debscripts() { echo "chmod 700 \$HOME/.ssh" >> postinst echo "chmod 600 \$HOME/.ssh/authorized_keys" >> postinst echo "" >> postinst - echo "for a in rsa dsa ecdsa ed25519; do" >> postinst - echo " KEYFILE=$TERMUX_PREFIX/etc/ssh/ssh_host_\${a}_key" >> postinst - echo " test ! -f \$KEYFILE && ssh-keygen -N '' -t \$a -f \$KEYFILE" >> postinst - echo "done" >> postinst - echo "exit 0" >> postinst - chmod 0755 postinst + echo "for a in rsa dsa ecdsa ed25519; do" >> postinst + echo " KEYFILE=$TERMUX_PREFIX/etc/ssh/ssh_host_\${a}_key" >> postinst + echo " test ! -f \$KEYFILE && ssh-keygen -N '' -t \$a -f \$KEYFILE" >> postinst + echo "done" >> postinst + echo "exit 0" >> postinst + chmod 0755 postinst } diff --git a/packages/openssh/source-ssh-agent.sh b/packages/openssh/source-ssh-agent.sh index 07d0965ef0..6b0a6f86fc 100644 --- a/packages/openssh/source-ssh-agent.sh +++ b/packages/openssh/source-ssh-agent.sh @@ -3,23 +3,23 @@ # Check if accidentaly executed instead of sourced: if echo "$0" | grep -q source-ssh-agent; then - echo "source-ssh-agent: Do not execute directly - source me instead!" - exit 1 + echo "source-ssh-agent: Do not execute directly - source me instead!" + exit 1 fi export SSH_AUTH_SOCK=$PREFIX/tmp/ssh-agent start_agent() { - rm -f $SSH_AUTH_SOCK - ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add + rm -f $SSH_AUTH_SOCK + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + ssh-add } MESSAGE=`ssh-add -L 2>&1` if [ "$MESSAGE" = 'Could not open a connection to your authentication agent.' -o \ "$MESSAGE" = 'Error connecting to agent: Connection refused' -o \ "$MESSAGE" = 'Error connecting to agent: No such file or directory' ]; then - start_agent + start_agent elif [ "$MESSAGE" = "The agent has no identities." ]; then - ssh-add + ssh-add fi diff --git a/packages/perl/build.sh b/packages/perl/build.sh index 9b468d1519..e587a83606 100644 --- a/packages/perl/build.sh +++ b/packages/perl/build.sh @@ -2,11 +2,11 @@ TERMUX_PKG_HOMEPAGE=https://www.perl.org/ TERMUX_PKG_DESCRIPTION="Capable, feature-rich programming language" TERMUX_PKG_LICENSE="Artistic-License-2.0" TERMUX_PKG_VERSION=(5.28.1 - 1.2.1) + 1.2.1) TERMUX_PKG_SHA256=(3ebf85fe65df2ee165b22596540b7d5d42f84d4b72d84834f74e2e0b8956c347 - 8b706bc688ddf71b62d649bde72f648669f18b37fe0c54ec6201142ca3943498) + 8b706bc688ddf71b62d649bde72f648669f18b37fe0c54ec6201142ca3943498) TERMUX_PKG_SRCURL=(http://www.cpan.org/src/5.0/perl-${TERMUX_PKG_VERSION}.tar.gz - https://github.com/arsv/perl-cross/releases/download/${TERMUX_PKG_VERSION[1]}/perl-cross-${TERMUX_PKG_VERSION[1]}.tar.gz) + https://github.com/arsv/perl-cross/releases/download/${TERMUX_PKG_VERSION[1]}/perl-cross-${TERMUX_PKG_VERSION[1]}.tar.gz) TERMUX_PKG_BUILD_IN_SRC="yes" TERMUX_MAKE_PROCESSES=1 TERMUX_PKG_RM_AFTER_INSTALL="bin/perl${TERMUX_PKG_VERSION}" diff --git a/packages/python2/build.sh b/packages/python2/build.sh index 0795308d48..7fcbd0cf50 100644 --- a/packages/python2/build.sh +++ b/packages/python2/build.sh @@ -49,10 +49,10 @@ termux_step_host_build() { # We need a host-built Parser/pgen binary, copied into cross-compile build in termux_step_post_configure() below $TERMUX_PKG_SRCDIR/configure make Parser/pgen - # We need a python$_MAJOR_VERSION binary to be picked up by configure check: + # We need a python$_MAJOR_VERSION binary to be picked up by configure check: make - rm -f python$_MAJOR_VERSION # Remove symlink if already exists to get a newer timestamp - ln -s python python$_MAJOR_VERSION + rm -f python$_MAJOR_VERSION # Remove symlink if already exists to get a newer timestamp + ln -s python python$_MAJOR_VERSION } termux_step_post_configure() { @@ -80,8 +80,8 @@ termux_step_post_make_install() { mv 2to3 2to3-${_MAJOR_VERSION} mv pydoc pydoc${_MAJOR_VERSION} ln -sf pydoc${_MAJOR_VERSION} pydoc2) - # Restore path which termux_step_host_build messed with - export PATH=$TERMUX_ORIG_PATH + # Restore path which termux_step_host_build messed with + export PATH=$TERMUX_ORIG_PATH } termux_step_post_massage() { diff --git a/packages/socat/build.sh b/packages/socat/build.sh index ea0047a63f..07d02627d6 100644 --- a/packages/socat/build.sh +++ b/packages/socat/build.sh @@ -15,9 +15,9 @@ termux_step_pre_configure() { } #termux_step_configure() { - # From socat_buildscript_for_android.sh in socat source: + # From socat_buildscript_for_android.sh in socat source: #./configure --host --disable-unix --disable-openssl --prefix=$TERMUX_PREFIX - # Replace misconfigured values in config.h and enable PTY functions + # Replace misconfigured values in config.h and enable PTY functions #mv config.h config.old #cat config.old \ #| sed 's/CRDLY_SHIFT.*/CRDLY_SHIFT 9/' \ @@ -26,7 +26,7 @@ termux_step_pre_configure() { #| sed 's/\/\* #undef HAVE_OPENPTY \*\//#define HAVE_OPENPTY 1/' \ #| sed 's/\/\* #undef HAVE_GRANTPT \*\//#define HAVE_GRANTPT 1/' \ #> config.h - # Enable openpty() in Makefile + # Enable openpty() in Makefile #mv Makefile Makefile.old #cat Makefile.old | sed 's/error.c/error.c openpty.c/' > Makefile #} diff --git a/scripts/ci/gitlab.sh b/scripts/ci/gitlab.sh index 7e16af851d..5a8082f734 100755 --- a/scripts/ci/gitlab.sh +++ b/scripts/ci/gitlab.sh @@ -53,7 +53,7 @@ fi existing_dirs="" for dir in $(echo "$UPDATED_FILES" | grep -oP "packages/[a-z0-9+._-]+" | sort | uniq); do if [ -d "$REPO_DIR/$dir" ]; then - existing_dirs+=" $dir" + existing_dirs+=" $dir" fi done PACKAGE_DIRS="$existing_dirs" @@ -72,11 +72,11 @@ fi ## or '--upload'. if [ $# -ge 1 ]; then if [ "$1" = "--upload" ]; then - exec "$REPO_DIR/scripts/bintray-add-package.sh" --path "$DEBS_DIR" $PACKAGE_NAMES + exec "$REPO_DIR/scripts/bintray-add-package.sh" --path "$DEBS_DIR" $PACKAGE_NAMES else - TERMUX_ARCH="$1" - unset BINTRAY_USERNAME - unset BINTRAY_API_KEY + TERMUX_ARCH="$1" + unset BINTRAY_USERNAME + unset BINTRAY_API_KEY fi else TERMUX_ARCH="aarch64" diff --git a/scripts/run-docker.sh b/scripts/run-docker.sh index fac435ff79..8274135f9e 100755 --- a/scripts/run-docker.sh +++ b/scripts/run-docker.sh @@ -27,14 +27,14 @@ docker start $CONTAINER_NAME > /dev/null 2> /dev/null || { --tty \ $IMAGE_NAME if [ "$UNAME" != Darwin ]; then - if [ $(id -u) -ne 1000 -a $(id -u) -ne 0 ] - then - echo "Changed builder uid/gid... (this may take a while)" - docker exec --tty $CONTAINER_NAME chown -R $(id -u) $HOME - docker exec --tty $CONTAINER_NAME chown -R $(id -u) /data - docker exec --tty $CONTAINER_NAME usermod -u $(id -u) builder - docker exec --tty $CONTAINER_NAME groupmod -g $(id -g) builder - fi + if [ $(id -u) -ne 1000 -a $(id -u) -ne 0 ] + then + echo "Changed builder uid/gid... (this may take a while)" + docker exec --tty $CONTAINER_NAME chown -R $(id -u) $HOME + docker exec --tty $CONTAINER_NAME chown -R $(id -u) /data + docker exec --tty $CONTAINER_NAME usermod -u $(id -u) builder + docker exec --tty $CONTAINER_NAME groupmod -g $(id -g) builder + fi fi } diff --git a/scripts/test-runner.sh b/scripts/test-runner.sh index e486816162..85a9cda0f9 100755 --- a/scripts/test-runner.sh +++ b/scripts/test-runner.sh @@ -1,42 +1,42 @@ #!/data/data/com.termux/files/usr/bin/bash if [ $# != 1 ]; then - echo "Specify package to run tests for as only argument" - exit 1 + echo "Specify package to run tests for as only argument" + exit 1 fi PACKAGE=$1 TEST_DIR=packages/$PACKAGE/tests if [ ! -d $TEST_DIR ]; then - echo "ERROR: No tests folder for package $PACKAGE" - exit 1 + echo "ERROR: No tests folder for package $PACKAGE" + exit 1 fi NUM_TESTS=0 NUM_FAILURES=0 for TEST_SCRIPT in $TEST_DIR/*; do - test -t 1 && printf "\033[32m" - echo "Running test ${TEST_SCRIPT}..." - (( NUM_TESTS += 1 )) - test -t 1 && printf "\033[31m" - ( - assert_equals() { - FIRST=$1 - SECOND=$2 - if [ "$FIRST" != "$SECOND" ]; then - echo "assertion failed - expected '$FIRST', got '$SECOND'" - exit 1 - fi - } - set -e -u - . $TEST_SCRIPT - ) - if [ $? != 0 ]; then - (( NUM_FAILURES += 1 )) - fi - test -t 1 && printf "\033[0m" + test -t 1 && printf "\033[32m" + echo "Running test ${TEST_SCRIPT}..." + (( NUM_TESTS += 1 )) + test -t 1 && printf "\033[31m" + ( + assert_equals() { + FIRST=$1 + SECOND=$2 + if [ "$FIRST" != "$SECOND" ]; then + echo "assertion failed - expected '$FIRST', got '$SECOND'" + exit 1 + fi + } + set -e -u + . $TEST_SCRIPT + ) + if [ $? != 0 ]; then + (( NUM_FAILURES += 1 )) + fi + test -t 1 && printf "\033[0m" done echo "$NUM_TESTS tests run - $NUM_FAILURES failure(s)"