diff --git a/build-package.sh b/build-package.sh index 0f95597d1..6773ea023 100755 --- a/build-package.sh +++ b/build-package.sh @@ -383,10 +383,10 @@ while (($# > 0)); do termux_step_install_license cd "$TERMUX_PKG_MASSAGEDIR" termux_step_extract_into_massagedir - cd "$TERMUX_PKG_MASSAGEDIR" termux_step_massage cd "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX" termux_step_post_massage + cd "$TERMUX_PKG_MASSAGEDIR" termux_step_create_datatar termux_step_create_debfile termux_step_finish_build diff --git a/scripts/build/termux_step_create_datatar.sh b/scripts/build/termux_step_create_datatar.sh index 43206f72d..2f0386087 100644 --- a/scripts/build/termux_step_create_datatar.sh +++ b/scripts/build/termux_step_create_datatar.sh @@ -1,20 +1,7 @@ termux_step_create_datatar() { - # Create data tarball containing files to package: - cd "$TERMUX_PKG_MASSAGEDIR" - - local HARDLINKS - HARDLINKS="$(find . -type f -links +1)" - if [ -n "$HARDLINKS" ]; then - termux_error_exit "Package contains hard links: $HARDLINKS" - fi - if [ "$TERMUX_PKG_METAPACKAGE" = "true" ]; then # Metapackage doesn't have data inside. rm -rf data - else - if [ "$(find . -type f)" = "" ]; then - termux_error_exit "No files in package" - fi fi tar -cJf "$TERMUX_PKG_PACKAGEDIR/data.tar.xz" -H gnu . diff --git a/scripts/build/termux_step_massage.sh b/scripts/build/termux_step_massage.sh index a5dbf7656..787310311 100644 --- a/scripts/build/termux_step_massage.sh +++ b/scripts/build/termux_step_massage.sh @@ -66,6 +66,19 @@ termux_step_massage() { done < <(find share/man -type l ! -iname \*.gz -print0) fi + # Check so files were actually installed. Exclude + # share/doc/$TERMUX_PKG_NAME/ as a license file is always + # installed there. + if [ "$(find . -type f -not -path "./share/doc/$TERMUX_PKG_NAME/*")" = "" ]; then + termux_error_exit "No files in package. Maybe you need to run autoreconf -fi before configuring?" + fi + + local HARDLINKS + HARDLINKS="$(find . -type f -links +1)" + if [ -n "$HARDLINKS" ]; then + termux_error_exit "Package contains hard links: $HARDLINKS" + fi + termux_create_subpackages # .. remove empty directories (NOTE: keep this last):