diff --git a/build-package.sh b/build-package.sh index 5a0360e0e..e6dc12c15 100755 --- a/build-package.sh +++ b/build-package.sh @@ -102,21 +102,8 @@ termux_step_post_make_install() { return } -termux_step_extract_into_massagedir() { - local TARBALL_ORIG=$TERMUX_PKG_PACKAGEDIR/${TERMUX_PKG_NAME}_orig.tar.gz - - # Build diff tar with what has changed during the build: - cd $TERMUX_PREFIX - tar -N "$TERMUX_BUILD_TS_FILE" \ - --exclude='lib/libc++_shared.so' --exclude='lib/libstdc++.so' \ - -czf "$TARBALL_ORIG" . - - # Extract tar in order to massage it - mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX" - cd "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX" - tar xf "$TARBALL_ORIG" - rm "$TARBALL_ORIG" -} +# Function to cp (through tar) installed files to massage dir +source scripts/build/termux_step_extract_into_massagedir.sh termux_step_massage() { cd "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX" diff --git a/scripts/build/termux_step_extract_into_massagedir.sh b/scripts/build/termux_step_extract_into_massagedir.sh new file mode 100644 index 000000000..9ad1c8c09 --- /dev/null +++ b/scripts/build/termux_step_extract_into_massagedir.sh @@ -0,0 +1,15 @@ +termux_step_extract_into_massagedir() { + local TARBALL_ORIG=$TERMUX_PKG_PACKAGEDIR/${TERMUX_PKG_NAME}_orig.tar.gz + + # Build diff tar with what has changed during the build: + cd $TERMUX_PREFIX + tar -N "$TERMUX_BUILD_TS_FILE" \ + --exclude='lib/libc++_shared.so' --exclude='lib/libstdc++.so' \ + -czf "$TARBALL_ORIG" . + + # Extract tar in order to massage it + mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX" + cd "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX" + tar xf "$TARBALL_ORIG" + rm "$TARBALL_ORIG" +}