X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/3a189d898c443782a48a6dd87bd0b58eaf9d1bf1..f98f7adc18f1f5db6b86a9dd6bd28c8f58f9e70c:/build-package.sh?ds=inline diff --git a/build-package.sh b/build-package.sh index 6a75a60e..631ec52c 100755 --- a/build-package.sh +++ b/build-package.sh @@ -187,12 +187,6 @@ TERMUX_PKG_MAINTAINER="Fredrik Fornwall " # Cleanup old state rm -Rf $TERMUX_PKG_BUILDDIR $TERMUX_PKG_PACKAGEDIR $TERMUX_PKG_SRCDIR $TERMUX_PKG_TMPDIR $TERMUX_PKG_MASSAGEDIR -# Ensure folders present (but not $TERMUX_PKG_SRCDIR, it will be created in build) -mkdir -p $TERMUX_PKG_BUILDDIR $TERMUX_PKG_PACKAGEDIR $TERMUX_PKG_TMPDIR $TERMUX_PKG_CACHEDIR $TERMUX_PKG_MASSAGEDIR $PKG_CONFIG_LIBDIR $TERMUX_PREFIX/{bin,etc,lib,libexec,share,tmp} - -# Make $TERMUX_PREFIX/bin/sh executable on the builder, so that build script can assume that it works -# on both builder and host later on: -ln -f -s /bin/sh $TERMUX_PREFIX/bin/sh # If $TERMUX_PREFIX already exists, it may have been built for a different arch TERMUX_ARCH_FILE=/data/TERMUX_ARCH @@ -220,6 +214,13 @@ if [ -f "${TERMUX_ARCH_FILE}" ]; then fi echo $TERMUX_ARCH > $TERMUX_ARCH_FILE +# Ensure folders present (but not $TERMUX_PKG_SRCDIR, it will be created in build) +mkdir -p $TERMUX_PKG_BUILDDIR $TERMUX_PKG_PACKAGEDIR $TERMUX_PKG_TMPDIR $TERMUX_PKG_CACHEDIR $TERMUX_PKG_MASSAGEDIR $PKG_CONFIG_LIBDIR $TERMUX_PREFIX/{bin,etc,lib,libexec,share,tmp} + +# Make $TERMUX_PREFIX/bin/sh executable on the builder, so that build script can assume that it works +# on both builder and host later on: +ln -f -s /bin/sh $TERMUX_PREFIX/bin/sh + if [ ! -f $PKG_CONFIG ]; then echo "Creating pkg-config wrapper..." # We use path to host pkg-config to avoid picking up a cross-compiled pkg-config later on @@ -353,7 +354,8 @@ termux_step_configure () { local AVOID_AUTOCONF_WRAPPERS="ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes" # Similarly, disable gnulib's rpl_getcwd(). It returns the wrong value, affecting zile. See # . - local AVOID_AUTOCONF_WRAPPERS="gl_cv_func_getcwd_null=yes gl_cv_func_getcwd_posix_signature=yes gl_cv_func_getcwd_path_max=yes gl_cv_func_getcwd_abort_bug=no $AVOID_AUTOCONF_WRAPPERS" + AVOID_AUTOCONF_WRAPPERS+=" gl_cv_func_getcwd_null=yes gl_cv_func_getcwd_posix_signature=yes gl_cv_func_getcwd_path_max=yes gl_cv_func_getcwd_abort_bug=no" + AVOID_AUTOCONF_WRAPPERS+=" gl_cv_header_working_fcntl_h=yes gl_cv_func_fcntl_f_dupfd_cloexec=yes gl_cv_func_fcntl_f_dupfd_works=yes" env $AVOID_AUTOCONF_WRAPPERS $TERMUX_PKG_SRCDIR/configure \ --disable-dependency-tracking \ @@ -515,7 +517,7 @@ HERE $TERMUX_TAR -czf $SUB_PKG_PACKAGE_DIR/control.tar.gz . # Create the actual .deb file: - TERMUX_SUBPKG_DEBFILE=$TERMUX_COMMON_DEBDIR/${SUB_PKG_NAME}-${TERMUX_PKG_FULLVERSION}_${SUB_PKG_ARCH}.deb + TERMUX_SUBPKG_DEBFILE=$TERMUX_COMMON_DEBDIR/${SUB_PKG_NAME}_${TERMUX_PKG_FULLVERSION}_${SUB_PKG_ARCH}.deb ar cr $TERMUX_SUBPKG_DEBFILE \ $TERMUX_COMMON_CACHEDIR/debian-binary \ $SUB_PKG_PACKAGE_DIR/control.tar.gz \ @@ -695,7 +697,7 @@ termux_step_create_debscripts # Create control.tar.gz $TERMUX_TAR -czf $TERMUX_PKG_PACKAGEDIR/control.tar.gz . # In the .deb ar file there should be a file "debian-binary" with "2.0" as the content: -TERMUX_PKG_DEBFILE=$TERMUX_COMMON_DEBDIR/${TERMUX_PKG_NAME}-${TERMUX_PKG_FULLVERSION}_${TERMUX_ARCH}.deb +TERMUX_PKG_DEBFILE=$TERMUX_COMMON_DEBDIR/${TERMUX_PKG_NAME}_${TERMUX_PKG_FULLVERSION}_${TERMUX_ARCH}.deb # Create the actual .deb file: ar cr $TERMUX_PKG_DEBFILE \ $TERMUX_COMMON_CACHEDIR/debian-binary \