X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/3a189d898c443782a48a6dd87bd0b58eaf9d1bf1..8043772793caee599ed08725bf04e69a659fec71:/build-package.sh diff --git a/build-package.sh b/build-package.sh index 6a75a60e..270fc403 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 @@ -515,7 +516,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 +696,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 \