X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/58235144ca7d634fed44309771bb6c734242dbbc..f37e8906b0c7859017d42638d276e86fcaffd4fa:/build-package.sh diff --git a/build-package.sh b/build-package.sh index 09708864..d5eeccc6 100755 --- a/build-package.sh +++ b/build-package.sh @@ -175,6 +175,7 @@ TERMUX_PKG_FOLDERNAME="" TERMUX_PKG_KEEP_STATIC_LIBRARIES="false" TERMUX_PKG_KEEP_HEADER_FILES="false" TERMUX_PKG_ESSENTIAL="" +TERMUX_PKG_CONFLICTS="" # https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts TERMUX_PKG_CONFFILES="" # Set if a host build should be done in TERMUX_PKG_HOSTBUILD_DIR: TERMUX_PKG_HOSTBUILD="" @@ -239,8 +240,9 @@ HERE fi TERMUX_ELF_CLEANER=$TERMUX_COMMON_CACHEDIR/termux-elf-cleaner -if [ ! -f $TERMUX_ELF_CLEANER ]; then - g++ -std=c++11 -Wall -Wextra -pedantic -Os $TERMUX_SCRIPTDIR/packages/termux-tools/termux-elf-cleaner.cpp -o $TERMUX_ELF_CLEANER +TERMUX_ELF_CLEANER_SRC=$TERMUX_SCRIPTDIR/packages/termux-tools/termux-elf-cleaner.cpp +if [ $TERMUX_ELF_CLEANER_SRC -nt $TERMUX_ELF_CLEANER ]; then + g++ -std=c++11 -Wall -Wextra -pedantic -Os $TERMUX_ELF_CLEANER_SRC -o $TERMUX_ELF_CLEANER fi # Keep track of when build started so we can see what files have been created @@ -429,7 +431,7 @@ termux_step_massage () { done set -e -o pipefail # Remove DT_ entries which the android 5.1 linker warns about: - find . -type f | xargs $TERMUX_ELF_CLEANER + find . -type f -print0 | xargs -0 $TERMUX_ELF_CLEANER test ! -z "$TERMUX_PKG_RM_AFTER_INSTALL" && rm -Rf $TERMUX_PKG_RM_AFTER_INSTALL @@ -610,7 +612,7 @@ cd $TERMUX_PKG_MASSAGEDIR termux_step_extract_into_massagedir cd $TERMUX_PKG_MASSAGEDIR termux_step_massage -cd $TERMUX_PKG_MASSAGEDIR +cd $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX termux_step_post_massage # Create data tarball containing files to package: @@ -642,6 +644,7 @@ Homepage: $TERMUX_PKG_HOMEPAGE HERE test ! -z "$TERMUX_PKG_DEPENDS" && echo "Depends: $TERMUX_PKG_DEPENDS" >> DEBIAN/control test ! -z "$TERMUX_PKG_ESSENTIAL" && echo "Essential: yes" >> DEBIAN/control +test ! -z "$TERMUX_PKG_CONFLICTS" && echo "Conflicts: $TERMUX_PKG_CONFLICTS" >> DEBIAN/control # Create DEBIAN/conffiles (see https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html): for f in $TERMUX_PKG_CONFFILES; do echo $TERMUX_PREFIX/$f >> DEBIAN/conffiles; done